From 2c87719e1f58c67e4d543fcf878094e9f88aea62 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/NEON/kernels/NEPoolingLayerKernel.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/NEON/kernels/NEPoolingLayerKernel.cpp') diff --git a/src/core/NEON/kernels/NEPoolingLayerKernel.cpp b/src/core/NEON/kernels/NEPoolingLayerKernel.cpp index 326bc77fcd..d6a3fadd33 100644 --- a/src/core/NEON/kernels/NEPoolingLayerKernel.cpp +++ b/src/core/NEON/kernels/NEPoolingLayerKernel.cpp @@ -136,6 +136,9 @@ Status validate_arguments(const ITensorInfo *input, const ITensorInfo *output, c ARM_COMPUTE_RETURN_ERROR_ON_CPU_F16_UNSUPPORTED(input); 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(pool_type == PoolingType::L2 && is_data_type_quantized(input->data_type())); + 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"); if(output->total_size() != 0) { -- cgit v1.2.1