21.02
|
Function to reshape and transpose the weights. More...
#include <CLGEMMConvolutionLayer.h>
Public Member Functions | |
CLConvolutionLayerReshapeWeights () | |
Constructor. More... | |
CLConvolutionLayerReshapeWeights (const CLConvolutionLayerReshapeWeights &)=delete | |
Prevent instances of this class from being copied. More... | |
CLConvolutionLayerReshapeWeights & | operator= (const CLConvolutionLayerReshapeWeights &)=delete |
Prevent instances of this class from being copied. More... | |
CLConvolutionLayerReshapeWeights (CLConvolutionLayerReshapeWeights &&)=default | |
Default move constructor. More... | |
CLConvolutionLayerReshapeWeights & | operator= (CLConvolutionLayerReshapeWeights &&)=default |
Default move assignment operator. More... | |
~CLConvolutionLayerReshapeWeights () | |
Default destructor. More... | |
void | configure (const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, unsigned int num_groups=1) |
Set the input and output tensors. More... | |
void | configure (const CLCompileContext &compile_context, const ICLTensor *weights, const ICLTensor *biases, ICLTensor *output, unsigned int num_groups=1) |
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 *weights, const ITensorInfo *biases, const ITensorInfo *output, unsigned int num_groups=1) |
Static function to check if given info will lead to a valid configuration of CLConvolutionLayerReshapeWeights. More... | |
Function to reshape and transpose the weights.
This function calls the following kernels:
Definition at line 52 of file CLGEMMConvolutionLayer.h.
Constructor.
Definition at line 59 of file CLGEMMConvolutionLayer.cpp.
References CLConvolutionLayerReshapeWeights::~CLConvolutionLayerReshapeWeights().
|
delete |
Prevent instances of this class from being copied.
|
default |
Default move constructor.
|
default |
Default destructor.
Referenced by CLConvolutionLayerReshapeWeights::CLConvolutionLayerReshapeWeights().
void configure | ( | const ICLTensor * | weights, |
const ICLTensor * | biases, | ||
ICLTensor * | output, | ||
unsigned int | num_groups = 1 |
||
) |
Set the input and output tensors.
[in] | weights | Weights tensor. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. Data type supported: QASYMM8/QASYMM8_SIGNED/QSYMM8_PER_CHANNEL/F16/F32. |
[in] | biases | Biases tensor. Shared biases supported. Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as weights . |
[out] | output | Destination tensor. Data types supported: Same as weights . |
[in] | num_groups | (Optional) Number of groups when performing a grouped convolution. num_groups != 1 is only supported for NCHW data layout |
Definition at line 66 of file CLGEMMConvolutionLayer.cpp.
References CLKernelLibrary::get().
Referenced by CLConvolutionLayerReshapeWeightsTransform::configure(), and CLGEMMConvolutionLayer::configure().
void configure | ( | const CLCompileContext & | compile_context, |
const ICLTensor * | weights, | ||
const ICLTensor * | biases, | ||
ICLTensor * | output, | ||
unsigned int | num_groups = 1 |
||
) |
Set the input and output tensors.
[in] | compile_context | The compile context to be used. |
[in] | weights | Weights tensor. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. Data type supported: QASYMM8/QASYMM8_SIGNED/QSYMM8_PER_CHANNEL/F16/F32. |
[in] | biases | Biases tensor. Shared biases supported. Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as weights . |
[out] | output | Destination tensor. Data types supported: Same as weights . |
[in] | num_groups | (Optional) Number of groups when performing a grouped convolution. num_groups != 1 is only supported for NCHW data layout |
Definition at line 71 of file CLGEMMConvolutionLayer.cpp.
References ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_THROW_ON, ITensorInfo::data_type(), ITensor::info(), arm_compute::is_data_type_quantized_asymmetric(), arm_compute::test::validation::num_groups, ITensorInfo::quantization_info(), ITensorInfo::set_quantization_info(), and CLConvolutionLayerReshapeWeights::validate().
|
delete |
Prevent instances of this class from being copied.
|
default |
Default move assignment operator.
|
overridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 113 of file CLGEMMConvolutionLayer.cpp.
References CLScheduler::enqueue(), and CLScheduler::get().
Referenced by CLGEMMConvolutionLayer::prepare().
|
static |
Static function to check if given info will lead to a valid configuration of CLConvolutionLayerReshapeWeights.
[in] | weights | Weights tensor. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. Data type supported: QASYMM8/QASYMM8_SIGNED/QSYMM8_PER_CHANNEL/F16/F32. |
[in] | biases | Biases tensor. Shared biases supported. Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as weights . |
[in] | output | Destination tensor. Data types supported: Same as weights . |
[in] | num_groups | (Optional) Number of groups when performing a grouped convolution. num_groups != 1 is only supported for NCHW data layout |
Definition at line 88 of file CLGEMMConvolutionLayer.cpp.
References ARM_COMPUTE_RETURN_ERROR_ON, ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN, ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES, ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, arm_compute::BATCHES, ITensorInfo::data_layout(), ITensorInfo::data_type(), ITensorInfo::dimension(), arm_compute::F16, arm_compute::F32, arm_compute::get_data_layout_dimension_index(), arm_compute::is_data_type_quantized(), ITensorInfo::num_dimensions(), arm_compute::QASYMM8, arm_compute::QASYMM8_SIGNED, arm_compute::QSYMM8_PER_CHANNEL, ITensorInfo::total_size(), and CLWeightsReshapeKernel::validate().
Referenced by CLConvolutionLayerReshapeWeights::configure(), and CLGEMMConvolutionLayer::validate().