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>
diff --git a/src/gpu/cl/kernels/ClGemmMatrixMultiplyReshapedOnlyRhsMMULKernel.cpp b/src/gpu/cl/kernels/ClGemmMatrixMultiplyReshapedOnlyRhsMMULKernel.cpp
index 9a2a489..d67c595 100644
--- a/src/gpu/cl/kernels/ClGemmMatrixMultiplyReshapedOnlyRhsMMULKernel.cpp
+++ b/src/gpu/cl/kernels/ClGemmMatrixMultiplyReshapedOnlyRhsMMULKernel.cpp
@@ -99,16 +99,7 @@
     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)