From d13931d05b0d5ccea4265c342c6a3bf40a3b85cc Mon Sep 17 00:00:00 2001 From: morgolock Date: Tue, 23 Jun 2020 15:49:35 +0100 Subject: COMPMID-3534: CLGEMMConvolutionLayer doesn't support QASYMM8_SIGNED properly - QASYMM8_SIGNED input and QSYMM8_PER_CHANNEL is permmited. - Validation tests are added. Change-Id: I9f699c323fa7e87afdc132c9b7888a56aebded6b Signed-off-by: morgolock Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3452 Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins Reviewed-by: Michele Di Giorgio Reviewed-by: Georgios Pinitas --- src/runtime/CL/functions/CLGEMMConvolutionLayer.cpp | 6 +----- src/runtime/CL/functions/CLGEMMLowpMatrixMultiplyCore.cpp | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src/runtime/CL/functions') diff --git a/src/runtime/CL/functions/CLGEMMConvolutionLayer.cpp b/src/runtime/CL/functions/CLGEMMConvolutionLayer.cpp index 1c37993bda..a0b62a75d6 100644 --- a/src/runtime/CL/functions/CLGEMMConvolutionLayer.cpp +++ b/src/runtime/CL/functions/CLGEMMConvolutionLayer.cpp @@ -418,11 +418,7 @@ Status CLGEMMConvolutionLayer::validate(const ITensorInfo *input, const ITensorI ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(input, 1, DataType::QASYMM8, DataType::QASYMM8_SIGNED, DataType::F16, DataType::F32); const bool is_quantized_per_channel = is_data_type_quantized_per_channel(weights->data_type()); - if(is_quantized_per_channel) - { - ARM_COMPUTE_RETURN_ERROR_ON_MSG(input->data_type() != DataType::QASYMM8, "Input data type not compatible with Weights"); - } - else + if(!is_quantized_per_channel) { ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, weights); } diff --git a/src/runtime/CL/functions/CLGEMMLowpMatrixMultiplyCore.cpp b/src/runtime/CL/functions/CLGEMMLowpMatrixMultiplyCore.cpp index 84da4a7e98..ca7f90c62e 100644 --- a/src/runtime/CL/functions/CLGEMMLowpMatrixMultiplyCore.cpp +++ b/src/runtime/CL/functions/CLGEMMLowpMatrixMultiplyCore.cpp @@ -117,7 +117,7 @@ void CLGEMMLowpMatrixMultiplyCore::configure(const CLCompileContext &compile_con _output = output; _convert_to_qasymm8 = is_data_type_quantized_per_channel(b->info()->data_type()) && is_data_type_quantized_symmetric(b->info()->data_type()) - && is_data_type_quantized_asymmetric(a->info()->data_type()); + && a->info()->data_type() == DataType::QASYMM8; _b_offset = _convert_to_qasymm8 ? -128 : b->info()->quantization_info().uniform().offset; // Get the GPU target -- cgit v1.2.1