From 9f0d5ecb52d5145a1fff51d1824ecfb8fe417023 Mon Sep 17 00:00:00 2001 From: Manuel Bottini Date: Mon, 19 Aug 2019 13:31:38 +0100 Subject: COMPMID-2597: Checking bias type in NEDeconvolutionLayer::validate even when bias == nullptr Change-Id: If7fb2e6d11e4653208b58ebdbfcc284d6c5a2e9a Signed-off-by: Manuel Bottini Reviewed-on: https://review.mlplatform.org/c/1761 Reviewed-by: Michele Di Giorgio Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- src/runtime/NEON/functions/NEDeconvolutionLayer.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/runtime/NEON/functions/NEDeconvolutionLayer.cpp b/src/runtime/NEON/functions/NEDeconvolutionLayer.cpp index 4db1346654..2a09ba4285 100644 --- a/src/runtime/NEON/functions/NEDeconvolutionLayer.cpp +++ b/src/runtime/NEON/functions/NEDeconvolutionLayer.cpp @@ -73,13 +73,16 @@ Status NEDeconvolutionLayer::validate(const ITensorInfo *input, const ITensorInf info.pad().first, info.pad().second, stride_x, stride_y); ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, weights); - if(is_data_type_quantized_asymmetric(input->data_type())) + if(bias != nullptr) { - ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(bias, 1, DataType::S32); - } - else - { - ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, bias); + if(is_data_type_quantized_asymmetric(input->data_type())) + { + ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(bias, 1, DataType::S32); + } + else + { + ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, bias); + } } if(output->tensor_shape().total_size() > 0) -- cgit v1.2.1