21.02
|
Function to execute a depthwise convolution. More...
#include <CLDepthwiseConvolutionLayer.h>
Public Member Functions | |
CLDepthwiseConvolutionLayer (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
Default constructor. More... | |
CLDepthwiseConvolutionLayer (const CLDepthwiseConvolutionLayer &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLDepthwiseConvolutionLayer (CLDepthwiseConvolutionLayer &&)=default | |
Default move constructor. More... | |
CLDepthwiseConvolutionLayer & | operator= (const CLDepthwiseConvolutionLayer &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLDepthwiseConvolutionLayer & | operator= (CLDepthwiseConvolutionLayer &&)=default |
Default move assignment operator. More... | |
~CLDepthwiseConvolutionLayer () | |
Default destructor. More... | |
void | configure (ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const PadStrideInfo &conv_info, unsigned int depth_multiplier=1, ActivationLayerInfo act_info=ActivationLayerInfo(), const Size2D &dilation=Size2D(1U, 1U)) |
Initialize the function's source, destination, weights and convolution information. More... | |
void | configure (const CLCompileContext &compile_context, ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const PadStrideInfo &conv_info, unsigned int depth_multiplier=1, ActivationLayerInfo act_info=ActivationLayerInfo(), const Size2D &dilation=Size2D(1U, 1U)) |
Initialize the function's source, destination, weights and convolution information. More... | |
void | run () override |
Run the kernels contained in the function. More... | |
void | prepare () override |
Prepare the function for executing. More... | |
Public Member Functions inherited from IFunction | |
virtual | ~IFunction ()=default |
Destructor. More... | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output, const PadStrideInfo &conv_info, unsigned int depth_multiplier=1, ActivationLayerInfo act_info=ActivationLayerInfo(), const Size2D &dilation=Size2D(1U, 1U)) |
Static function to check if given info will lead to a valid configuration of CLDepthwiseConvolutionLayer. More... | |
Function to execute a depthwise convolution.
Definition at line 44 of file CLDepthwiseConvolutionLayer.h.
CLDepthwiseConvolutionLayer | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Default constructor.
Definition at line 564 of file CLDepthwiseConvolutionLayer.cpp.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move constructor.
|
default |
Default destructor.
void configure | ( | ICLTensor * | input, |
const ICLTensor * | weights, | ||
const ICLTensor * | biases, | ||
ICLTensor * | output, | ||
const PadStrideInfo & | conv_info, | ||
unsigned int | depth_multiplier = 1 , |
||
ActivationLayerInfo | act_info = ActivationLayerInfo() , |
||
const Size2D & | dilation = Size2D(1U, 1U) |
||
) |
Initialize the function's source, destination, weights and convolution information.
[in,out] | input | Source tensor. Data type supported: QASYMM8/QASYMM8_SIGNED/FP16/FP32. Data layout supported: NHWC, NCHW |
[in] | weights | Weights tensor. These are 3D tensors with shape [kernel_x, kernel_y, IFM]. Data type supported: Same as input or QASYMM8/QASYMM8_SIGNED/QSYMM8_PER_CHANNEL when input is QASYMM8. |
[in] | biases | Biases tensor. A 1D tensor with shape [IFM]. Must be nullptr if not needed. Data type supported: Same as input , S32 when input is QASYMM8/QASYMM8_SIGNED. |
[out] | output | Destination tensor. Data type supported: same as input . |
[in] | conv_info | Padding and stride information to use for the convolution. |
[in] | depth_multiplier | (Optional) Multiplier to apply to the input's depth in order to retrieve the output's depth. Defaults to 1. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. |
[in] | dilation | (Optional) Dilation, in elements, across x and y. Defaults to (1, 1). |
Definition at line 569 of file CLDepthwiseConvolutionLayer.cpp.
References CLKernelLibrary::get().
void configure | ( | const CLCompileContext & | compile_context, |
ICLTensor * | input, | ||
const ICLTensor * | weights, | ||
const ICLTensor * | biases, | ||
ICLTensor * | output, | ||
const PadStrideInfo & | conv_info, | ||
unsigned int | depth_multiplier = 1 , |
||
ActivationLayerInfo | act_info = ActivationLayerInfo() , |
||
const Size2D & | dilation = Size2D(1U, 1U) |
||
) |
Initialize the function's source, destination, weights and convolution information.
[in] | compile_context | The compile context to be used. |
[in,out] | input | Source tensor. Data type supported: QASYMM8/QASYMM8_SIGNED/FP16/FP32. Data layout supported: NHWC, NCHW |
[in] | weights | Weights tensor. These are 3D tensors with shape [kernel_x, kernel_y, IFM]. Data type supported: Same as input or QASYMM8/QASYMM8_SIGNED/QSYMM8_PER_CHANNEL when input is QASYMM8. |
[in] | biases | Biases tensor. A 1D tensor with shape [IFM]. Must be nullptr if not needed. Data type supported: Same as input , S32 when input is QASYMM8/QASYMM8_SIGNED. |
[out] | output | Destination tensor. Data type supported: same as input . |
[in] | conv_info | Padding and stride information to use for the convolution. |
[in] | depth_multiplier | (Optional) Multiplier to apply to the input's depth in order to retrieve the output's depth. Defaults to 1. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. |
[in] | dilation | (Optional) Dilation, in elements, across x and y. Defaults to (1, 1). |
Definition at line 575 of file CLDepthwiseConvolutionLayer.cpp.
References ARM_COMPUTE_ERROR, arm_compute::test::validation::conv_info, arm_compute::GENERIC, CLScheduler::get(), ITensor::info(), arm_compute::OPTIMIZED, and CLScheduler::target().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move assignment operator.
|
overridevirtual |
Prepare the function for executing.
Any one off pre-processing step required by the function is handled here
Reimplemented from IFunction.
Definition at line 646 of file CLDepthwiseConvolutionLayer.cpp.
References ARM_COMPUTE_ERROR, arm_compute::GENERIC, and arm_compute::OPTIMIZED.
|
overridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 631 of file CLDepthwiseConvolutionLayer.cpp.
References ARM_COMPUTE_ERROR, arm_compute::GENERIC, and arm_compute::OPTIMIZED.
|
static |
Static function to check if given info will lead to a valid configuration of CLDepthwiseConvolutionLayer.
[in] | input | Source tensor info. Data type supported: QASYMM8/QASYMM8_SIGNED/FP16/FP32. Data layout supported: NHWC, NCHW |
[in] | weights | Weights tensor info. These are 3D tensors with shape [kernel_x, kernel_y, IFM]. Data type supported: Same as input or QASYMM8/QASYMM8_SIGNED/QSYMM8_PER_CHANNEL when input is QASYMM8. |
[in] | biases | Biases tensor info. A 1D tensor with shape [IFM]. Must be nullptr if not needed. Data type supported: Same as input , S32 when input is QASYMM8/QASYMM8_SIGNED. |
[in] | output | Destination tensor. Data type supported: same as input . |
[in] | conv_info | Padding and stride information to use for the convolution. |
[in] | depth_multiplier | (Optional) Multiplier to apply to the input's depth in order to retrieve the output's depth. Defaults to 1. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. Only RELU, BOUNDED_RELU and LU_BOUNDED_RELU for 3x3 QASYMM8 supported. |
[in] | dilation | (Optional) Dilation, in elements, across x and y. Defaults to (1, 1). |
Definition at line 600 of file CLDepthwiseConvolutionLayer.cpp.
References ARM_COMPUTE_ERROR, ITensorInfo::data_type(), arm_compute::GENERIC, CLScheduler::get(), arm_compute::get_arch_from_target(), arm_compute::is_data_type_float(), arm_compute::MIDGARD, arm_compute::OPTIMIZED, CLScheduler::target(), and arm_compute::validate().
Referenced by arm_compute::test::validation::DATA_TEST_CASE().