21.02
|
#include "helpers_asymm.h"
Go to the source code of this file.
Macros | |
#define | VEC_SIZE 16 |
#define | multiply_by_quantized_multiplier(input, qmul, shift) MULTIPLY_BY_QUANTIZED_MULTIPLIER(input, qmul, shift, 16) |
#define | PERFORM_REDUCTION_IMPL(type) |
#define | PERFORM_REDUCTION_STR(input, type) perform_reduction_##type(input) |
#define | PERFORM_REDUCTION(input, type) PERFORM_REDUCTION_STR(input, type) |
Functions | |
int | perform_reduction_int (int16 sum) |
long | perform_reduction_long (long16 sum) |
int2 | get_invsqrt_quantized_multiplier_exp (int in, int reverse_shift) |
Compute quantized multiplier and shift for the inverse square root of input. More... | |
#define multiply_by_quantized_multiplier | ( | input, | |
qmul, | |||
shift | |||
) | MULTIPLY_BY_QUANTIZED_MULTIPLIER(input, qmul, shift, 16) |
Definition at line 55 of file qlstm_layer_normalization.cl.
Referenced by get_invsqrt_quantized_multiplier_exp().
#define PERFORM_REDUCTION | ( | input, | |
type | |||
) | PERFORM_REDUCTION_STR(input, type) |
Definition at line 68 of file qlstm_layer_normalization.cl.
Referenced by get_invsqrt_quantized_multiplier_exp().
#define PERFORM_REDUCTION_IMPL | ( | type | ) |
Definition at line 56 of file qlstm_layer_normalization.cl.
Definition at line 67 of file qlstm_layer_normalization.cl.
#define VEC_SIZE 16 |
Definition at line 54 of file qlstm_layer_normalization.cl.
Referenced by get_invsqrt_quantized_multiplier_exp().
|
inline |
Compute quantized multiplier and shift for the inverse square root of input.
Using 3-bit fixed point and 5 iteration of Newton-Raphson method.
[in] | in | Input to use |
[in] | reverse_shift | -1 to reverse the shift direction |
Definition at line 84 of file qlstm_layer_normalization.cl.
References ASYMM_MULT, ASYMM_RESCALE, ASYMM_ROUNDING_DIVIDE_BY_POW2, arm_compute::test::validation::b, CONVERT, CONVERT_TO_IMAGE_STRUCT, CONVERT_TO_VECTOR_STRUCT, DATA_TYPE, IMAGE_DECLARATION, arm_compute::test::validation::input, multiply_by_quantized_multiplier, MULTIPLY_BY_QUANTIZED_MULTIPLIER, offset(), PERFORM_REDUCTION, arm_compute::test::validation::reference::qlstm_layer_normalization(), sum(), VEC_DATA_TYPE, VEC_SIZE, VECTOR_DECLARATION, vector_offset(), VLOAD, VSTORE, and arm_compute::test::validation::w.
|
inline |
Definition at line 70 of file qlstm_layer_normalization.cl.
|
inline |
Definition at line 71 of file qlstm_layer_normalization.cl.