24.02.1
|
Go to the documentation of this file.
49 const ITensorInfo *input_squared,
50 const ITensorInfo *output,
51 const NormalizationLayerInfo &norm_info)
62 if (output->total_size() != 0)
75 : _func(nullptr), _input(nullptr), _input_squared(nullptr), _output(nullptr), _norm_info(
NormType::
IN_MAP_1D)
94 _input_squared = input_squared;
96 _norm_info = norm_info;
133 #ifdef ARM_COMPUTE_ENABLE_FP16
175 INEKernel::configure(win);
196 (*_func)(
window, _input, _input_squared, _output, _norm_info);
Class to describe a number of elements in each dimension.
void neon_normalize_float16_8_0_2D(const Window &window, const ITensor *in, const ITensor *in_squared, ITensor *out, NormalizationLayerInfo ninfo)
Window calculate_max_window(const ValidRegion &valid_region, const Steps &steps, bool skip_border, BorderSize border_size)
@ IN_MAP_1D
Normalization applied within the same map in 1D region.
static Status validate(const ITensorInfo *input, const ITensorInfo *input_squared, const ITensorInfo *output, NormalizationLayerInfo norm_info)
Static function to check if given info will lead to a valid configuration of NENormalizationLayerKern...
Status validate_arguments(const ITensorInfo *src, const ITensorInfo *weights, const ITensorInfo *dst, const PadStrideInfo &conv_info)
#define ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(k)
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_SHAPES(...)
#define ARM_COMPUTE_ERROR(msg)
Print the given message then throw an std::runtime_error.
Interface for CPU tensor.
void run(const Window &window, const ThreadInfo &info) override
Execute the kernel on the passed window.
#define REGISTER_FP16_NEON(func_name)
void neon_normalize_float16_8_1_2D(const Window &window, const ITensor *in, const ITensor *in_squared, ITensor *out, NormalizationLayerInfo ninfo)
Includes all wrapper headers at once.
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(...)
#define ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(t, c,...)
#define ARM_COMPUTE_RETURN_ON_ERROR(status)
Checks if a status contains an error and returns it.
#define REGISTER_FP32_NEON(func_name)
#define ARM_COMPUTE_ERROR_ON_NULLPTR(...)
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
#define ARM_COMPUTE_ERROR_ON(cond)
If the condition is true then an error message is printed and an exception thrown.
void neon_normalize_float32_4_1(const Window &window, const ITensor *in, const ITensor *in_squared, ITensor *out, NormalizationLayerInfo ninfo)
#define ARM_COMPUTE_ERROR_THROW_ON(status)
void configure(const ITensor *input, const ITensor *input_squared, ITensor *output, NormalizationLayerInfo norm_info)
Set the input and output tensors.
#define ARM_COMPUTE_RETURN_ERROR_ON_CPU_F16_UNSUPPORTED(tensor)
bool auto_init_if_empty(ITensorInfo &info, const TensorShape &shape, int num_channels, DataType data_type, QuantizationInfo quantization_info=QuantizationInfo())
Auto initialize the tensor info (shape, number of channels and data type) if the current assignment i...
#define ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(f, s)
virtual DataType data_type() const =0
Data type used for each element of the tensor.
void neon_normalize_float16_8_0(const Window &window, const ITensor *in, const ITensor *in_squared, ITensor *out, NormalizationLayerInfo ninfo)
void neon_normalize_float16_8_2(const Window &window, const ITensor *in, const ITensor *in_squared, ITensor *out, NormalizationLayerInfo ninfo)
#define ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_LAYOUT(...)
@ IN_MAP_2D
Normalization applied within the same map in 2D region.
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
void neon_normalize_float32_4_2(const Window &window, const ITensor *in, const ITensor *in_squared, ITensor *out, NormalizationLayerInfo ninfo)
const Window & window() const
The maximum window the kernel can be executed on.
void neon_normalize_float32_4_0_2D(const Window &window, const ITensor *in, const ITensor *in_squared, ITensor *out, NormalizationLayerInfo ninfo)
Information about executing thread and CPU.
void neon_normalize_float32_4_0(const Window &window, const ITensor *in, const ITensor *in_squared, ITensor *out, NormalizationLayerInfo ninfo)
Describe a multidimensional execution window.
Normalization Layer Information class.
#define ARM_COMPUTE_RETURN_ERROR_ON_MSG(cond, msg)
If the condition is true, an error is returned.
Copyright (c) 2017-2024 Arm Limited.
@ F16
16-bit floating-point number
void neon_normalize_float32_4_1_2D(const Window &window, const ITensor *in, const ITensor *in_squared, ITensor *out, NormalizationLayerInfo ninfo)
#define ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR(...)
void neon_normalize_float16_8_1(const Window &window, const ITensor *in, const ITensor *in_squared, ITensor *out, NormalizationLayerInfo ninfo)
Store the tensor's metadata.
@ F32
32-bit floating-point number
NormType
The normalization type used for the normalization layer.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
unsigned int get_normalization_dimension_index(DataLayout layout, const NormalizationLayerInfo &info)
Calculate the normalization dimension index for a given normalization type.
NormType type() const
Get the normalization type.
NENormalizationLayerKernel()
Default constructor.