23.08
|
Go to the documentation of this file.
24 #ifndef ARM_COMPUTE_NEQLSTMLAYERNORMALIZATIONKERNEL_H
25 #define ARM_COMPUTE_NEQLSTMLAYERNORMALIZATIONKERNEL_H
38 const char *
name()
const override
40 return "NEQLSTMLayerNormalizationKernel";
78 static constexpr uint32_t max_input_dimension{ 2 };
79 static constexpr uint32_t max_weight_dimension{ 1 };
80 static constexpr uint32_t max_bias_dimension{ 1 };
81 static constexpr uint32_t vector_size_byte{ 16 };
85 ComputeFuncType _fn{};
91 const ITensor *_weight
99 ITensor *_output{
nullptr };
101 int32_t _output_multiplier{};
102 int32_t _output_shift{};
104 int32_t _window_start_x{};
105 int32_t _window_end_x{};
106 int32_t _window_step_x{};
108 Window _inout_window{};
109 Window _weight_window{};
117 Window configure_window(ITensor *target);
119 void compute_qsymm16();
125 std::pair<int64_t, int64_t> sum_qsymm16(
const int16_t *input_ptr);
137 void normalize_qasymm16(
const int16_t *input_ptr,
139 const int16_t *weight_ptr,
140 const int32_t *bias_ptr,
141 int32_t mean, int32_t inv_std_mul, int32_t inv_std_shift);
143 QuantizationInfo compute_output_qinfo();
~NEQLSTMLayerNormalizationKernel()=default
Default destructor.
NEQLSTMLayerNormalizationKernel & operator=(const NEQLSTMLayerNormalizationKernel &)=delete
Prevent instances of this class from being copied (As this class contains pointers)
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 NEQLSTMLayerNormalizatio...
Interface for CPU tensor.
Kernel to perform layer normalization for QLSTM.
Common interface for all kernels implemented in C++.
NEQLSTMLayerNormalizationKernel()=default
Default constructor.
const char * name() const override
Name of the kernel.
void configure(const ITensor *input, ITensor *output, const ITensor *weight, const ITensor *bias)
Set the input and output tensors.
const Window & window() const
The maximum window the kernel can be executed on.
Information about executing thread and CPU.
Describe a multidimensional execution window.
Copyright (c) 2017-2023 Arm Limited.
Store the tensor's metadata.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
void run(const Window &window, const ThreadInfo &info) override
Execute the kernel on the passed window.