aboutsummaryrefslogtreecommitdiff
path: root/src/core/NEON/kernels/NEDirectConvolutionLayerKernel.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/NEDirectConvolutionLayerKernel.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/NEDirectConvolutionLayerKernel.cpp')
-rw-r--r--src/core/NEON/kernels/NEDirectConvolutionLayerKernel.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/NEON/kernels/NEDirectConvolutionLayerKernel.cpp b/src/core/NEON/kernels/NEDirectConvolutionLayerKernel.cpp
index 4dc186a8a7..285ec2d0a0 100644
--- a/src/core/NEON/kernels/NEDirectConvolutionLayerKernel.cpp
+++ b/src/core/NEON/kernels/NEDirectConvolutionLayerKernel.cpp
@@ -1053,8 +1053,8 @@ std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input, ITen
// Calculate right and bottom border
unsigned int kernel_size = weights->dimension(0);
const int conv_stride_x = std::get<0>(conv_info.stride());
+ const int conv_stride_y = std::get<1>(conv_info.stride());
const int input_width = input->dimension(0);
- const int input_height = input->dimension(1);
switch(kernel_size)
{
@@ -1135,8 +1135,12 @@ std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input, ITen
border_size.right = conv_pad_right;
border_size.bottom = conv_pad_bottom;
- Window win = calculate_max_window(*output, Steps(num_elems_written_per_iteration));
- AccessWindowStatic input_access(input, -conv_pad_left, -conv_pad_top, input_width + conv_pad_right, input_height + conv_pad_bottom);
+ // Configure window
+ Window win = calculate_max_window(*output, Steps(num_elems_written_per_iteration));
+
+ AccessWindowRectangle input_access(input, -conv_pad_left, -conv_pad_top,
+ num_elems_read_per_iteration, kernel_size,
+ conv_stride_x, conv_stride_y);
AccessWindowStatic weights_access(weights, 0, 0, num_weight_elems_read_per_row, kernel_size);
AccessWindowHorizontal output_access(output, 0, num_elems_written_per_iteration);
bool window_changed = update_window_and_padding(win, input_access, weights_access, output_access);