aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGunes Bayir <gunes.bayir@arm.com>2023-12-13 09:38:07 +0000
committerGunes Bayir <gunes.bayir@arm.com>2023-12-13 11:01:55 +0000
commit270576a9fbeeda5210483931388e62f9a1059dd9 (patch)
treeeeee19f204dfcac7808fd71a683a57b5e231d964
parentb526431b1079a86b30a1bf6e905435e7121584f9 (diff)
downloadComputeLibrary-270576a9fbeeda5210483931388e62f9a1059dd9.tar.gz
Fix nightly bug caused by wrong validation in Gemm mmul kernel
While writing this gemm kernel, code pieces, including validations were adapted from ClGemmMatrixMultiplyReshapedOnlyRhsKernel, and this validation should be about reinterpret_input_as_3d, which is not dealt with in this kernel. The mmul kernel only deals with reinterpret_output_as_3d, which is equivalent to depth_output_gemm3d != 0. This reveals a test gap for this kernel. There are currently no tests stressing this condition; but this is not going to be addressed as part of the bug ticket. The corresponding snippet in ClGemmMatrixMultiplyReshapedOnlyRhsKernel is if (gemm_info.reinterpret_input_as_3d) { ARM_COMPUTE_RETURN_ERROR_ON(src0->dimension(1) * src0->dimension(2) != m); } else { ARM_COMPUTE_RETURN_ERROR_ON(src0->dimension(1) != m); } Resolves: COMPMID-6757 Change-Id: I73b203594b22098a5374c1fac6969ee769969901 Signed-off-by: Gunes Bayir <gunes.bayir@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10874 Benchmark: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Jakub Sujak <jakub.sujak@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r--src/gpu/cl/kernels/ClGemmMatrixMultiplyReshapedOnlyRhsMMULKernel.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/gpu/cl/kernels/ClGemmMatrixMultiplyReshapedOnlyRhsMMULKernel.cpp b/src/gpu/cl/kernels/ClGemmMatrixMultiplyReshapedOnlyRhsMMULKernel.cpp
index 9a2a4890f3..d67c595449 100644
--- a/src/gpu/cl/kernels/ClGemmMatrixMultiplyReshapedOnlyRhsMMULKernel.cpp
+++ b/src/gpu/cl/kernels/ClGemmMatrixMultiplyReshapedOnlyRhsMMULKernel.cpp
@@ -99,16 +99,7 @@ Status validate_arguments(const ITensorInfo *src0,
ARM_COMPUTE_UNUSED(k);
ARM_COMPUTE_RETURN_ERROR_ON(src0->dimension(0) != k);
-
- // Validate the reinterpreted-as-3D-case
- if (gemm_info.depth_output_gemm3d != 0)
- {
- ARM_COMPUTE_RETURN_ERROR_ON(src0->dimension(1) * src0->dimension(2) != m);
- }
- else
- {
- ARM_COMPUTE_RETURN_ERROR_ON(src0->dimension(1) != m);
- }
+ ARM_COMPUTE_RETURN_ERROR_ON(src0->dimension(1) != m);
// Validate the gemm-batched case
if (src1->num_dimensions() > 2)