aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiCong Li <sicong.li@arm.com>2020-07-28 09:01:28 +0100
committerSiCong Li <sicong.li@arm.com>2020-07-31 15:06:56 +0000
commit3b64e3e78c166773fea680afb4829d886e90552d (patch)
tree15a1f434bb8efdfa5a4adf23023abbf2daea0367
parent7a81d2aaf33d1d134148d051b901567db5908922 (diff)
downloadComputeLibrary-3b64e3e78c166773fea680afb4829d886e90552d.tar.gz
COMPMID-3653 CL GEMM kernel creation error on certain combinations of N and N0
* Fix invalid use of vstore_partial_1 * Add configuration tests to catch this error case Signed-off-by: SiCong Li <sicong.li@arm.com> Change-Id: I25a2b16a530992acc869a4335c48a8fffa420850 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3628 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r--src/core/CL/cl_kernels/helpers.h4
-rw-r--r--tests/validation/CL/GEMMMatrixMultiplyNative.cpp9
-rw-r--r--tests/validation/CL/GEMMMatrixMultiplyReshapedOnlyRHS.cpp11
3 files changed, 13 insertions, 11 deletions
diff --git a/src/core/CL/cl_kernels/helpers.h b/src/core/CL/cl_kernels/helpers.h
index 9206110f6..d3ede32bc 100644
--- a/src/core/CL/cl_kernels/helpers.h
+++ b/src/core/CL/cl_kernels/helpers.h
@@ -345,7 +345,7 @@
#define vstore_partial_5(DATA, OFFSET, PTR) \
vstore_partial_4(DATA.s0123, OFFSET, PTR); \
- vstore_partial_1(DATA.s4, OFFSET, PTR + 4);
+ vstore1(DATA.s4, OFFSET, PTR + 4);
#define vstore_partial_6(DATA, OFFSET, PTR) \
vstore_partial_4(DATA.s0123, OFFSET, PTR); \
@@ -360,7 +360,7 @@
#define vstore_partial_9(DATA, OFFSET, PTR) \
vstore_partial_8(DATA.s01234567, OFFSET, PTR); \
- vstore_partial_1(DATA.s8, OFFSET, PTR + 8);
+ vstore1(DATA.s8, OFFSET, PTR + 8);
#define vstore_partial_10(DATA, OFFSET, PTR) \
vstore_partial_8(DATA.s01234567, OFFSET, PTR); \
diff --git a/tests/validation/CL/GEMMMatrixMultiplyNative.cpp b/tests/validation/CL/GEMMMatrixMultiplyNative.cpp
index b474ea326..cdcc1a48f 100644
--- a/tests/validation/CL/GEMMMatrixMultiplyNative.cpp
+++ b/tests/validation/CL/GEMMMatrixMultiplyNative.cpp
@@ -244,12 +244,13 @@ m_value, n_value, k_value, b_value, m0_value, n0_value, k0_value, broadcast_bias
* - Partial blocks in y dimension
* - Partial blocks in both x and y dimensions
* - No blocks in both x and y dimensions, scalar store (N0==1)
+ * - Special case: partial_n0 == 5 (vstore1 should be invoked instead of vstore_partial_1)
*/
DATA_TEST_CASE(ValidateZeroPadding, framework::DatasetMode::ALL, zip(zip(zip(
-framework::dataset::make("M", { 24, 64, 101, 1, 50 }),
-framework::dataset::make("N", { 48, 29, 16, 122, 20 })),
-framework::dataset::make("M0", { 4, 8, 7, 2, 1 })),
-framework::dataset::make("N0", { 4, 4, 16, 3, 1 })),
+framework::dataset::make("M", { 24, 64, 101, 1, 50, 256, }),
+framework::dataset::make("N", { 48, 29, 16, 122, 20, 21, })),
+framework::dataset::make("M0", { 4, 8, 7, 2, 1, 8, })),
+framework::dataset::make("N0", { 4, 4, 16, 3, 1, 8, })),
m_value, n_value, m0_value, n0_value)
{
bool status = validate_zero_padding(m_value, n_value, 23, 1, m0_value, n0_value, 4, false, DataType::F32, ActivationLayerInfo());
diff --git a/tests/validation/CL/GEMMMatrixMultiplyReshapedOnlyRHS.cpp b/tests/validation/CL/GEMMMatrixMultiplyReshapedOnlyRHS.cpp
index c87d309ad..6a1d49557 100644
--- a/tests/validation/CL/GEMMMatrixMultiplyReshapedOnlyRHS.cpp
+++ b/tests/validation/CL/GEMMMatrixMultiplyReshapedOnlyRHS.cpp
@@ -309,13 +309,14 @@ b_value, m0_value, n0_value, k0_value, broadcast_bias, input_as_3d, depth_output
* - Partial blocks in x dimension
* - Partial blocks in y dimension
* - Partial blocks in both x and y dimensions
+ * - Special case: partial_n0 == 9 (vstore1 should be invoked instead of vstore_partial_1)
*/
DATA_TEST_CASE(ValidateZeroPadding, framework::DatasetMode::ALL, zip(zip(zip(zip(
-framework::dataset::make("M", { 24, 64, 101, 1 }),
-framework::dataset::make("N", { 48, 29, 16, 122 })),
-framework::dataset::make("M0", { 4, 8, 7, 2 })),
-framework::dataset::make("N0", { 4, 4, 16, 3 })),
-framework::dataset::make("export_to_cl_image", { false, true, true, false })),
+framework::dataset::make("M", { 24, 64, 101, 1, 100 }),
+framework::dataset::make("N", { 48, 29, 16, 122, 41 })),
+framework::dataset::make("M0", { 4, 8, 7, 2, 1 })),
+framework::dataset::make("N0", { 4, 4, 16, 3, 16 })),
+framework::dataset::make("export_to_cl_image", { false, true, true, false, false })),
m_value, n_value, m0_value, n0_value, export_to_cl_image)
{
constexpr DataType dt = DataType::F32;