From 93c70b8d7c69ddcee58162c2618aa0e898b4bd1e Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Thu, 8 Aug 2019 11:59:14 +0100 Subject: COMPMID-2547: CLSpaceToBatchLayer causes NN Test Failures on QUANT8_ASYMM Data Type Change-Id: I47c9d057e50fa624f9b9e3fd79724e4fa7d0fd82 Signed-off-by: Michele Di Giorgio Reviewed-on: https://review.mlplatform.org/c/1713 Reviewed-by: Gian Marco Iodice Tested-by: Arm Jenkins --- src/runtime/CL/functions/CLSpaceToBatchLayer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/runtime/CL') diff --git a/src/runtime/CL/functions/CLSpaceToBatchLayer.cpp b/src/runtime/CL/functions/CLSpaceToBatchLayer.cpp index a24b72e461..fa6e82efb0 100644 --- a/src/runtime/CL/functions/CLSpaceToBatchLayer.cpp +++ b/src/runtime/CL/functions/CLSpaceToBatchLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018 ARM Limited. + * Copyright (c) 2018-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -44,7 +44,7 @@ void CLSpaceToBatchLayer::configure(const ICLTensor *input, const ICLTensor *blo if(input->info()->tensor_shape().total_size() != output->info()->tensor_shape().total_size()) { _has_padding = true; - _memset_kernel.configure(output, PixelValue()); + _memset_kernel.configure(output, PixelValue(0, input->info()->data_type(), input->info()->quantization_info())); } _space_to_batch_kernel.configure(input, block_shape, paddings, output); } @@ -56,14 +56,14 @@ void CLSpaceToBatchLayer::configure(const ICLTensor *input, const int block_shap if(input->info()->tensor_shape().total_size() != output->info()->tensor_shape().total_size()) { _has_padding = true; - _memset_kernel.configure(output, PixelValue()); + _memset_kernel.configure(output, PixelValue(0, input->info()->data_type(), input->info()->quantization_info())); } _space_to_batch_kernel.configure(input, block_shape_x, block_shape_y, padding_left, padding_right, output); } Status CLSpaceToBatchLayer::validate(const ITensorInfo *input, const ITensorInfo *block_shape, const ITensorInfo *paddings, const ITensorInfo *output) { - ARM_COMPUTE_RETURN_ON_ERROR(CLMemsetKernel::validate(output, PixelValue())); + ARM_COMPUTE_RETURN_ON_ERROR(CLMemsetKernel::validate(output, PixelValue(0, input->data_type(), input->quantization_info()))); ARM_COMPUTE_RETURN_ON_ERROR(CLSpaceToBatchLayerKernel::validate(input, block_shape, paddings, output)); return Status{}; @@ -72,7 +72,7 @@ Status CLSpaceToBatchLayer::validate(const ITensorInfo *input, const ITensorInfo Status CLSpaceToBatchLayer::validate(const ITensorInfo *input, const int block_shape_x, const int block_shape_y, const Size2D &padding_left, const Size2D &padding_right, const ITensorInfo *output) { - ARM_COMPUTE_RETURN_ON_ERROR(CLMemsetKernel::validate(output, PixelValue())); + ARM_COMPUTE_RETURN_ON_ERROR(CLMemsetKernel::validate(output, PixelValue(0, input->data_type(), input->quantization_info()))); ARM_COMPUTE_RETURN_ON_ERROR(CLSpaceToBatchLayerKernel::validate(input, block_shape_x, block_shape_y, padding_left, padding_right, output)); return Status{}; -- cgit v1.2.1