21.02
|
Neon interface for Direct Convolution Layer kernel. More...
#include <NEDirectConvolutionLayerKernel.h>
Public Member Functions | |
const char * | name () const override |
Name of the kernel. More... | |
NEDirectConvolutionLayerKernel () | |
Default constructor. More... | |
NEDirectConvolutionLayerKernel (const NEDirectConvolutionLayerKernel &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEDirectConvolutionLayerKernel & | operator= (const NEDirectConvolutionLayerKernel &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEDirectConvolutionLayerKernel (NEDirectConvolutionLayerKernel &&)=default | |
Allow instances of this class to be moved. More... | |
NEDirectConvolutionLayerKernel & | operator= (NEDirectConvolutionLayerKernel &&)=default |
Allow instances of this class to be moved. More... | |
~NEDirectConvolutionLayerKernel ()=default | |
Default destructor. More... | |
void | configure (const ITensor *input, const ITensor *weights, ITensor *output, const PadStrideInfo &conv_info) |
Set the input, weights, and output tensors. More... | |
void | run (const Window &window, const ThreadInfo &info) override |
Execute the kernel on the passed window. More... | |
BorderSize | border_size () const override |
The size of the border for that kernel. More... | |
Public Member Functions inherited from ICPPKernel | |
virtual | ~ICPPKernel ()=default |
Default destructor. More... | |
virtual void | run_nd (const Window &window, const ThreadInfo &info, const Window &thread_locator) |
legacy compatibility layer for implemantions which do not support thread_locator In these cases we simply narrow the interface down the legacy version More... | |
virtual void | run_op (ITensorPack &tensors, const Window &window, const ThreadInfo &info) |
Execute the kernel on the passed window. More... | |
Public Member Functions inherited from IKernel | |
IKernel () | |
Constructor. More... | |
virtual | ~IKernel ()=default |
Destructor. More... | |
virtual bool | is_parallelisable () const |
Indicates whether or not the kernel is parallelisable. More... | |
const Window & | window () const |
The maximum window the kernel can be executed on. More... | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *input, const ITensorInfo *weights, const ITensorInfo *output, const PadStrideInfo &conv_info) |
Static function to check if given info will lead to a valid configuration of NEDirectConvolutionLayerKernel. More... | |
Neon interface for Direct Convolution Layer kernel.
Definition at line 34 of file NEDirectConvolutionLayerKernel.h.
Default constructor.
Definition at line 1221 of file NEDirectConvolutionLayerKernel.cpp.
Referenced by NEDirectConvolutionLayerKernel::name().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Allow instances of this class to be moved.
|
default |
Default destructor.
Referenced by NEDirectConvolutionLayerKernel::name().
|
overridevirtual |
The size of the border for that kernel.
Reimplemented from IKernel.
Definition at line 1227 of file NEDirectConvolutionLayerKernel.cpp.
Referenced by NEDirectConvolutionLayerKernel::name(), and NEDirectConvolutionLayerKernel::validate().
void configure | ( | const ITensor * | input, |
const ITensor * | weights, | ||
ITensor * | output, | ||
const PadStrideInfo & | conv_info | ||
) |
Set the input, weights, and output tensors.
[in] | input | The input tensor to convolve. 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. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. The 3rd dimension must be the same as the input's volume 3rd dimension. Data type supported:Same as input . |
[out] | output | Output tensor. The 3rd dimensions must be equal to the 4th dimension of the kernels tensor. Data types supported: F16/F32 |
[in] | conv_info | Contains padding and stride information described in PadStrideInfo. |
Definition at line 1232 of file NEDirectConvolutionLayerKernel.cpp.
References ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_THROW_ON, arm_compute::auto_init_if_empty(), arm_compute::misc::shape_calculator::compute_deep_convolution_shape(), arm_compute::test::validation::conv_info, ITensorInfo::data_layout(), arm_compute::test::validation::data_type, ITensorInfo::data_type(), ITensorInfo::dimension(), arm_compute::get_data_layout_dimension_index(), ITensor::info(), arm_compute::test::validation::input, arm_compute::NCHW, arm_compute::test::validation::output_shape, PadStrideInfo::pad_bottom(), PadStrideInfo::pad_left(), PadStrideInfo::pad_right(), PadStrideInfo::pad_top(), arm_compute::validate_arguments(), and arm_compute::WIDTH.
Referenced by NEDirectConvolutionLayerKernel::name().
|
inlineoverridevirtual |
Name of the kernel.
Implements ICPPKernel.
Definition at line 37 of file NEDirectConvolutionLayerKernel.h.
References NEDirectConvolutionLayerKernel::border_size(), NEDirectConvolutionLayerKernel::configure(), arm_compute::test::validation::conv_info, arm_compute::test::validation::info, arm_compute::test::validation::input, NEDirectConvolutionLayerKernel::NEDirectConvolutionLayerKernel(), NEDirectConvolutionLayerKernel::operator=(), NEDirectConvolutionLayerKernel::run(), NEDirectConvolutionLayerKernel::validate(), IKernel::window(), and NEDirectConvolutionLayerKernel::~NEDirectConvolutionLayerKernel().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
Referenced by NEDirectConvolutionLayerKernel::name().
|
default |
Allow instances of this class to be moved.
|
overridevirtual |
Execute the kernel on the passed window.
[in] | window | Region on which to execute the kernel. (Must be a region of the window returned by window()) |
[in] | info | Info about executing thread and CPU. |
Reimplemented from ICPPKernel.
Definition at line 1293 of file NEDirectConvolutionLayerKernel.cpp.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW, ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL, ARM_COMPUTE_UNUSED, ITensor::buffer(), ITensorInfo::data_layout(), ITensorInfo::data_type(), ITensorInfo::dimension(), arm_compute::F16, arm_compute::F32, arm_compute::get_data_layout_dimension_index(), ITensor::info(), arm_compute::NCHW, arm_compute::WIDTH, and IKernel::window().
Referenced by NEDirectConvolutionLayerKernel::name().
|
static |
Static function to check if given info will lead to a valid configuration of NEDirectConvolutionLayerKernel.
[in] | input | The input tensor to convolve. 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. Weights are 4D tensor with dimensions [kernel_x, kernel_y, IFM, OFM]. The 3rd dimension must be the same as the input's volume 3rd dimension. Data type supported:Same as input . |
[in] | output | Output tensor. The 3rd dimensions must be equal to the 4th dimension of the kernels tensor. Data types supported: F16/F32 |
[in] | conv_info | Contains padding and stride information described in PadStrideInfo. |
Definition at line 1273 of file NEDirectConvolutionLayerKernel.cpp.
References ARM_COMPUTE_RETURN_ON_ERROR, NEDirectConvolutionLayerKernel::border_size(), ICloneable< T >::clone(), arm_compute::test::validation::conv_info, and arm_compute::validate_arguments().
Referenced by NEDirectConvolutionLayerKernel::name(), and NEDirectConvolutionLayer::validate().