diff options
author | Mohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com> | 2023-02-09 11:52:06 +0000 |
---|---|---|
committer | Mohmun02 <MohammedSuhail.Munshi@arm.com> | 2023-02-15 16:13:08 +0000 |
commit | ecaa10a5594b58f14f5962cdda71d9313d4f3aa8 (patch) | |
tree | 55a0ec0557710438bdece14739f0c145c6789725 /tests/validation/reference/ReductionOperation.h | |
parent | 2cc6e0bcdcca5035670f5fec95c3621f619a8acd (diff) | |
download | ComputeLibrary-ecaa10a5594b58f14f5962cdda71d9313d4f3aa8.tar.gz |
Fix Intermittent Neon™ ReduceMean QASYMM8 Mismatch
- 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 <MohammedSuhail.Munshi@arm.com>
Change-Id: I54ef0f7e56f39da1fa5f30378f551b5ca419a61d
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/492456
Tested-by: bsgcomp <bsgcomp@arm.com>
Comments-Addressed: bsgcomp <bsgcomp@arm.com>
Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/9110
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/validation/reference/ReductionOperation.h')
-rw-r--r-- | tests/validation/reference/ReductionOperation.h | 3 |
1 files changed, 2 insertions, 1 deletions
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 <typename T, typename OT> SimpleTensor<OT> reduction_operation(const SimpleTensor<T> &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 |