diff options
author | Manuel Bottini <manuel.bottini@arm.com> | 2020-05-04 18:42:32 +0100 |
---|---|---|
committer | Manuel Bottini <manuel.bottini@arm.com> | 2020-05-05 17:21:50 +0000 |
commit | 77b8859688c333bca35ebc8ca4d0b2652f480c4a (patch) | |
tree | 2a9d997bc148f33d6a68b5ed28e88250e40a977f /src | |
parent | 939586e8fd05923cab63b7b79bf5040cca5b8a7b (diff) | |
download | ComputeLibrary-77b8859688c333bca35ebc8ca4d0b2652f480c4a.tar.gz |
COMPMID-3443: Android R CTS 1.3 QASYMM8_SIGNED failure with MEAN on CpuAcc
- Properly perform the division of the sum of the elements by the interested dimension of the tensor
Change-Id: I0a30be4e5e6cfc1bd24a17eb4307dd2acf98db3e
Signed-off-by: Manuel Bottini <manuel.bottini@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3145
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/NEON/kernels/NEReductionOperationKernel.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/NEON/kernels/NEReductionOperationKernel.cpp b/src/core/NEON/kernels/NEReductionOperationKernel.cpp index 9b8c971a35..afe58ed07d 100644 --- a/src/core/NEON/kernels/NEReductionOperationKernel.cpp +++ b/src/core/NEON/kernels/NEReductionOperationKernel.cpp @@ -724,14 +724,13 @@ struct RedOpX_quantized if(op == ReductionOperation::MEAN_SUM) { - res /= in_info.dimension(0); + res /= static_cast<int32_t>(in_info.dimension(0)); } else { // Subtract accumulated offsets res -= (in_info.dimension(0) - 1) * iq_info.offset; } - *reinterpret_cast<T *>(output.ptr()) = utils::cast::saturate_cast<T>(res); } } |