diff options
Diffstat (limited to 'arm_compute/runtime/CL/functions/CLReduceMean.h')
-rw-r--r-- | arm_compute/runtime/CL/functions/CLReduceMean.h | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/arm_compute/runtime/CL/functions/CLReduceMean.h b/arm_compute/runtime/CL/functions/CLReduceMean.h index 57ec48d690..640fe7cf1b 100644 --- a/arm_compute/runtime/CL/functions/CLReduceMean.h +++ b/arm_compute/runtime/CL/functions/CLReduceMean.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020 ARM Limited. + * Copyright (c) 2018-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -24,10 +24,12 @@ #ifndef ARM_COMPUTE_CL_REDUCE_MEAN_H #define ARM_COMPUTE_CL_REDUCE_MEAN_H -#include "arm_compute/runtime/CL/ICLSimpleFunction.h" +#include "arm_compute/runtime/CL/functions/CLDequantizationLayer.h" #include "arm_compute/runtime/CL/functions/CLElementwiseOperations.h" +#include "arm_compute/runtime/CL/functions/CLQuantizationLayer.h" #include "arm_compute/runtime/CL/functions/CLReductionOperation.h" #include "arm_compute/runtime/CL/functions/CLReshapeLayer.h" +#include "arm_compute/runtime/CL/ICLSimpleFunction.h" #include "arm_compute/runtime/IMemoryManager.h" namespace arm_compute @@ -43,6 +45,17 @@ public: CLReduceMean(std::shared_ptr<IMemoryManager> memory_manager = nullptr); /** Configure kernel * + * Valid data layouts: + * - All + * + * Valid data type configurations: + * |src |dst | + * |:--------------|:--------------| + * |QASYMM8 |QASYMM8 | + * |QASYMM8_SIGNED |QASYMM8_SIGNED | + * |F16 |F16 | + * |F32 |F32 | + * * @note Supported tensor rank: up to 4 * * @param[in] input Source tensor. Data type supported: QASYMM8/QASYMM8_SIGNED/F16/F32 @@ -61,7 +74,11 @@ public: * @param[in] keep_dims If positive, retains reduced dimensions with length 1. * @param[out] output Destination tensor. Data type supported: Same as @p input */ - void configure(const CLCompileContext &compile_context, ICLTensor *input, const Coordinates &reduction_axis, bool keep_dims, ICLTensor *output); + void configure(const CLCompileContext &compile_context, + ICLTensor *input, + const Coordinates &reduction_axis, + bool keep_dims, + ICLTensor *output); /** Static function to check if given info will lead to a valid configuration of @ref CLReduceMean * @@ -72,7 +89,8 @@ public: * * @return A status */ - static Status validate(const ITensorInfo *input, const Coordinates &reduction_axis, bool keep_dims, const ITensorInfo *output); + static Status + validate(const ITensorInfo *input, const Coordinates &reduction_axis, bool keep_dims, const ITensorInfo *output); // Inherited methods overridden: void run() override; @@ -82,8 +100,13 @@ private: std::vector<CLReductionOperation> _reduction_kernels; std::vector<CLTensor> _reduced_outs; CLReshapeLayer _reshape; + CLDequantizationLayer _dequant; + CLQuantizationLayer _requant; int _reduction_ops; bool _keep_dims; + bool _do_requant; + CLTensor _input_no_quant; + CLTensor _output_no_quant; }; } // namespace arm_compute #endif /* ARM_COMPUTE_CL_REDUCE_MEAN_H */ |