aboutsummaryrefslogtreecommitdiff
path: root/src/core/NEON/kernels/NEDepthwiseConvolutionLayer3x3Kernel.cpp
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2018-02-21 14:47:09 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:47:40 +0000
commit1a03d76786a59a7d20deabb02f047516e98680d4 (patch)
treef679ef0f00662a72880e5e98be8097a7e9ef79e4 /src/core/NEON/kernels/NEDepthwiseConvolutionLayer3x3Kernel.cpp
parentaad9f2c976ff9bb7022751f4ee8c659194d2b3a6 (diff)
downloadComputeLibrary-1a03d76786a59a7d20deabb02f047516e98680d4.tar.gz
COMPMID-765: Fix windows in DirectConvLayer and DepthwiseConvLayer
Change-Id: I6c68733c8a2ada12aa3994e3e5213d20222df861 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/121637 Reviewed-by: Anthony Barbier <anthony.barbier@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/NEDepthwiseConvolutionLayer3x3Kernel.cpp')
-rw-r--r--src/core/NEON/kernels/NEDepthwiseConvolutionLayer3x3Kernel.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/core/NEON/kernels/NEDepthwiseConvolutionLayer3x3Kernel.cpp b/src/core/NEON/kernels/NEDepthwiseConvolutionLayer3x3Kernel.cpp
index dad4fee837..f5ee608b60 100644
--- a/src/core/NEON/kernels/NEDepthwiseConvolutionLayer3x3Kernel.cpp
+++ b/src/core/NEON/kernels/NEDepthwiseConvolutionLayer3x3Kernel.cpp
@@ -238,6 +238,7 @@ void NEDepthwiseConvolutionLayer3x3Kernel::configure_generic()
ARM_COMPUTE_ERROR_ON_MISMATCHING_DIMENSIONS(_output->info()->tensor_shape(), output_shape);
const unsigned int conv_stride_x = _conv_info.stride().first;
+ const unsigned int conv_stride_y = _conv_info.stride().second;
const unsigned int conv_pad_top = _conv_info.pad_top();
const unsigned int conv_pad_right = _conv_info.pad_right();
const unsigned int conv_pad_bottom = _conv_info.pad_bottom();
@@ -264,15 +265,10 @@ void NEDepthwiseConvolutionLayer3x3Kernel::configure_generic()
// Configure kernel window
Window win = calculate_max_window(*_output->info(), Steps(_num_elems_written_per_iteration));
- const unsigned int num_x_steps = (output_shape.x() + _num_elems_written_per_iteration - 1) / _num_elems_written_per_iteration;
- const int input_num_elems_processed = get_input_num_elems_processed(_num_elems_written_per_iteration, conv_stride_x);
-
- AccessWindowStatic input_access(_input->info(),
- -conv_pad_left,
- -conv_pad_top,
- (num_x_steps - 1) * input_num_elems_processed + num_elems_read_per_iteration,
- _input->info()->tensor_shape().y() + conv_pad_bottom);
- AccessWindowStatic weights_access(_weights->info(), 0, 0, _weights->info()->dimension(0), _weights->info()->dimension(1));
+ AccessWindowRectangle input_access(_input->info(), -conv_pad_left, -conv_pad_top,
+ num_elems_read_per_iteration, 3,
+ conv_stride_x, conv_stride_y);
+ AccessWindowStatic weights_access(_weights->info(), 0, 0, 3, 3);
AccessWindowHorizontal output_access(_output->info(), 0, _num_elems_written_per_iteration);
update_window_and_padding(win, input_access, weights_access, output_access);