From a28aebc5f80630683f50ce934e8584c6b0004beb Mon Sep 17 00:00:00 2001 From: Pablo Tello Date: Mon, 3 Jun 2019 14:59:48 +0100 Subject: COMPMID-2383: DepthwiseConv use output qinfo There was a problem in depthwise_conv where when needing to run permute it was calling auto_init to initialise the temporary tensor with input's qinfo instead of output's qinfo. This patch fixes this and adds some tests to exercise the cases where we have different qinfos Change-Id: I396fbb4d73f6aa5efe03dc2dd727b3e13154d6f5 Signed-off-by: Pablo Tello Reviewed-on: https://review.mlplatform.org/c/1270 Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins Reviewed-by: Giuseppe Rossini Reviewed-by: Georgios Pinitas --- src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.cpp') diff --git a/src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.cpp b/src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.cpp index f489e82cb9..779cf25fdf 100644 --- a/src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.cpp +++ b/src/core/CL/kernels/CLDepthwiseConvolutionLayer3x3NHWCKernel.cpp @@ -109,12 +109,7 @@ std::pair validate_and_configure_window(ITensorInfo *input, ITen const TensorShape output_shape = arm_compute::misc::shape_calculator::compute_depthwise_convolution_shape( *input, TensorInfo(TensorShape(weights_width, weights_height), 1, weights->data_type()).set_data_layout(DataLayout::NCHW), conv_info, depth_multiplier, dilation); - // Output auto inizialitation if not yet initialized - auto_init_if_empty(*output, - output_shape, - 1, - input->data_type(), - input->quantization_info()); + auto_init_if_empty(*output, input->clone()->set_tensor_shape(output_shape).set_quantization_info(output->quantization_info())); const bool is_qasymm = is_data_type_quantized_asymmetric(input->data_type()); const bool is_stride_1_dilation_1 = ((conv_info.stride().first == conv_info.stride().second) && (conv_info.stride().first == 1) && dilation.x() == 1 && dilation.y() == 1); -- cgit v1.2.1