From ecaa10a5594b58f14f5962cdda71d9313d4f3aa8 Mon Sep 17 00:00:00 2001 From: Mohammed Suhail Munshi Date: Thu, 9 Feb 2023 11:52:06 +0000 Subject: =?UTF-8?q?Fix=20Intermittent=20Neon=E2=84=A2=20ReduceMean=20QASYM?= =?UTF-8?q?M8=20Mismatch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Dividing scale by number of elements causes accuracy loss due to limitations in float datatype and truncation to int - Adds rounding after division on aarch64 to negate this. Resolves: [COMPMID-5839] Signed-off-by: Mohammed Suhail Munshi Change-Id: I54ef0f7e56f39da1fa5f30378f551b5ca419a61d Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/492456 Tested-by: bsgcomp Comments-Addressed: bsgcomp Reviewed-by: Viet-Hoa Do Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9110 Reviewed-by: Gunes Bayir Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- tests/validation/reference/ReductionOperation.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/validation/reference/ReductionOperation.h') diff --git a/tests/validation/reference/ReductionOperation.h b/tests/validation/reference/ReductionOperation.h index 9c9e721b29..dd97778834 100644 --- a/tests/validation/reference/ReductionOperation.h +++ b/tests/validation/reference/ReductionOperation.h @@ -25,6 +25,7 @@ #define ARM_COMPUTE_TEST_REDUCTION_OPERATION_H #include "tests/SimpleTensor.h" +#include "arm_compute/core/Rounding.h" #include "tests/validation/Helpers.h" namespace arm_compute @@ -37,7 +38,7 @@ namespace reference { template SimpleTensor reduction_operation(const SimpleTensor &src, const TensorShape &dst_shape, unsigned int axis, ReductionOperation op, - QuantizationInfo quantization_info_output = QuantizationInfo()); + QuantizationInfo quantization_info_output = QuantizationInfo(), RoundingPolicy policy = RoundingPolicy::TO_ZERO); } // namespace reference } // namespace validation } // namespace test -- cgit v1.2.1