From 09004ca6a259f20e2fe31844ee5a63cc80e56dfd Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Mon, 3 Jul 2017 17:30:14 +0100 Subject: 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 Tested-by: Kaizen --- src/core/CL/kernels/CLNormalizationLayerKernel.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/core/CL/kernels/CLNormalizationLayerKernel.cpp') 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"); -- cgit v1.2.1