21.02
|
Neon kernel to accumulate the biases, if provided, or downscale in case of quantized input. More...
#include <NEDirectConvolutionLayerOutputStageKernel.h>
Public Member Functions | |
const char * | name () const override |
Name of the kernel. More... | |
NEDirectConvolutionLayerOutputStageKernel () | |
Default constructor. More... | |
NEDirectConvolutionLayerOutputStageKernel (const NEDirectConvolutionLayerOutputStageKernel &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEDirectConvolutionLayerOutputStageKernel & | operator= (const NEDirectConvolutionLayerOutputStageKernel &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEDirectConvolutionLayerOutputStageKernel (NEDirectConvolutionLayerOutputStageKernel &&)=default | |
Allow instances of this class to be moved. More... | |
NEDirectConvolutionLayerOutputStageKernel & | operator= (NEDirectConvolutionLayerOutputStageKernel &&)=default |
Allow instances of this class to be moved. More... | |
~NEDirectConvolutionLayerOutputStageKernel ()=default | |
Default destructor. More... | |
void | configure (ITensor *input, const ITensor *bias=nullptr, ITensor *output=nullptr, const DirectConvolutionLayerOutputStageKernelInfo &info=DirectConvolutionLayerOutputStageKernelInfo()) |
Set the accumulate buffer and the biases of the kernel. More... | |
void | run (const Window &window, const ThreadInfo &info) override |
Execute the kernel on the passed window. 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... | |
virtual BorderSize | border_size () const |
The size of the border for that kernel. 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 *bias=nullptr, const ITensorInfo *output=nullptr, const DirectConvolutionLayerOutputStageKernelInfo &info=DirectConvolutionLayerOutputStageKernelInfo()) |
Static function to check if given info will lead to a valid configuration of NEDirectConvolutionLayerOutputStageKernel. More... | |
Neon kernel to accumulate the biases, if provided, or downscale in case of quantized input.
input
of S32 type) the output data type for auto-initialization must be passed as part of the DirectConvolutionLayerOutputStageKernelInfo. Definition at line 39 of file NEDirectConvolutionLayerOutputStageKernel.h.
Default constructor.
Definition at line 380 of file NEDirectConvolutionLayerOutputStageKernel.cpp.
Referenced by NEDirectConvolutionLayerOutputStageKernel::name().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
Allow instances of this class to be moved.
|
default |
Default destructor.
Referenced by NEDirectConvolutionLayerOutputStageKernel::name().
void configure | ( | ITensor * | input, |
const ITensor * | bias = nullptr , |
||
ITensor * | output = nullptr , |
||
const DirectConvolutionLayerOutputStageKernelInfo & | info = DirectConvolutionLayerOutputStageKernelInfo() |
||
) |
Set the accumulate buffer and the biases of the kernel.
[in,out] | input | Input to add the bias to. If output is not specified then accumulation is done in-place. Data type supported: F16/F32/S32 |
[in] | bias | (Optional) The shared bias tensor to add. It must be 1D Tensor. Data type supported: Same as input |
[out] | output | (Optional) If the output tensor is specified the accumulation is done out-of-place. (Defaults to nullptr) Note that in-place computation is only supported for F16/F32. For S32 this must not be nullptr. Data type supported: F16/F32 or QASYMM8/QASYMM8_SIGNED if input is S32 |
[in] | info | (Optional) DirectConvolutionLayerOutputStageKernel descriptor metadata |
Definition at line 385 of file NEDirectConvolutionLayerOutputStageKernel.cpp.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_THROW_ON, arm_compute::auto_init_if_empty(), arm_compute::calculate_max_window(), ICloneable< T >::clone(), ITensorInfo::data_layout(), ITensorInfo::data_type(), arm_compute::F16, arm_compute::F32, ITensor::info(), arm_compute::test::validation::info, arm_compute::test::validation::input, arm_compute::is_data_type_quantized_asymmetric_signed(), arm_compute::NCHW, ITensorInfo::num_dimensions(), DirectConvolutionLayerOutputStageKernelInfo::output_data_type, DirectConvolutionLayerOutputStageKernelInfo::result_fixedpoint_multiplier, DirectConvolutionLayerOutputStageKernelInfo::result_offset_after_shift, DirectConvolutionLayerOutputStageKernelInfo::result_shift, arm_compute::S32, Dimensions< T >::set_num_dimensions(), ITensorInfo::set_valid_region(), ITensorInfo::tensor_shape(), ITensorInfo::total_size(), and arm_compute::validate_arguments().
Referenced by NEDirectConvolutionLayerOutputStageKernel::name().
|
inlineoverridevirtual |
Name of the kernel.
Implements ICPPKernel.
Definition at line 42 of file NEDirectConvolutionLayerOutputStageKernel.h.
References NEDirectConvolutionLayerOutputStageKernel::configure(), arm_compute::test::validation::has_bias, arm_compute::test::validation::info, arm_compute::test::validation::input, NEDirectConvolutionLayerOutputStageKernel::NEDirectConvolutionLayerOutputStageKernel(), NEDirectConvolutionLayerOutputStageKernel::operator=(), NEDirectConvolutionLayerOutputStageKernel::run(), NEDirectConvolutionLayerOutputStageKernel::validate(), IKernel::window(), and NEDirectConvolutionLayerOutputStageKernel::~NEDirectConvolutionLayerOutputStageKernel().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
Referenced by NEDirectConvolutionLayerOutputStageKernel::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 505 of file NEDirectConvolutionLayerOutputStageKernel.cpp.
References ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW, ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL, ARM_COMPUTE_UNUSED, arm_compute::test::validation::has_bias, and IKernel::window().
Referenced by NEDirectConvolutionLayerOutputStageKernel::name().
|
static |
Static function to check if given info will lead to a valid configuration of NEDirectConvolutionLayerOutputStageKernel.
[in] | input | Input to add the bias to. If output is not specified then accumulation is done in-place. Data type supported: F16/F32/S32 |
[in] | bias | (Optional) The shared bias tensor to add. It must be 1D Tensor. Data type supported: Same as input |
[in] | output | (Optional) If the output tensor is specified the accumulation is done out-of-place. (Defaults to nullptr) Note that in-place computation is only supported for F16/F32. For S32 this must not be nullptr. Data type supported: F16/F32 or QASYMM8/QASYMM8_SIGNED if input is S32 |
[in] | info | (Optional) DirectConvolutionLayerOutputStageKernel descriptor metadata |
Definition at line 497 of file NEDirectConvolutionLayerOutputStageKernel.cpp.
References ARM_COMPUTE_RETURN_ON_ERROR, and arm_compute::validate_arguments().
Referenced by NEDirectConvolutionLayerOutputStageKernel::name(), and NEDirectConvolutionLayer::validate().