diff options
author | Manuel Bottini <manuel.bottini@arm.com> | 2018-10-02 16:41:52 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2018-12-05 11:37:14 +0000 |
commit | 0d0028ca25a47dd51260e2555b336fc9f09d1df1 (patch) | |
tree | 968e8f126a9c7d5d7d4159fbb7d906d47ad077f2 /arm_compute | |
parent | 8bf622a44c70564d6a7c712473cdfac3e50ac62d (diff) | |
download | ComputeLibrary-0d0028ca25a47dd51260e2555b336fc9f09d1df1.tar.gz |
COMPMID-1298: Fuse ReLu activation in CLWinogradOutputTransform
Change-Id: I9e6e43a5839d04c2e4b4552c05446efb0a5074cf
Reviewed-on: https://review.mlplatform.org/232
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute')
-rw-r--r-- | arm_compute/core/CL/kernels/CLWinogradOutputTransformKernel.h | 7 | ||||
-rw-r--r-- | arm_compute/runtime/CL/functions/CLWinogradConvolutionLayer.h | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/arm_compute/core/CL/kernels/CLWinogradOutputTransformKernel.h b/arm_compute/core/CL/kernels/CLWinogradOutputTransformKernel.h index 3bbbb5834c..bdb230d645 100644 --- a/arm_compute/core/CL/kernels/CLWinogradOutputTransformKernel.h +++ b/arm_compute/core/CL/kernels/CLWinogradOutputTransformKernel.h @@ -63,8 +63,10 @@ public: * @param[in] bias Biases tensor. Shared biases supported. Biases are 1D tensor with dimensions [OFM]. It can be a nullptr. Data type supported: as @p input * @param[out] output The output tensor. The shape for this tensor can be calculated using the utility function @p compute_winograd_output_transform_shape. Data types supported: Same as @p input * @param[in] winograd_info Contains Winograd's information described in @ref WinogradInfo + * @param[in] act_info (Optional) Activation layer information in case of a fused activation. */ - void configure(const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, const WinogradInfo &winograd_info); + void configure(const ICLTensor *input, const ICLTensor *bias, ICLTensor *output, const WinogradInfo &winograd_info, const ActivationLayerInfo &act_info = ActivationLayerInfo()); + /** Static function to check if given info will lead to a valid configuration of @ref CLWinogradOutputTransformKernel * * @note Winograd output transform supports the following configurations for NCWH data layout @@ -82,10 +84,11 @@ public: * @param[in] bias Biases tensor. Shared biases supported. Biases are 1D tensor with dimensions [OFM]. It can be a nullptr. Data type supported: as @p input * @param[out] output The output tensor. The shape for this tensor can be calculated using the utility function @p compute_winograd_output_transform_shape. Data types supported: Same as @p input * @param[in] winograd_info Contains Winograd's information described in @ref WinogradInfo + * @param[in] act_info (Optional) Activation layer information in case of a fused activation @ref ActivationLayerInfo. Only RELU, BOUNDED_RELU, LU_BOUNDED_RELU, LEAKY_RELU and SOFT_RELU supported. * * @return a status */ - static Status validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, const WinogradInfo &winograd_info); + static Status validate(const ITensorInfo *input, const ITensorInfo *bias, const ITensorInfo *output, const WinogradInfo &winograd_info, const ActivationLayerInfo &act_info = ActivationLayerInfo()); // Inherited methods overridden: void run(const Window &window, cl::CommandQueue &queue) override; diff --git a/arm_compute/runtime/CL/functions/CLWinogradConvolutionLayer.h b/arm_compute/runtime/CL/functions/CLWinogradConvolutionLayer.h index 395f59500b..f11eb2a335 100644 --- a/arm_compute/runtime/CL/functions/CLWinogradConvolutionLayer.h +++ b/arm_compute/runtime/CL/functions/CLWinogradConvolutionLayer.h @@ -108,13 +108,11 @@ private: CLWinogradInputTransform _input_transform; CLWinogradFilterTransformKernel _filter_transform; CLWinogradOutputTransformKernel _output_transform; - CLActivationLayer _activationlayer_function; CLTensor _input0; CLTensor _input1; CLTensor _batched_mm_output; const ICLTensor *_original_weights; bool _is_prepared; - bool _is_activationlayer_enabled; }; -} +} // namespace arm_compute #endif /* __ARM_COMPUTE_CLWINOGRADCONVOLUTIONLAYER_H__ */ |