From 638b7e4f6b1125b74f27f90dea2cd23eca52bfe8 Mon Sep 17 00:00:00 2001 From: ramelg01 Date: Wed, 4 May 2022 15:12:21 +0100 Subject: =?UTF-8?q?Fix=20for=20Neon=E2=84=A2=20Depthwise=20Android=20P=20V?= =?UTF-8?q?TS=20test=20failure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves: COMPMID-5237 Signed-off-by: ramy.elgammal@arm.com Change-Id: Ib1f5e262030e915a038cef587001708bbaf14c56 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/7508 Reviewed-by: David Mansell Reviewed-by: Pablo Marquez Tello Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp') diff --git a/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp b/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp index 6905076357..70b12919b0 100644 --- a/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp +++ b/src/core/NEON/kernels/arm_conv/depthwise/depthwise_depthfirst.hpp @@ -437,7 +437,9 @@ class DepthwiseDepthfirst const auto input_i = static_cast(ii < 0 ? 0 : ii); const auto input_j = output_j * this->m_args.stride_cols - this->m_args.padding.left; - const auto valid_input_rows = std::min(strat->get_input_rows(), this->m_args.input_rows - input_i); + // Valid input rows is the smallest of the input rows that aren't padding for this tile, and the number of rows + // available. + const auto valid_input_rows = std::min(strat->get_input_rows() - input_pad_top, this->m_args.input_rows - input_i); const auto valid_output_rows = std::min(strat->get_output_rows(), this->m_args.output_rows - output_i); const auto input_point_stride = input.ld_col * this->m_strat->get_output_cols() * this->m_args.stride_cols; @@ -471,7 +473,7 @@ class DepthwiseDepthfirst // Update all unpadded pointers { auto ptr = ws->inptr_array + strat->get_input_cols() * input_pad_top; - for (auto n = input_pad_top; n < valid_input_rows; n++) + for (auto n = input_pad_top; n < (valid_input_rows + input_pad_top); n++) { for (auto m = 0u; m < strat->get_input_cols(); m++) { -- cgit v1.2.1