aboutsummaryrefslogtreecommitdiff
path: root/src/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime')
-rw-r--r--src/runtime/CL/functions/CLDeconvolutionLayer.cpp7
-rw-r--r--src/runtime/CL/functions/CLDirectDeconvolutionLayer.cpp8
2 files changed, 12 insertions, 3 deletions
diff --git a/src/runtime/CL/functions/CLDeconvolutionLayer.cpp b/src/runtime/CL/functions/CLDeconvolutionLayer.cpp
index 75f34cc5ee..918848745e 100644
--- a/src/runtime/CL/functions/CLDeconvolutionLayer.cpp
+++ b/src/runtime/CL/functions/CLDeconvolutionLayer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2020 Arm Limited.
+ * Copyright (c) 2017-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -105,6 +105,11 @@ DeconvolutionMethod CLDeconvolutionLayer::get_deconvolution_method(const ITensor
{
ARM_COMPUTE_UNUSED(output, bias, weights_info);
+ if(is_data_type_quantized_per_channel(weights->data_type()))
+ {
+ return DeconvolutionMethod::DIRECT;
+ }
+
const DataLayout data_layout = input->data_layout();
const size_t idx_w = get_data_layout_dimension_index(data_layout, DataLayoutDimension::WIDTH);
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;
}
}