diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2017-11-17 10:55:00 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:35:24 +0000 |
commit | 540d008180a39a84770e51b4bc891cd2ff85980e (patch) | |
tree | 500faadfafde7b92bdf7cb46c01501d2db01728f /src/core/CL/kernels | |
parent | 43ce898014faabbe8ab1cdf714b7aad3d3c9b2a9 (diff) | |
download | ComputeLibrary-540d008180a39a84770e51b4bc891cd2ff85980e.tar.gz |
COMPMID-556: Fixes bias in CLDirectConvolutionLayer to be int32.
Biases were incorrectly passed as uchar8 in asymmetric quantized
calculations while they should be in int32.
Change-Id: I461f5e4ef6eb44374c1094378a1bfe9ade5e247d
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/96244
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'src/core/CL/kernels')
-rw-r--r-- | src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp b/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp index 5f109f76af..d0b5b9373f 100644 --- a/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp +++ b/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp @@ -65,7 +65,14 @@ void CLDirectConvolutionLayerKernel::configure(const ICLTensor *input, const ICL if(biases != nullptr) { - ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(weights, biases); + if(is_data_type_quantized_asymmetric(input->info()->data_type())) + { + ARM_COMPUTE_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(biases, 1, DataType::S32); + } + else + { + ARM_COMPUTE_ERROR_ON_MISMATCHING_DATA_TYPES(weights, biases); + } ARM_COMPUTE_ERROR_ON(biases->info()->dimension(0) != weights->info()->dimension(3)); ARM_COMPUTE_ERROR_ON(biases->info()->num_dimensions() > 1); } |