diff options
author | Gunes Bayir <gunes.bayir@arm.com> | 2023-03-17 13:52:21 +0000 |
---|---|---|
committer | Gunes Bayir <gunes.bayir@arm.com> | 2023-03-20 14:49:51 +0000 |
commit | 8918b23073851417e8be6e5e53c6380dbdedf201 (patch) | |
tree | ad0eb38aa7086adb71a444802009a04de3e34929 /tests/validation/fixtures | |
parent | 14d7b535d48620f009efca576cc70fb6ea9ff20d (diff) | |
download | ComputeLibrary-8918b23073851417e8be6e5e53c6380dbdedf201.tar.gz |
Implement OpenCL MatMul for Lhs T Rhs T/NT FP32/16
- Implement opencl kernel for LHS transposed and RHS non-transposed
- Implement opencl kernel for LHS transposed and RHS transposed
- Add validation tests
Resolves: COMPMID-5953, COMPMID-5955
Change-Id: I55589acbffe86c44e29807574975978a1ec09bad
Signed-off-by: Gunes Bayir <gunes.bayir@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9345
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation/fixtures')
-rw-r--r-- | tests/validation/fixtures/MatMulKernelFixture.h (renamed from tests/validation/fixtures/BatchMatMulFixture.h) | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/validation/fixtures/BatchMatMulFixture.h b/tests/validation/fixtures/MatMulKernelFixture.h index 9fb2dcc1b7..459564618f 100644 --- a/tests/validation/fixtures/BatchMatMulFixture.h +++ b/tests/validation/fixtures/MatMulKernelFixture.h @@ -21,8 +21,8 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -#ifndef ACL_TESTS_VALIDATION_FIXTURES_BATCHMATMULFIXTURE -#define ACL_TESTS_VALIDATION_FIXTURES_BATCHMATMULFIXTURE +#ifndef ACL_TESTS_VALIDATION_FIXTURES_MATMULKERNELFIXTURE +#define ACL_TESTS_VALIDATION_FIXTURES_MATMULKERNELFIXTURE #include "arm_compute/core/KernelDescriptors.h" #include "src/gpu/cl/kernels/ClNativeMatMulKernel.h" @@ -44,7 +44,7 @@ namespace validation using namespace arm_compute::opencl::kernels; template <typename T> -class BatchMatMulValidationFixture : public framework::Fixture +class MatMulKernelValidationFixture : public framework::Fixture { public: template <typename...> @@ -96,7 +96,7 @@ protected: CLTensor b = create_tensor<CLTensor>(shape_b, data_type, 1); CLTensor dst = create_tensor<CLTensor>(output_shape, data_type, 1); - CLSynthetizeOperator<ClNativeMatMulKernel> batchMatMul{}; + CLSynthetizeOperator<ClNativeMatMulKernel> matMul{}; MatMulKernelInfo matmul_info; matmul_info.adj_lhs = pretranspose_a; matmul_info.adj_rhs = pretranspose_b; @@ -104,7 +104,7 @@ protected: matmul_info.n0 = N0; matmul_info.k0 = K0; - batchMatMul.configure(a.info(), b.info(), dst.info(), matmul_info); + matMul.configure(a.info(), b.info(), dst.info(), matmul_info); ARM_COMPUTE_ASSERT(a.info()->is_resizable()); ARM_COMPUTE_ASSERT(b.info()->is_resizable()); ARM_COMPUTE_ASSERT(dst.info()->is_resizable()); @@ -122,12 +122,12 @@ protected: fill(CLAccessor(a), 0); fill(CLAccessor(b), 1); - // Compute batchMatMul kernel + // Compute matMul kernel ITensorPack tensors_pack({ { ACL_SRC_0, &a }, { ACL_SRC_1, &b }, { ACL_DST, &dst } }); - batchMatMul.run(tensors_pack); + matMul.run(tensors_pack); return dst; } @@ -200,4 +200,4 @@ protected: } // namespace validation } // namespace test } // namespace arm_compute -#endif /* ACL_TESTS_VALIDATION_FIXTURES_BATCHMATMULFIXTURE */ +#endif /* ACL_TESTS_VALIDATION_FIXTURES_MATMULKERNELFIXTURE */ |