diff options
author | Gian Marco Iodice <gianmarco.iodice@arm.com> | 2017-08-10 10:43:40 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | d60a6b9d7977c6bd63ff7c523bed84d42363898b (patch) | |
tree | 4b1ef99dfd76883060688dcaadbadaaf5c14cf6d /arm_compute | |
parent | 4e09b3839206254d0df56095ad0762718a764c9c (diff) | |
download | ComputeLibrary-d60a6b9d7977c6bd63ff7c523bed84d42363898b.tar.gz |
COMPMID-477 - Optimized CLNormalizationLayer
CLPixelWiseMultiplication has been removed within the function
Change-Id: Ibe7edd7921d5cef6ff68fdeeca89771129a8eaea
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/84459
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute')
-rw-r--r-- | arm_compute/core/CL/kernels/CLNormalizationLayerKernel.h | 13 | ||||
-rw-r--r-- | arm_compute/runtime/CL/functions/CLNormalizationLayer.h | 17 |
2 files changed, 12 insertions, 18 deletions
diff --git a/arm_compute/core/CL/kernels/CLNormalizationLayerKernel.h b/arm_compute/core/CL/kernels/CLNormalizationLayerKernel.h index 5eedc31486..5f8c9c9d07 100644 --- a/arm_compute/core/CL/kernels/CLNormalizationLayerKernel.h +++ b/arm_compute/core/CL/kernels/CLNormalizationLayerKernel.h @@ -48,14 +48,12 @@ public: /** Set the input and output tensors. * - * @param[in] input Source tensor. 3 lower dims represent a single input with dimensions [width, height, IFM], - * and an optional 4th dimension for batch of inputs. Data types supported: QS8/QS16/F16/F32. - * @param[in] squared_input Source with each element has been squared. 3 lower dims represent a single input with dimensions [width, height, IFM]. - * Data types supported: same as @p input. - * @param[out] output Destination tensor. Output will have the same number of dimensions as input. Data types supported: same as @p input. - * @param[in] norm_info Normalization layer information like the normalization type, normalization size and other parameters. + * @param[in] input Source tensor. 3 lower dims represent a single input with dimensions [width, height, IFM], + * and an optional 4th dimension for batch of inputs. Data types supported: QS8/QS16/F16/F32. + * @param[out] output Destination tensor. Output will have the same number of dimensions as input. Data types supported: same as @p input. + * @param[in] norm_info Normalization layer information like the normalization type, normalization size and other parameters. */ - void configure(const ICLTensor *input, const ICLTensor *squared_input, ICLTensor *output, NormalizationLayerInfo norm_info); + void configure(const ICLTensor *input, ICLTensor *output, NormalizationLayerInfo norm_info); // Inherited methods overridden: void run(const Window &window, cl::CommandQueue &queue) override; @@ -63,7 +61,6 @@ public: private: const ICLTensor *_input; - const ICLTensor *_squared_input; ICLTensor *_output; BorderSize _border_size; bool _is_in_map; diff --git a/arm_compute/runtime/CL/functions/CLNormalizationLayer.h b/arm_compute/runtime/CL/functions/CLNormalizationLayer.h index a4dae85c1d..0818cec2e5 100644 --- a/arm_compute/runtime/CL/functions/CLNormalizationLayer.h +++ b/arm_compute/runtime/CL/functions/CLNormalizationLayer.h @@ -39,7 +39,6 @@ class ICLTensor; /** Basic function to simulate a normalization layer. This function calls the following CL kernels: * - * -# @ref CLPixelWiseMultiplicationKernel * -# @ref CLFillBorderKernel * -# @ref CLNormalizationLayerKernel * @@ -51,21 +50,19 @@ public: CLNormalizationLayer(); /** Set the input and output tensors. * - * @param[in] input Source tensor. 3 lower dims represent a single input with dimensions [width, height, IFM], - * and an optional 4th dimension for batch of inputs. Data types supported: F16, F32. Number of channels must be 1. - * @param[out] output Destination tensor. Dimensions, data type and number of channels must match the input ones. - * @param[in] norm_info Normalization layer information like the normalization type, normalization size and other parameters. + * @param[in, out] input Source tensor. 3 lower dims represent a single input with dimensions [width, height, IFM], + * and an optional 4th dimension for batch of inputs. Data types supported: F16/F32 (Written to by the border handler) + * @param[out] output Destination tensor. Dimensions, data type and number of channels must match the input ones. + * @param[in] norm_info Normalization layer information like the normalization type, normalization size and other parameters. */ - void configure(const ICLTensor *input, ICLTensor *output, NormalizationLayerInfo norm_info); + void configure(ICLTensor *input, ICLTensor *output, NormalizationLayerInfo norm_info); // Inherited methods overridden: void run() override; private: - CLTensor _squared_input; /**< The intermediate buffer which stores results of squaring input*/ - CLNormalizationLayerKernel _norm_kernel; /**< Normalization layer kernel to run */ - CLPixelWiseMultiplicationKernel _multiply_kernel; /**< Pixel multiplication kernel to run */ - CLFillBorderKernel _border_handler; /**< Kernel to handle borders */ + CLNormalizationLayerKernel _norm_kernel; /**< Normalization layer kernel to run */ + CLFillBorderKernel _border_handler; /**< Kernel to handle borders */ }; } #endif /* __ARM_COMPUTE_CLNORMALIZATIONLAYER_H__ */ |