aboutsummaryrefslogtreecommitdiff
path: root/src/core/NEON/kernels/NEGEMMLowpOffsetContributionKernel.cpp
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2020-10-09 11:52:10 +0100
committerSheri Zhang <sheri.zhang@arm.com>2020-10-09 12:43:56 +0000
commitc226853f80d53619a2f49e646635e04ee0885c3b (patch)
tree252620ed7db38810c1590d7caab62625ec07ad6f /src/core/NEON/kernels/NEGEMMLowpOffsetContributionKernel.cpp
parent4adaddbaa633a4025f29f2e0a63c7126d9d7c530 (diff)
downloadComputeLibrary-c226853f80d53619a2f49e646635e04ee0885c3b.tar.gz
COMPMID-3794: Fix window loops causing performance regression
Signed-off-by: Michalis Spyrou <michalis.spyrou@arm.com> Change-Id: Id4d95c6ce5fed91bb079b8bfe1abceedefd20c97 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4117 Reviewed-by: Sheri Zhang <sheri.zhang@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/NEGEMMLowpOffsetContributionKernel.cpp')
-rw-r--r--src/core/NEON/kernels/NEGEMMLowpOffsetContributionKernel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/NEON/kernels/NEGEMMLowpOffsetContributionKernel.cpp b/src/core/NEON/kernels/NEGEMMLowpOffsetContributionKernel.cpp
index 5710897329..4ac33d1e29 100644
--- a/src/core/NEON/kernels/NEGEMMLowpOffsetContributionKernel.cpp
+++ b/src/core/NEON/kernels/NEGEMMLowpOffsetContributionKernel.cpp
@@ -139,7 +139,7 @@ void run_offset_contribution(const Window &window,
const int32x4_t b_offset_term_s32_vec = vdupq_n_s32(b_offset_term_s32);
int x = window_start_x;
- for(; x < (window_end_x - window_step_x); x += window_step_x)
+ for(; x <= (window_end_x - window_step_x); x += window_step_x)
{
// Compute the leftover term due to a_offset.
int32x4x4_t a_offset_term_s32 =
@@ -237,7 +237,7 @@ void run_offset_contribution(const Window &window,
const int32x4_t b_offset_term_s32_vec = vdupq_n_s32(b_offset_term_s32);
int x = window_start_x;
- for(; x < (window_end_x - window_step_x); x += window_step_x)
+ for(; x <= (window_end_x - window_step_x); x += window_step_x)
{
int32x4x4_t in_s32 =
{
@@ -291,7 +291,7 @@ void run_offset_contribution(const Window &window,
auto mm_result_ptr = reinterpret_cast<int32_t *>(mm_result_it.ptr());
int x = window_start_x;
- for(; x < (window_end_x - window_step_x); x += window_step_x)
+ for(; x <= (window_end_x - window_step_x); x += window_step_x)
{
// Compute the leftover term due to a_offset.
int32x4x4_t a_offset_term_s32 =