diff options
author | Michele Di Giorgio <michele.digiorgio@arm.com> | 2017-06-22 16:55:57 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-09-17 14:16:42 +0100 |
commit | 6c928343b0fa2bf60ffdfe21aea28b598d742ed4 (patch) | |
tree | 0a03b06b8329c734c250239112892ac070233481 /src/core/NEON | |
parent | d5e65c71261fd42d3e69478507fbfcc8cf36befc (diff) | |
download | ComputeLibrary-6c928343b0fa2bf60ffdfe21aea28b598d742ed4.tar.gz |
COMPMID-413: Add support for QS8 and QS16 CLNormalizationLayer.
Change-Id: I1aaa9fb8d05796bbca9cfae584e084646552bb71
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/80155
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'src/core/NEON')
-rw-r--r-- | src/core/NEON/kernels/NENormalizationLayerKernel.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/NEON/kernels/NENormalizationLayerKernel.cpp b/src/core/NEON/kernels/NENormalizationLayerKernel.cpp index 085d412558..0e15244f0e 100644 --- a/src/core/NEON/kernels/NENormalizationLayerKernel.cpp +++ b/src/core/NEON/kernels/NENormalizationLayerKernel.cpp @@ -51,12 +51,15 @@ void NENormalizationLayerKernel::configure(const ITensor *input, const ITensor * // Output tensor auto initialization if not yet initialized auto_init_if_empty(*output->info(), input->info()->tensor_shape(), 1, input->info()->data_type(), input->info()->fixed_point_position()); ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, input_squared, output); - ARM_COMPUTE_ERROR_ON_MISMATCHING_FIXED_POINT(input, input_squared, output); ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(input, input_squared, output); ARM_COMPUTE_ERROR_ON_MSG(!(norm_info.norm_size() % 2), "Normalization size should be odd"); - ARM_COMPUTE_ERROR_ON_VALUE_NOT_REPRESENTABLE_IN_FIXED_POINT(norm_info.beta(), input); - ARM_COMPUTE_ERROR_ON_VALUE_NOT_REPRESENTABLE_IN_FIXED_POINT(norm_info.kappa(), input); - ARM_COMPUTE_ERROR_ON_VALUE_NOT_REPRESENTABLE_IN_FIXED_POINT(norm_info.scale_coeff(), input); + if(is_data_type_fixed_point(input->info()->data_type())) + { + ARM_COMPUTE_ERROR_ON_MISMATCHING_FIXED_POINT(input, input_squared, output); + ARM_COMPUTE_ERROR_ON_VALUE_NOT_REPRESENTABLE_IN_FIXED_POINT(norm_info.beta(), input); + ARM_COMPUTE_ERROR_ON_VALUE_NOT_REPRESENTABLE_IN_FIXED_POINT(norm_info.kappa(), input); + ARM_COMPUTE_ERROR_ON_VALUE_NOT_REPRESENTABLE_IN_FIXED_POINT(norm_info.scale_coeff(), input); + } const unsigned int border_width = (norm_info.type() == NormType::CROSS_MAP) ? 0 : std::min(norm_info.norm_size() / 2, 3U); |