diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2017-07-03 17:30:14 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-09-17 14:15:39 +0100 |
commit | 09004ca6a259f20e2fe31844ee5a63cc80e56dfd (patch) | |
tree | 8d9ffd5a665f9f6218c85e7ae0779c46fd6fef8f /src/core/CL/kernels/CLNormalizationLayerKernel.cpp | |
parent | d7e8281d8ad7e0d0fdc0d180af64a751c4c3f175 (diff) | |
download | ComputeLibrary-09004ca6a259f20e2fe31844ee5a63cc80e56dfd.tar.gz |
COMPMID-417: Add autoconfigure in NormalizationLayer CL/NEON.
Change-Id: I6a6ad0c7a92322776de6a4d4cceeb1365859ef4d
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79566
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLNormalizationLayerKernel.cpp')
-rw-r--r-- | src/core/CL/kernels/CLNormalizationLayerKernel.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/CL/kernels/CLNormalizationLayerKernel.cpp b/src/core/CL/kernels/CLNormalizationLayerKernel.cpp index 106a5113db..b2bcb9225d 100644 --- a/src/core/CL/kernels/CLNormalizationLayerKernel.cpp +++ b/src/core/CL/kernels/CLNormalizationLayerKernel.cpp @@ -46,9 +46,14 @@ BorderSize CLNormalizationLayerKernel::border_size() const void CLNormalizationLayerKernel::configure(const ICLTensor *input, const ICLTensor *squared_input, ICLTensor *output, NormalizationLayerInfo norm_info) { - ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::S16, DataType::U16, DataType::F16, DataType::F32); - ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(output, 1, DataType::S16, DataType::U16, DataType::F16, DataType::F32); - ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(input, output); + ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::F16, DataType::F32); + ARM_COMPUTE_ERROR_ON_NULLPTR(output); + + // 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, squared_input, output); + ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(input, squared_input, output); ARM_COMPUTE_ERROR_ON_MSG(!(norm_info.norm_size() % 2), "Normalization size should be odd"); ARM_COMPUTE_ERROR_ON_MSG(norm_info.type() == NormType::IN_MAP_2D, "2D In-Map Normalization not implemented"); |