aboutsummaryrefslogtreecommitdiff
path: root/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-02-21 14:00:44 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:47:40 +0000
commit328891ca45c5857fd79ff04dcb00fbd84e6d7a72 (patch)
tree44d865cd7a6b39136333937905c3d3ee56283b05 /src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp
parent995f55252dfaaa5b64075b96272ae11e23d6ca9b (diff)
downloadComputeLibrary-328891ca45c5857fd79ff04dcb00fbd84e6d7a72.tar.gz
COMPMID-933: Replaced StaticWindow with RectangleWindow
Change-Id: I18b7d20cafa477924c8fb705cc64c92a0177ebac Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/121621 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Diffstat (limited to 'src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp')
-rw-r--r--src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp b/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp
index ac3c9ac4a6..6f5c7a35f9 100644
--- a/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp
+++ b/src/core/CL/kernels/CLDirectConvolutionLayerKernel.cpp
@@ -124,12 +124,10 @@ std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input, ITen
input->fixed_point_position(),
input->quantization_info());
- unsigned int conv_stride_x = std::get<0>(conv_info.stride());
- unsigned int conv_stride_y = std::get<1>(conv_info.stride());
- unsigned int conv_pad_left = conv_info.pad_left();
- unsigned int conv_pad_top = conv_info.pad_top();
- unsigned int conv_pad_right = conv_info.pad_right();
- unsigned int conv_pad_bottom = conv_info.pad_bottom();
+ unsigned int conv_stride_x = std::get<0>(conv_info.stride());
+ unsigned int conv_stride_y = std::get<1>(conv_info.stride());
+ unsigned int conv_pad_left = conv_info.pad_left();
+ unsigned int conv_pad_top = conv_info.pad_top();
unsigned int num_elems_read_per_iteration_x = 0;
unsigned int num_elems_read_per_iteration_y = 0;
@@ -239,19 +237,11 @@ std::pair<Status, Window> validate_and_configure_window(ITensorInfo *input, ITen
}
}
- // Calculate right and bottom border
- int input_width = input->dimension(0) + conv_pad_left + conv_pad_right;
- int input_height = input->dimension(1) + conv_pad_top + conv_pad_bottom;
-
- // Add padding only if necessary or it would always result in a window_changed
- input_width = ceil_to_multiple(input_width, num_elems_read_per_iteration_x);
- input_height = ceil_to_multiple(input_height, num_elems_read_per_iteration_y);
-
// Create window and update padding
bool window_changed = false;
Window win = calculate_max_window(*output, Steps(num_elems_written_per_iteration_x, num_elems_written_per_iteration_y));
- AccessWindowStatic input_access(input, -conv_pad_left, -conv_pad_top, input_width, input_height);
+ AccessWindowRectangle input_access(input, -conv_pad_left, -conv_pad_top, num_elems_read_per_iteration_x, num_elems_read_per_iteration_y, conv_stride_x, conv_stride_y);
AccessWindowStatic weights_access(weights, 0, 0, kernel_size, kernel_size);
AccessWindowRectangle output_access(output, 0, 0, num_elems_written_per_iteration_x, num_elems_written_per_iteration_y);