From ce54b56e0d91a8e73f3ecfede6a2b2aa323aa1fd Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Thu, 14 Sep 2017 17:21:51 +0100 Subject: COMPMID-532: NEON ConvolutionLayer Quantised valgrind errors When matrix B was one dimensional the AccessWindowTranpose did not add bottom padding leading to invalid accesses. Switches the matrix B access window to AccessWindowStatic and allows AccessWindowStatic to add padding to 1D tensors. Change-Id: Ic7fbd20e0c85575b98a506c4c22d2f9ecd8995a9 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/87757 Reviewed-by: Moritz Pflanzer Tested-by: Kaizen --- src/core/AccessWindowStatic.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/AccessWindowStatic.cpp') diff --git a/src/core/AccessWindowStatic.cpp b/src/core/AccessWindowStatic.cpp index 8b6419c485..8a7f37ac9b 100644 --- a/src/core/AccessWindowStatic.cpp +++ b/src/core/AccessWindowStatic.cpp @@ -194,8 +194,8 @@ bool AccessWindowStatic::update_padding_if_needed(const Window &window) const PaddingSize padding; padding.left = std::max(0, -_start_x); padding.right = std::max(0, _end_x - shape[0]); - padding.top = shape.num_dimensions() == 1 ? 0 : std::max(0, -_start_y); - padding.bottom = shape.num_dimensions() == 1 ? 0 : std::max(0, _end_y - shape[1]); + padding.top = std::max(0, -_start_y); + padding.bottom = std::max(0, _end_y - shape[1]); // Update strides in tensor info return _info->extend_padding(padding); -- cgit v1.2.1