21.02
|
Neon kernel to perform layer normalization. More...
#include <NEQLSTMLayerNormalizationKernel.h>
Public Member Functions | |
const char * | name () const override |
Name of the kernel. More... | |
NEQLSTMLayerNormalizationKernel ()=default | |
Default constructor. More... | |
NEQLSTMLayerNormalizationKernel (const NEQLSTMLayerNormalizationKernel &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEQLSTMLayerNormalizationKernel & | operator= (const NEQLSTMLayerNormalizationKernel &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEQLSTMLayerNormalizationKernel (NEQLSTMLayerNormalizationKernel &&)=default | |
Default Move Constructor. More... | |
NEQLSTMLayerNormalizationKernel & | operator= (NEQLSTMLayerNormalizationKernel &&)=default |
Default move assignment operator. More... | |
~NEQLSTMLayerNormalizationKernel ()=default | |
Default destructor. More... | |
void | configure (const ITensor *input, ITensor *output, const ITensor *weight, const ITensor *bias) |
Set the input and output tensors. 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 *output, const ITensorInfo *weight, const ITensorInfo *bias) |
Static function to check if given info will lead to a valid configuration of NEQLSTMLayerNormalizationKernel. More... | |
Neon kernel to perform layer normalization.
Definition at line 35 of file NEQLSTMLayerNormalizationKernel.h.
|
default |
Default constructor.
Referenced by NEQLSTMLayerNormalizationKernel::name().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default Move Constructor.
|
default |
Default destructor.
Referenced by NEQLSTMLayerNormalizationKernel::name().
void configure | ( | const ITensor * | input, |
ITensor * | output, | ||
const ITensor * | weight, | ||
const ITensor * | bias | ||
) |
Set the input and output tensors.
[in] | input | Source tensor. Data types supported: QSYMM16. |
[out] | output | Destination tensor. Data types supported: Same as input . |
[in] | weight | Weight tensor. Data types supported: Same as input . |
[in] | bias | Bias tensor. Data types supported: S32 |
Definition at line 84 of file NEQLSTMLayerNormalizationKernel.cpp.
References ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_THROW_ON, ITensor::info(), arm_compute::test::validation::input, arm_compute::QSYMM16, and arm_compute::validate().
Referenced by NEQLSTMLayerNormalizationKernel::name().
|
inlineoverridevirtual |
Name of the kernel.
Implements ICPPKernel.
Definition at line 38 of file NEQLSTMLayerNormalizationKernel.h.
References NEQLSTMLayerNormalizationKernel::configure(), arm_compute::test::validation::info, arm_compute::test::validation::input, NEQLSTMLayerNormalizationKernel::NEQLSTMLayerNormalizationKernel(), NEQLSTMLayerNormalizationKernel::operator=(), NEQLSTMLayerNormalizationKernel::run(), NEQLSTMLayerNormalizationKernel::validate(), IKernel::window(), and NEQLSTMLayerNormalizationKernel::~NEQLSTMLayerNormalizationKernel().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
Referenced by NEQLSTMLayerNormalizationKernel::name().
|
default |
Default move assignment operator.
|
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 166 of file NEQLSTMLayerNormalizationKernel.cpp.
References ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW, ARM_COMPUTE_ERROR_ON_MSG, ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL, ARM_COMPUTE_UNUSED, arm_compute::quantization::multiply_by_quantized_multiplier(), arm_compute::multiply_by_quantized_multiplier_2row(), arm_compute::wrapper::vadd(), arm_compute::wrapper::vcombine(), arm_compute::wrapper::vdup_n(), arm_compute::wrapper::vgethigh(), arm_compute::wrapper::vgetlane(), arm_compute::wrapper::vgetlow(), arm_compute::wrapper::vloadq(), arm_compute::wrapper::vmovl(), arm_compute::wrapper::vmovn(), arm_compute::wrapper::vmul(), arm_compute::wrapper::vpaddl(), arm_compute::wrapper::vqmovn(), arm_compute::wrapper::vstore(), arm_compute::wrapper::vsub(), and IKernel::window().
Referenced by NEQLSTMLayerNormalizationKernel::name().
|
static |
Static function to check if given info will lead to a valid configuration of NEQLSTMLayerNormalizationKernel.
[in] | input | Source tensor info. Data types supported: QSYMM16. |
[in] | output | Destination tensor info. Data types supported: Same as input . |
[in] | weight | Weight tensor info. Data types supported: Same as input . |
[in] | bias | Bias tensor info. Data types supported: S32 |
Definition at line 140 of file NEQLSTMLayerNormalizationKernel.cpp.
References ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_RETURN_ERROR_ON, ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN, ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES, ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES, ARM_COMPUTE_UNUSED, ITensorInfo::num_dimensions(), arm_compute::QSYMM16, arm_compute::S32, ITensorInfo::tensor_shape(), ITensorInfo::total_size(), and Dimensions< T >::x().
Referenced by NEQLSTMLayerNormalizationKernel::name().