23.08
|
#include <CpuWinogradConv2d.h>
Public Member Functions | |
CpuWinogradConv2d () | |
Constructor. More... | |
ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE (CpuWinogradConv2d) | |
~CpuWinogradConv2d () | |
Destructor. More... | |
void | configure (const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *biases, ITensorInfo *dst, const PadStrideInfo &conv_info, const ActivationLayerInfo &act_info=ActivationLayerInfo(), bool enable_fast_math=false) |
Set the input and output tensors. More... | |
void | run (ITensorPack &tensors) override |
Run the kernels contained in the function. More... | |
void | prepare (ITensorPack &constants) override |
Prepare the function for executing. More... | |
experimental::MemoryRequirements | workspace () const override |
Return the memory requirements required by the workspace. 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... | |
![]() | |
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 PadStrideInfo &conv_info, const ActivationLayerInfo &act_info=ActivationLayerInfo(), bool enable_fast_math=false) |
Static function to check if given info will lead to a valid configuration of CpuWinogradConv2d. More... | |
Definition at line 42 of file CpuWinogradConv2d.h.
|
default |
Destructor.
ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE | ( | CpuWinogradConv2d | ) |
void configure | ( | const ITensorInfo * | src, |
const ITensorInfo * | weights, | ||
const ITensorInfo * | biases, | ||
ITensorInfo * | dst, | ||
const PadStrideInfo & | conv_info, | ||
const ActivationLayerInfo & | act_info = ActivationLayerInfo() , |
||
bool | enable_fast_math = false |
||
) |
Set the input and output tensors.
Valid data layouts:
Valid data type configurations:
src0 | src1 | src2 | dst |
---|---|---|---|
F16 | F16 | F16 | F16 |
F32 | F32 | F32 | F32 |
[in] | src | Source tensor Info. 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: F16/F32. |
[in] | weights | Weights tensor Info. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. Data type supported: Same as input . Currently only 3x3 and 5x5 kernels are supported. |
[in] | biases | Biases tensor Info. Shared biases supported. Biases are 1D tensor with dimensions [OFM]. Data type supported: Same as weights . |
[out] | dst | Destination tensor Info. 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. Currently only unit strides are supported. |
[in] | act_info | (Optional) Activation layer information in case of a fused activation. |
[in] | enable_fast_math | (Optional) Enable fast math computation. In case this flag were set, the function could dispatch the fastest implementation available which may introduce a drop of accuracy as well. Default is false |
Definition at line 162 of file CpuWinogradConv2d.cpp.
References arm_compute::test::validation::act_info, ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_THROW_ON, ARM_COMPUTE_EXIT_ON_MSG_VAR, ARM_COMPUTE_LOG_MSG_WITH_FORMAT_ACL, ARM_COMPUTE_LOG_PARAMS, ARM_COMPUTE_UNUSED, arm_compute::test::validation::conv_info, arm_compute::test::validation::data_type, arm_compute::test::validation::dst, Scheduler::get(), arm_compute::logging::INFO, arm_compute::test::validation::info, TensorInfo::init(), arm_compute::test::validation::k, arm_compute::test::validation::m, arm_compute::test::validation::n, arm_compute::NCHW, IScheduler::num_threads(), arm_compute::offset_int_vec(), arm_compute::experimental::Prepare, Dimensions< T >::set(), arm_compute::test::validation::src, TensorInfo::total_size(), arm_compute::utils::cast::U, arm_compute::U8, and CpuWinogradConv2d::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 374 of file CpuWinogradConv2d.cpp.
References arm_compute::ACL_DST, arm_compute::ACL_SRC, arm_compute::ACL_SRC_1, ITensorPack::add_const_tensor(), ARM_COMPUTE_ERROR_ON_NULLPTR, ITensor::buffer(), ITensorInfo::element_size(), CpuAuxTensorHandler::get(), ITensorPack::get_const_tensor(), ITensorPack::get_tensor(), ITensor::info(), ITensorInfo::offset_first_element_in_bytes(), arm_compute::offset_int_vec(), and ITensorInfo::strides_in_bytes().
Referenced by CpuWinogradConv2d::run().
|
overridevirtual |
Run the kernels contained in the function.
[in] | tensors | Vector that contains the tensors to operate on. |
Reimplemented from INEOperator.
Definition at line 316 of file CpuWinogradConv2d.cpp.
References arm_compute::ACL_BIAS, arm_compute::ACL_DST, arm_compute::ACL_INT, arm_compute::ACL_SRC, arm_compute::ACL_SRC_0, arm_compute::ACL_SRC_1, arm_compute::ACL_SRC_2, ITensorPack::add_const_tensor(), ITensorPack::add_tensor(), Window::DimX, Scheduler::get(), CpuAuxTensorHandler::get(), ITensorPack::get_const_tensor(), ITensorPack::get_tensor(), arm_compute::NCHW, IScheduler::num_threads(), arm_compute::offset_int_vec(), arm_compute::test::validation::pack, CpuWinogradConv2d::prepare(), IScheduler::schedule_op(), Window::set(), and arm_compute::test::validation::src.
|
static |
Static function to check if given info will lead to a valid configuration of CpuWinogradConv2d.
Similar to CpuWinogradConv2d::configure()
Definition at line 291 of file CpuWinogradConv2d.cpp.
References arm_compute::test::validation::act_info, ARM_COMPUTE_LOG_MSG_WITH_FORMAT_ACL, ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN, ARM_COMPUTE_RETURN_ERROR_ON_MSG_VAR, ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, ARM_COMPUTE_RETURN_ON_ERROR, arm_compute::test::validation::conv_info, arm_compute::test::validation::dst, arm_compute::F32, arm_compute::logging::INFO, arm_compute::test::validation::src, and arm_compute::cpu::kernels::validate_arguments().
Referenced by CpuWinogradConv2d::configure(), CpuConv2d::get_convolution_method(), NEWinogradConvolutionLayer::validate(), and CpuConv2d::validate().
|
overridevirtual |
Return the memory requirements required by the workspace.
Reimplemented from INEOperator.
Definition at line 422 of file CpuWinogradConv2d.cpp.