From 84886987b0c2067d9bb32d9b427dab4f834ed180 Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Tue, 18 Feb 2020 19:06:27 +0000 Subject: COMPMID-2819: Throw error if exclude_padding is false for NHWC quantized types in PoolingLayer Change-Id: I30af78f0d727389f81a8eb291020a1b6b305adf8 Signed-off-by: Michele Di Giorgio Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/2747 Tested-by: Arm Jenkins Reviewed-by: Giuseppe Rossini --- src/core/CL/kernels/CLPoolingLayerKernel.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/CL/kernels/CLPoolingLayerKernel.cpp') diff --git a/src/core/CL/kernels/CLPoolingLayerKernel.cpp b/src/core/CL/kernels/CLPoolingLayerKernel.cpp index 1d9aa33171..2017bbf986 100644 --- a/src/core/CL/kernels/CLPoolingLayerKernel.cpp +++ b/src/core/CL/kernels/CLPoolingLayerKernel.cpp @@ -62,6 +62,9 @@ Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output, c ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::QASYMM8, DataType::QASYMM8_SIGNED, DataType::F16, DataType::F32); ARM_COMPUTE_RETURN_ERROR_ON_MSG((is_data_type_quantized_asymmetric(input->data_type()) && pool_info.pool_type == PoolingType::L2), "Unsupported combination of parameters!"); + ARM_COMPUTE_RETURN_ERROR_ON_MSG(is_data_type_quantized(input->data_type()) && !pool_info.exclude_padding && (pool_info.pool_type == PoolingType::AVG) && pool_info.pad_stride_info.has_padding() + && (input->data_layout() == DataLayout::NHWC), + "exclude_padding equal false is not supported for AVG Pooling with padding on quantized types"); // Checks performed when output is configured if(output->total_size() != 0) -- cgit v1.2.1