aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp
diff options
context:
space:
mode:
authorFreddie Liardet <frederick.liardet@arm.com>2021-04-22 14:55:17 +0100
committerfrederick.liardet <frederick.liardet@arm.com>2021-04-28 14:17:10 +0000
commite92b0458a0432254f8e49bc306aebfe172bb4d0e (patch)
treec22bfced606c2b00990b74032c1bcd70529b74ca /src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp
parenta47dcc229d912d4e4bb5afa37220d20451f243a7 (diff)
downloadComputeLibrary-e92b0458a0432254f8e49bc306aebfe172bb4d0e.tar.gz
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 <frederick.liardet@arm.com> Change-Id: I1330cac5142e19d21e322574fb8d912558745b02 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5484 Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Reviewed-by: Giorgio Arena <giorgio.arena@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp')
-rw-r--r--src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp8
1 files changed, 6 insertions, 2 deletions
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;
}
}