From 3ecf9fefa6f6299a0736599f150d4791cc8345d9 Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Wed, 28 Apr 2021 16:11:51 +0100 Subject: Remove OpenCL padding: CLReductionOperationKernel Change the parallel implementation across the X, now every thread computes one row Add missing test for MEAN_SUM Make reduction on any axis != 0 work with num_channels > 1 Resolve COMPMID-3917 Signed-off-by: Giorgio Arena Change-Id: Ib0f99540104e3c253bcd1ea637833db533f5e76e Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5522 Comments-Addressed: Arm Jenkins Reviewed-by: Manuel Bottini Reviewed-by: Gian Marco Iodice Tested-by: Arm Jenkins --- .../runtime/CL/functions/CLReductionOperation.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'arm_compute/runtime/CL/functions/CLReductionOperation.h') diff --git a/arm_compute/runtime/CL/functions/CLReductionOperation.h b/arm_compute/runtime/CL/functions/CLReductionOperation.h index 3fbcee6c21..58164fdcb3 100644 --- a/arm_compute/runtime/CL/functions/CLReductionOperation.h +++ b/arm_compute/runtime/CL/functions/CLReductionOperation.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2020 Arm Limited. + * Copyright (c) 2017-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -36,7 +36,6 @@ namespace arm_compute { // Forward declarations class CLCompileContext; -class CLFillBorderKernel; class CLReductionOperationKernel; class ICLTensor; @@ -99,15 +98,12 @@ public: private: ICLTensor *configure_intermediate_result_vector(ICLTensor *input, ICLTensor *output); - MemoryGroup _memory_group; - std::vector _results_vector; - std::vector> _reduction_kernels_vector; - std::vector> _border_handlers_vector; - CLReshapeLayer _reshape; - unsigned int _num_of_stages; - unsigned int _reduction_axis; - bool _is_serial; - bool _is_reshape_required; + MemoryGroup _memory_group; + CLTensor _unreshaped_output; + std::unique_ptr _reduction_kernel; + CLReshapeLayer _reshape; + unsigned int _reduction_axis; + bool _is_reshape_required; }; } // namespace arm_compute #endif /* ARM_COMPUTE_CLREDUCTIONOPERATION_H */ \ No newline at end of file -- cgit v1.2.1