From bbeef721c285d467d003a739a1e68b2c86899750 Mon Sep 17 00:00:00 2001 From: Gunes Bayir Date: Mon, 20 Mar 2023 10:19:10 +0000 Subject: Add Texture Pipe Support for Matmul Lhs T/NT Rhs NT kernels Resolves: COMPMID-5945, COMPMID-5954 Change-Id: I7b27021d21f8e08c4896f6b1f595a75125064f9e Signed-off-by: Gunes Bayir Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9356 Reviewed-by: Gian Marco Iodice Reviewed-by: SiCong Li Reviewed-by: Viet-Hoa Do Benchmark: Arm Jenkins Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins --- tests/datasets/LargeMatMulDataset.h | 12 ++++++++++++ tests/datasets/SmallMatMulDataset.h | 16 ++++++++++++++++ 2 files changed, 28 insertions(+) (limited to 'tests/datasets') diff --git a/tests/datasets/LargeMatMulDataset.h b/tests/datasets/LargeMatMulDataset.h index cbc97d5e4a..b5181bc30b 100644 --- a/tests/datasets/LargeMatMulDataset.h +++ b/tests/datasets/LargeMatMulDataset.h @@ -54,6 +54,18 @@ public: } }; +class LargeMatMulDatasetRhsExportToCLImageRhsNT final : public MatMulDataset +{ +public: + // For shape choices, please refer to the explanations given in SmallMatMulDatasetRhsExportToCLImageRhsNT + LargeMatMulDatasetRhsExportToCLImageRhsNT() + { + add_config(TensorShape(21U, 13U, 3U, 2U), TensorShape(32U, 21U, 3U, 2U), TensorShape(32U, 13U, 3U, 2U)); + add_config(TensorShape(38U, 12U, 1U, 5U, 2U), TensorShape(20U, 38U, 1U, 5U, 2U), TensorShape(20U, 12U, 1U, 5U, 2U)); + add_config(TensorShape(45U, 38U, 3U, 2U, 3U), TensorShape(20U, 45U, 3U, 2U, 3U), TensorShape(20U, 38U, 3U, 2U, 3U)); + } +}; + } // namespace datasets } // namespace test } // namespace arm_compute diff --git a/tests/datasets/SmallMatMulDataset.h b/tests/datasets/SmallMatMulDataset.h index ae92b9abf5..93e5f7dc2c 100644 --- a/tests/datasets/SmallMatMulDataset.h +++ b/tests/datasets/SmallMatMulDataset.h @@ -57,6 +57,22 @@ public: } }; +class SmallMatMulDatasetRhsExportToCLImageRhsNT final : public MatMulDataset +{ +public: + // Some considerations: + // (1) N (Dimension 0 of Rhs matrix) dimension should be a multiple of 4 + // (2) Having N=20 enables us to test all possible N0 values, i.e. 4, 8, 16 + // (3) It's important to have more than one loop iterations in the K dimension + // K has been chosen in accordance with K0 + // (4) The 5-th dimension has been chosen as non-unit because export_to_cl_iamge checks + // were using dim1 * dim2 * dim3 to calculate the CLImage height; however, in our case + // the tensor can be > 4D. To stress that case, the fifth dimension is chosen to be non-unit as well + SmallMatMulDatasetRhsExportToCLImageRhsNT() + { + add_config(TensorShape(7U, 3U, 2U, 1U, 2U), TensorShape(20U, 7U, 2U, 1U, 2U), TensorShape(20U, 3U, 2U, 1U, 2U)); + } +}; } // namespace datasets } // namespace test } // namespace arm_compute -- cgit v1.2.1