aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/reference/ReductionOperation.h
diff options
context:
space:
mode:
authorMohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com>2023-02-09 11:52:06 +0000
committerJakub Sujak <jakub.sujak@arm.com>2023-02-15 16:30:43 +0000
commit470cc5dea721716a93fded4d98642f6e9150c69b (patch)
tree7fabcb8c01679e2bdbecc96d41758c9588824e9c /tests/validation/reference/ReductionOperation.h
parent6267974c98a03476808030fb88a63eea3eca51e3 (diff)
downloadComputeLibrary-470cc5dea721716a93fded4d98642f6e9150c69b.tar.gz
Fix Intermittent Neon™ ReduceMean QASYMM8 Mismatchv23.02branches/arm_compute_23_02
- 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.h3
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