From cdce25bcb110a344e05364803f221f1645dc1f78 Mon Sep 17 00:00:00 2001 From: Radu Salavat Date: Fri, 12 Apr 2024 12:26:50 +0000 Subject: Accumulation in Cpu Gemm kernels is not supported for quantized kernels in aarch32. This patch guards the relevant tests. Partially Resolves: ONCPUML-1442 Signed-off-by: Radu Salavat Change-Id: I8eed80db4b522185c3c50c13f0f701aa48961057 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/11410 Reviewed-by: Gunes Bayir Tested-by: Arm Jenkins Benchmark: Arm Jenkins Comments-Addressed: Arm Jenkins --- src/cpu/operators/CpuGemmLowpMatrixMultiplyCore.cpp | 3 +++ tests/validation/NEON/GEMMLowp.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/cpu/operators/CpuGemmLowpMatrixMultiplyCore.cpp b/src/cpu/operators/CpuGemmLowpMatrixMultiplyCore.cpp index 94e86c6077..52d2f17dbf 100644 --- a/src/cpu/operators/CpuGemmLowpMatrixMultiplyCore.cpp +++ b/src/cpu/operators/CpuGemmLowpMatrixMultiplyCore.cpp @@ -347,6 +347,9 @@ Status CpuGemmLowpMatrixMultiplyCore::validate(const ITensorInfo *a, // When using accumulation(in place summation), for now, the only supported DataType for output is S32. if (gemm_info.accumulate()) { +#ifdef __arm__ + ARM_COMPUTE_RETURN_ERROR_MSG("Accumulation is not supported for armv7"); +#endif /* __arm__ */ ARM_COMPUTE_RETURN_ERROR_ON_MSG(gemm_info.gemmlowp_output_stage().type != GEMMLowpOutputStageType::NONE, "Accumulation is not supported for output QASYMM8/QASYMM8_SIGNED"); } diff --git a/tests/validation/NEON/GEMMLowp.cpp b/tests/validation/NEON/GEMMLowp.cpp index 1b07975bb3..8497dd14cf 100644 --- a/tests/validation/NEON/GEMMLowp.cpp +++ b/tests/validation/NEON/GEMMLowp.cpp @@ -317,6 +317,8 @@ FIXTURE_DATA_TEST_CASE(RunLarge, NEGEMMLowpMatrixMultiplyCoreFusedOffsetOutputFi } TEST_SUITE_END() // FusedOffsetOutput +// accumulation is not supported for Int8/UInt8 in aarch32 +#ifdef __aarch64__ TEST_SUITE(ACCUMULATION) TEST_SUITE(S32) FIXTURE_DATA_TEST_CASE(RunSmall, NEGEMMLowpMatrixMultiplyCoreAccumulateFixture, framework::DatasetMode::ALL, datasets::SmallGEMMLowpDataset()) @@ -331,6 +333,7 @@ FIXTURE_DATA_TEST_CASE(RunLarge, NEGEMMLowpMatrixMultiplyCoreAccumulateFixture, } TEST_SUITE_END() // S32 TEST_SUITE_END() // ACCUMULATION +#endif // __arch64__ TEST_SUITE_END() // MatrixMultiplyCore TEST_SUITE_END() // GEMMLowp -- cgit v1.2.1