From 540d008180a39a84770e51b4bc891cd2ff85980e Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Fri, 17 Nov 2017 10:55:00 +0000 Subject: 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 Reviewed-by: Gian Marco Iodice Reviewed-by: Anthony Barbier --- src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp') 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); } -- cgit v1.2.1