From b6f182d3e5b69cc193d7e5ec397c4d61083572d5 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Wed, 29 Nov 2017 10:17:56 +0000 Subject: COMPMID-556: Fix CLDepthwiseConvolution3x3 Kernel. Kernel was not sliding the input window. Change-Id: Ia5903ceaed1243e86bee773a84102d8a1132dfa5 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/111055 Tested-by: BSG Visual Compute Jenkins server to access repositories on http://mpd-gerrit.cambridge.arm.com Reviewed-by: Anthony Barbier --- src/core/CL/kernels/CLDepthwiseConvolution3x3Kernel.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/core/CL/kernels/CLDepthwiseConvolution3x3Kernel.cpp') diff --git a/src/core/CL/kernels/CLDepthwiseConvolution3x3Kernel.cpp b/src/core/CL/kernels/CLDepthwiseConvolution3x3Kernel.cpp index 208d06d7cd..63586b0f0f 100644 --- a/src/core/CL/kernels/CLDepthwiseConvolution3x3Kernel.cpp +++ b/src/core/CL/kernels/CLDepthwiseConvolution3x3Kernel.cpp @@ -137,14 +137,16 @@ void CLDepthwiseConvolution3x3Kernel::run(const Window &window, cl::CommandQueue ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL(this); ARM_COMPUTE_ERROR_ON_INVALID_SUBWINDOW(IKernel::window(), window); - Window slice_in = window.first_slice_window_3D(); + // Create input window and adjust + Window win_in = window; + win_in.adjust(Window::DimX, -_conv_pad_left, true); + win_in.adjust(Window::DimY, -_conv_pad_top, true); + win_in.set_dimension_step(Window::DimX, window.x().step() * _conv_stride_x); + win_in.set_dimension_step(Window::DimY, window.y().step() * _conv_stride_y); + + Window slice_in = win_in.first_slice_window_3D(); Window slice_out = window.first_slice_window_3D(); Window slice_weights = window.first_slice_window_3D(); - - slice_in.adjust(Window::DimX, -_conv_pad_left, true); - slice_in.adjust(Window::DimY, -_conv_pad_top, true); - slice_in.set_dimension_step(Window::DimX, window.x().step() * _conv_stride_x); - slice_in.set_dimension_step(Window::DimY, window.y().step() * _conv_stride_y); slice_weights.set_dimension_step(Window::DimX, 0); slice_weights.set_dimension_step(Window::DimY, 0); @@ -166,5 +168,5 @@ void CLDepthwiseConvolution3x3Kernel::run(const Window &window, cl::CommandQueue enqueue(queue, *this, slice_out); } - while(window.slide_window_slice_3D(slice_out)); + while(window.slide_window_slice_3D(slice_out) && win_in.slide_window_slice_3D(slice_in)); } -- cgit v1.2.1