24.02.1
|
#include <CpuGemmDirectConv2d.h>
Public Member Functions | |
CpuGemmDirectConv2d () | |
ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE (CpuGemmDirectConv2d) | |
~CpuGemmDirectConv2d () | |
void | configure (const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *biases, ITensorInfo *dst, const Conv2dInfo &info) |
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... | |
Public Member Functions inherited from INEOperator | |
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... | |
Public Member Functions inherited from IOperator | |
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 Conv2dInfo &info) |
Static function to check if given info will lead to a valid configuration of CpuGemmDirectConv2d. More... | |
Definition at line 42 of file CpuGemmDirectConv2d.h.
Definition at line 99 of file CpuGemmDirectConv2d.cpp.
|
default |
ARM_COMPUTE_DISALLOW_COPY_ALLOW_MOVE | ( | CpuGemmDirectConv2d | ) |
void configure | ( | const ITensorInfo * | src, |
const ITensorInfo * | weights, | ||
const ITensorInfo * | biases, | ||
ITensorInfo * | dst, | ||
const Conv2dInfo & | info | ||
) |
Set the input and output tensors.
Valid data layouts:
Valid data type configurations:
src0 | src1 | src2 | dst |
---|---|---|---|
QASYMM8 | QASYMM8 | S32 | QASYMM8 |
QASYMM8_SIGNED | QASYMM8_SIGNED | S32 | QASYMM8_SIGNED |
F16 | F16 | F16 | F16 |
F32 | F32 | F32 | F32 |
BFLOAT16 | BFLOAT16 | BFLOAT16 | BFLOAT16 |
[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: QASYMM8/QASYMM8_SIGNED/BFLOAT16/F16/F32. |
[in] | weights | Weights tensor info. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. Data type supported: QASYMM8/QASYMM8_SIGNED/QSYMM8_PER_CHANNEL/BFLOAT16/F16/F32. |
[in] | biases | Biases tensor info. Shared biases supported. Biases are 1D tensor with dimensions [OFM]. Data type supported: Should match input data type, except for input of QASYMM8/QASYMM8_SIGNED type where biases should be of S32 type. |
[in] | 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] | info | Contains padding and stride information described in PadStrideInfo. |
Definition at line 112 of file CpuGemmDirectConv2d.cpp.
References ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_THROW_ON, ARM_COMPUTE_LOG_PARAMS, arm_compute::test::validation::dst, arm_compute::test::validation::info, arm_compute::is_data_type_quantized(), arm_compute::offset_int_vec(), AsmGemmInfo::output_stage, arm_compute::experimental::Prepare, arm_compute::test::validation::src, ITensorInfo::total_size(), arm_compute::UNSPECIFIED, and CpuGemmDirectConv2d::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 223 of file CpuGemmDirectConv2d.cpp.
References arm_compute::ACL_DST, arm_compute::ACL_SRC, arm_compute::ACL_SRC_1, ITensorPack::add_const_tensor(), ARM_COMPUTE_ERROR_ON_NULLPTR, CpuAuxTensorHandler::get(), ITensorPack::get_const_tensor(), ITensorPack::get_tensor(), and arm_compute::offset_int_vec().
Referenced by CpuGemmDirectConv2d::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 210 of file CpuGemmDirectConv2d.cpp.
References arm_compute::ACL_DST, arm_compute::ACL_SRC, ITensorPack::get_tensor(), arm_compute::test::validation::pack, and CpuGemmDirectConv2d::prepare().
|
static |
Static function to check if given info will lead to a valid configuration of CpuGemmDirectConv2d.
Similar to CpuGemmDirectConv2d::configure()
Definition at line 163 of file CpuGemmDirectConv2d.cpp.
References ARM_COMPUTE_RETURN_ERROR_ON, ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN, ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_LAYOUT, ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES, ARM_COMPUTE_RETURN_ERROR_ON_MSG, ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, ARM_COMPUTE_RETURN_ON_ERROR, arm_compute::BFLOAT16, arm_compute::test::validation::data_type, ITensorInfo::dimension(), arm_compute::test::validation::dst, arm_compute::F16, arm_compute::F32, arm_compute::test::validation::info, arm_compute::is_data_type_quantized_asymmetric(), arm_compute::is_fixed_format(), arm_compute::NHWC, ITensorInfo::num_dimensions(), arm_compute::QASYMM8, arm_compute::QASYMM8_SIGNED, arm_compute::QSYMM8_PER_CHANNEL, arm_compute::S32, arm_compute::test::validation::src, ITensorInfo::tensor_shape(), arm_compute::utils::cast::U, and CpuGemmAssemblyDispatch::validate().
Referenced by CpuGemmDirectConv2d::configure(), CpuConv2d::get_convolution_method(), and CpuConv2d::validate().
|
overridevirtual |
Return the memory requirements required by the workspace.
Reimplemented from INEOperator.
Definition at line 251 of file CpuGemmDirectConv2d.cpp.