aboutsummaryrefslogtreecommitdiff
path: root/src/core/NEON/kernels/NEReductionOperationKernel.cpp
diff options
context:
space:
mode:
authorNate Craun <nate@natecraun.net>2020-02-26 18:36:17 -0500
committerGiorgio Arena <giorgio.arena@arm.com>2020-02-27 10:50:16 +0000
commit14252f9ff45b9dbfe38743a8a3d8944be29382d3 (patch)
tree489f482f0a30844f2637e8831c14fb5ff179162d /src/core/NEON/kernels/NEReductionOperationKernel.cpp
parent0333704d15f68fe18551b00d00839a9efbbe858f (diff)
downloadComputeLibrary-14252f9ff45b9dbfe38743a8a3d8944be29382d3.tar.gz
Fix output value for Reduction Ops MAX and MIN
In the prior version, the outputs from MAX and MIN Reduction operation kernels would never be written to the output, because they are stored in vec_res_value, not vec_res_value[1-4]. Also, the prior branch test is probably a mistake, because ARG_MIN_IDX case is handled in the previous if statement, so that branch could never actually get executed. This commit adds a path that will correctly write the reduction operation results to the ouput. Signed-off-by: Nate Craun <nate@natecraun.net> Change-Id: Id977a6240fbee4668426a9c6b487ae65fab246d2 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2796 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Giorgio Arena <giorgio.arena@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/NEReductionOperationKernel.cpp')
-rw-r--r--src/core/NEON/kernels/NEReductionOperationKernel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/NEON/kernels/NEReductionOperationKernel.cpp b/src/core/NEON/kernels/NEReductionOperationKernel.cpp
index e2dee67d01..9b8c971a35 100644
--- a/src/core/NEON/kernels/NEReductionOperationKernel.cpp
+++ b/src/core/NEON/kernels/NEReductionOperationKernel.cpp
@@ -1047,7 +1047,7 @@ struct RedOpYZW_quantized
wrapper::vstore(reinterpret_cast<uint32_t *>(output.ptr()) + 8, vec_res_idx.val[2]);
wrapper::vstore(reinterpret_cast<uint32_t *>(output.ptr()) + 12, vec_res_idx.val[3]);
}
- else if(op == ReductionOperation::ARG_IDX_MIN)
+ else if(op == ReductionOperation::MIN || op == ReductionOperation::MAX)
{
wrapper::vstore(reinterpret_cast<T *>(output.ptr()), vec_res_value);
}