diff options
author | Michele Di Giorgio <michele.digiorgio@arm.com> | 2021-01-27 16:22:05 +0000 |
---|---|---|
committer | TeresaARM <teresa.charlinreyes@arm.com> | 2021-01-27 17:40:01 +0000 |
commit | ef28340ac76f46753ad901b5d00311791a7f0887 (patch) | |
tree | 29af0035852ad41e74dee246cbfefc3b0540d3d3 /src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst_generic.hpp | |
parent | 237be03ada644232b19005f44742b97efa5dbfc6 (diff) | |
download | ComputeLibrary-ef28340ac76f46753ad901b5d00311791a7f0887.tar.gz |
Force early exit of threads when output_height=1 and channels=1 in assembly pooling
Resolves COMPMID-4156, COMPMID-4125
Change-Id: I408e51e9759448e6190490975ccab2c1bc07a813
Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4927
Reviewed-by: TeresaARM <teresa.charlinreyes@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst_generic.hpp')
-rw-r--r-- | src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst_generic.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst_generic.hpp b/src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst_generic.hpp index 3a15b28d92..fa06a0078b 100644 --- a/src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst_generic.hpp +++ b/src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst_generic.hpp @@ -159,6 +159,12 @@ class PoolingDepthfirstGeneric : public PoolingCommon<typename strategy::operand end_out_height = output_height; } + if(start_channel >= end_channel) + { + // Early exit in case of multiple threads parallelising on channels + return; + } + // Cast input and output pointers into the right types const TInput *const inptr = static_cast<const TInput *>(_input) + start_channel; TOutput *const outptr = static_cast<TOutput *>(_output) + start_channel; |