diff options
author | Giorgio Arena <giorgio.arena@arm.com> | 2021-04-12 16:44:24 +0100 |
---|---|---|
committer | Giorgio Arena <giorgio.arena@arm.com> | 2021-04-12 18:51:33 +0000 |
commit | 0a66abec3723f7dd655a118cf2969db59b37f171 (patch) | |
tree | 4dffc6812dafabe89e6bbde15adab84485b056b6 /src/runtime/CL | |
parent | 0b76f7dd12240dc7a546c202ee80a7942d9898cd (diff) | |
download | ComputeLibrary-0a66abec3723f7dd655a118cf2969db59b37f171.tar.gz |
Fix CLDepthwiseConvolutionLayer QSYMM8_PER_CHANNEL mismatches
Resolve COMPMID-4367
Signed-off-by: Giorgio Arena <giorgio.arena@arm.com>
Change-Id: I5e65b62c2ca52cf65950c9c343864ef55b7122c3
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5407
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL')
-rw-r--r-- | src/runtime/CL/functions/CLDepthwiseConvolutionLayer.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/runtime/CL/functions/CLDepthwiseConvolutionLayer.cpp b/src/runtime/CL/functions/CLDepthwiseConvolutionLayer.cpp index 5ed8aa98c9..f7517a50a3 100644 --- a/src/runtime/CL/functions/CLDepthwiseConvolutionLayer.cpp +++ b/src/runtime/CL/functions/CLDepthwiseConvolutionLayer.cpp @@ -366,7 +366,8 @@ CLDepthwiseConvolutionLayer::CLDepthwiseConvolutionLayerInternal3x3::CLDepthwise _needs_permute(false), _needs_weights_reshape(false), _is_prepared(false), - _is_quantized(false) + _is_quantized(false), + _is_nhwc(false) { } @@ -394,10 +395,10 @@ void CLDepthwiseConvolutionLayer::CLDepthwiseConvolutionLayerInternal3x3::config gpu_target, dilation)); - const bool is_nhwc = input->info()->data_layout() == DataLayout::NHWC; + _is_nhwc = input->info()->data_layout() == DataLayout::NHWC; _is_quantized = is_data_type_quantized_asymmetric(input->info()->data_type()); - _needs_permute = is_nhwc && (depth_multiplier > 1); - _needs_weights_reshape = is_nhwc && (depth_multiplier == 1) && _is_quantized; + _needs_permute = _is_nhwc && (depth_multiplier > 1); + _needs_weights_reshape = _is_nhwc && (depth_multiplier == 1) && _is_quantized; _is_prepared = false; _original_weights = weights; @@ -437,7 +438,7 @@ void CLDepthwiseConvolutionLayer::CLDepthwiseConvolutionLayerInternal3x3::config _kernel = std::make_unique<CLDepthwiseConvolutionLayer3x3NCHWKernel>(); } - else if(is_nhwc) + else if(_is_nhwc) { if(_needs_weights_reshape) { @@ -529,7 +530,7 @@ void CLDepthwiseConvolutionLayer::CLDepthwiseConvolutionLayerInternal3x3::prepar { _output_multipliers.map(); _output_shifts.map(); - const unsigned int idx_ofms = _needs_permute ? 2 : 0; + const unsigned int idx_ofms = _is_nhwc ? 0 : 2; quantization::compute_quantized_multipliers_and_shifts(_input->info(), _original_weights->info(), _output->info(), |