21.02
|
Basic function to execute direct convolution function: More...
#include <CLDirectConvolutionLayer.h>
Public Member Functions | |
CLDirectConvolutionLayer () | |
Default constructor. More... | |
CLDirectConvolutionLayer (const CLDirectConvolutionLayer &)=delete | |
Prevent instances of this class from being copied. More... | |
CLDirectConvolutionLayer & | operator= (const CLDirectConvolutionLayer &)=delete |
Prevent instances of this class from being copied. More... | |
~CLDirectConvolutionLayer () | |
Default destructor. More... | |
void | configure (ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info=ActivationLayerInfo()) |
Set the input and output tensors. More... | |
void | configure (const CLCompileContext &compile_context, ICLTensor *input, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info=ActivationLayerInfo()) |
Set the input and output tensors. More... | |
void | run () override |
Run the kernels contained in the function. More... | |
Public Member Functions inherited from IFunction | |
virtual | ~IFunction ()=default |
Destructor. More... | |
virtual void | prepare () |
Prepare the function for executing. More... | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *output, const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info=ActivationLayerInfo()) |
Static function to check if given info will lead to a valid configuration of CLDirectConvolutionLayer. More... | |
Basic function to execute direct convolution function:
Definition at line 43 of file CLDirectConvolutionLayer.h.
Default constructor.
Definition at line 36 of file CLDirectConvolutionLayer.cpp.
References CLDirectConvolutionLayer::~CLDirectConvolutionLayer().
|
delete |
Prevent instances of this class from being copied.
|
default |
Default destructor.
Referenced by CLDirectConvolutionLayer::CLDirectConvolutionLayer().
void configure | ( | ICLTensor * | input, |
const ICLTensor * | weights, | ||
const ICLTensor * | biases, | ||
ICLTensor * | output, | ||
const PadStrideInfo & | conv_info, | ||
const ActivationLayerInfo & | act_info = ActivationLayerInfo() |
||
) |
Set the input and output tensors.
[in] | input | Source tensor. 3 lower dimensions represent a single input [width, height, IFM], while every optional dimension from 4 and above represent a batch of inputs. Data types supported: QASYMM8_SIGNED/QASYMM8/F16/F32. |
[in] | weights | Weights tensor. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. Data type supported:Same as input . |
[in] | biases | Biases tensor. Shared biases supported. Biases are 1D tensor with dimensions [OFM]. Data type supported: Should match input data type, except for input of QASYMM8 and QASYMM8_SIGNED type where biases should be of S32 type. |
[out] | output | Destination tensor. 3 lower dimensions represent a single output [width, height, OFM], while the rest represent batch of outputs. Data types supported: Same as input . |
[in] | conv_info | Contains padding and stride information described in PadStrideInfo. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. |
Definition at line 44 of file CLDirectConvolutionLayer.cpp.
References CLKernelLibrary::get().
void configure | ( | const CLCompileContext & | compile_context, |
ICLTensor * | input, | ||
const ICLTensor * | weights, | ||
const ICLTensor * | biases, | ||
ICLTensor * | output, | ||
const PadStrideInfo & | conv_info, | ||
const ActivationLayerInfo & | act_info = ActivationLayerInfo() |
||
) |
Set the input and output tensors.
[in] | compile_context | The compile context to be used. |
[in] | input | Source tensor. 3 lower dimensions represent a single input [width, height, IFM], while every optional dimension from 4 and above represent a batch of inputs. Data types supported: QASYMM8_SIGNED/QASYMM8/F16/F32. |
[in] | weights | Weights tensor. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. Data type supported:Same as input . |
[in] | biases | Biases tensor. Shared biases supported. Biases are 1D tensor with dimensions [OFM]. Data type supported: Should match input data type, except for input of QASYMM8 and QASYMM8_SIGNED type where biases should be of S32 type. |
[out] | output | Destination tensor. 3 lower dimensions represent a single output [width, height, OFM], while the rest represent batch of outputs. Data types supported: Same as input . |
[in] | conv_info | Contains padding and stride information described in PadStrideInfo. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. |
Definition at line 49 of file CLDirectConvolutionLayer.cpp.
References CLActivationLayer::configure(), arm_compute::CONSTANT, ITensorInfo::data_type(), ActivationLayerInfo::enabled(), CLScheduler::get(), ITensor::info(), arm_compute::is_data_type_quantized_asymmetric(), ITensorInfo::quantization_info(), and CLScheduler::tune_kernel_static().
|
delete |
Prevent instances of this class from being copied.
|
overridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 90 of file CLDirectConvolutionLayer.cpp.
References CLScheduler::enqueue(), CLScheduler::get(), and CLActivationLayer::run().
|
static |
Static function to check if given info will lead to a valid configuration of CLDirectConvolutionLayer.
[in] | input | Source tensor. 3 lower dimensions represent a single input [width, height, IFM], while every optional dimension from 4 and above represent a batch of inputs. Data types supported: QASYMM8_SIGNED/QASYMM8/F16/F32. |
[in] | weights | Weights tensor. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. Data type supported:Same as input . |
[in] | biases | Biases tensor. Shared biases supported. Biases are 1D tensor with dimensions [OFM]. Data type supported: Should match input data type, except for input of QASYMM8 and QASYMM8_SIGNED type where biases should be of S32 type. |
[in] | output | Destination tensor. 3 lower dimensions represent a single output [width, height, OFM], while the rest represent batch of outputs. Data types supported: Same as input . |
[in] | conv_info | Contains padding and stride information described in PadStrideInfo. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. |
Definition at line 79 of file CLDirectConvolutionLayer.cpp.
References ARM_COMPUTE_RETURN_ON_ERROR, ActivationLayerInfo::enabled(), CLScheduler::get(), CLActivationLayer::validate(), and CLDirectConvolutionLayerKernel::validate().
Referenced by arm_compute::test::validation::DATA_TEST_CASE(), CLConvolutionLayer::get_convolution_method(), and CLConvolutionLayer::validate().