From e92b0458a0432254f8e49bc306aebfe172bb4d0e Mon Sep 17 00:00:00 2001 From: Freddie Liardet Date: Thu, 22 Apr 2021 14:55:17 +0100 Subject: Add per-channel quantization support for CLDeconvolutionLayer Add QSYMM8_PER_CHANNEL support on weight input for CLDeconvolutionLayer. When weights are per-channel quantized type "Direct" method is always used. Also reduce number of QSYMM8_PER_CHANNEL tests for NEDeconvolutionLayer. Resolves: COMPMID-3438 Signed-off-by: Freddie Liardet Change-Id: I1330cac5142e19d21e322574fb8d912558745b02 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5484 Reviewed-by: Michele Di Giorgio Reviewed-by: Giorgio Arena Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins --- src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp') diff --git a/src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp b/src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp index d802ef2dc9..00d9a9ec89 100644 --- a/src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp +++ b/src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp @@ -74,7 +74,12 @@ Status CLDirectDeconvolutionLayer::validate(const ITensorInfo *input, const ITen const TensorShape output_shape = compute_deconvolution_output_shape(out_dims, *input, *weights); - ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, output, weights); + ARM_COMPUTE_RETURN_ERROR_ON_MISMATCHING_DATA_TYPES(input, output); + + if(input->data_type() != weights->data_type()) + { + ARM_COMPUTE_RETURN_ERROR_ON(weights->data_type() != DataType::QSYMM8_PER_CHANNEL || !is_data_type_quantized_asymmetric(input->data_type())); + } if(bias != nullptr) { @@ -227,7 +232,6 @@ void CLDirectDeconvolutionLayer::prepare() { _weights_flipped.allocator()->free(); } - _is_prepared = true; } } -- cgit v1.2.1