23.11
|
Function to execute a depthwise convolution. More...
#include <CpuDepthwiseConv2d.h>
Public Member Functions | |
CpuDepthwiseConv2d ()=default | |
Default constructor. More... | |
void | configure (ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *biases, ITensorInfo *dst, const ConvolutionInfo &info) |
Initialize the function's source, destination, weights and convolution information. More... | |
void | run (ITensorPack &tensors) override |
Run the kernels contained in the function. More... | |
void | prepare (ITensorPack &tensors) override |
Prepare the function for executing. More... | |
![]() | |
INEOperator (IRuntimeContext *ctx=nullptr) | |
Constructor. More... | |
INEOperator (const INEOperator &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
INEOperator (INEOperator &&)=default | |
Default move constructor. More... | |
INEOperator & | operator= (const INEOperator &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
INEOperator & | operator= (INEOperator &&)=default |
Default move assignment operator. More... | |
~INEOperator () | |
Default destructor. More... | |
MemoryRequirements | workspace () const override |
Return the memory requirements required by the workspace. More... | |
![]() | |
virtual | ~IOperator ()=default |
Destructor. More... | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *dst, const ConvolutionInfo &info) |
Static function to check if given info will lead to a valid configuration. More... | |
static DepthwiseConvolutionFunction | get_depthwiseconvolution_function (const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *biases, const ITensorInfo *dst, const ConvolutionInfo &info) |
Static function to choose the best depthwise convolution function for CpuDepthwiseConv2d. More... | |
Function to execute a depthwise convolution.
Definition at line 45 of file CpuDepthwiseConv2d.h.
|
default |
Default constructor.
void configure | ( | ITensorInfo * | src, |
const ITensorInfo * | weights, | ||
const ITensorInfo * | biases, | ||
ITensorInfo * | dst, | ||
const ConvolutionInfo & | info | ||
) |
Initialize the function's source, destination, weights and convolution information.
[in,out] | src | Source tensor info. Data type supported: QASYMM8/QASYMM8_SIGNED/F16/F32 |
[out] | dst | Destination tensor info. Data type supported: same as src . |
[in] | weights | Weights tensor info. These are 3D tensor infos with shape [kernel_x, kernel_y, IFM]. Data type supported: Same as src or QASYMM8/QASYMM8_SIGNED/QSYMM8_PER_CHANNEL when src is QASYMM8/QASYMM8_SIGNED. |
[in] | biases | Biases tensor info. A 1D tensor with shape [IFM]. Must be nullptr if not needed. Data type supported: Same as src , S32 when src is QASYMM8/QASYMM8_SIGNED. |
[in] | info | Depthwise convolution meta-data. |
Definition at line 479 of file CpuDepthwiseConv2d.cpp.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_LOG_PARAMS, arm_compute::test::validation::dst, arm_compute::GENERIC, CpuDepthwiseConv2d::get_depthwiseconvolution_function(), arm_compute::test::validation::info, arm_compute::OPTIMIZED, and arm_compute::test::validation::src.
|
static |
Static function to choose the best depthwise convolution function for CpuDepthwiseConv2d.
[in] | src | Source tensor info. Data type supported: QASYMM8/QASYMM8_SIGNED/F16/F32 |
[in] | weights | Weights tensor info. These are 3D tensors with shape [kernel_x, kernel_y, IFM]. Data type supported: Same as src or QASYMM8/QASYMM8_SIGNED/QSYMM8_PER_CHANNEL when src is QASYMM8/QASYMM8_SIGNED. |
[in] | biases | Biases tensor info. A 1D tensor with shape [IFM]. Must be nullptr if not needed. Data type supported: Same as src , S32 when src is QASYMM8/QASYMM8_SIGNED. |
[in] | dst | Destination tensor. Data type supported: same as src . |
[in] | info | Depthwise convolution meta-data. |
Definition at line 522 of file CpuDepthwiseConv2d.cpp.
References arm_compute::test::validation::dst, arm_compute::GENERIC, arm_compute::test::validation::info, arm_compute::OPTIMIZED, arm_compute::test::validation::src, and arm_compute::validate().
Referenced by CpuDepthwiseConv2d::configure(), and CpuDepthwiseConv2d::validate().
|
overridevirtual |
Prepare the function for executing.
Any one off pre-processing step required by the function is handled here
[in] | constants | Vector that contains the constants tensors. |
Reimplemented from INEOperator.
Definition at line 553 of file CpuDepthwiseConv2d.cpp.
References ARM_COMPUTE_ERROR, arm_compute::GENERIC, and arm_compute::OPTIMIZED.
|
overridevirtual |
Run the kernels contained in the function.
[in] | tensors | Vector that contains the tensors to operate on. |
Reimplemented from INEOperator.
Definition at line 538 of file CpuDepthwiseConv2d.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.
Similar to CpuDepthwiseConv2d::configure()
Definition at line 502 of file CpuDepthwiseConv2d.cpp.
References ARM_COMPUTE_ERROR, arm_compute::test::validation::dst, arm_compute::GENERIC, CpuDepthwiseConv2d::get_depthwiseconvolution_function(), arm_compute::test::validation::info, arm_compute::OPTIMIZED, arm_compute::test::validation::src, and arm_compute::validate().
Referenced by NEDepthwiseConvolutionLayer::validate().