aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2019-12-16 19:23:02 +0000
committerGeorgios Pinitas <georgios.pinitas@arm.com>2019-12-18 10:36:53 +0000
commitc1b81c56169fb30ea70fec43a2cde56468f55793 (patch)
tree81f190f0927cf0bde2732d6dd13c3e0950d5f915
parente6b32020924144683e4f378f147bc9c1c2742e3c (diff)
downloadComputeLibrary-c1b81c56169fb30ea70fec43a2cde56468f55793.tar.gz
COMPMID-2819: Perform sqrt in double domain for L2 pooling.
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: I51d50ceda903c4322b659cd872d041d7db73c335 Reviewed-on: https://review.mlplatform.org/c/2481
-rw-r--r--src/core/NEON/kernels/NEPoolingLayerKernel.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/NEON/kernels/NEPoolingLayerKernel.cpp b/src/core/NEON/kernels/NEPoolingLayerKernel.cpp
index aaeb33f120..4af5424a77 100644
--- a/src/core/NEON/kernels/NEPoolingLayerKernel.cpp
+++ b/src/core/NEON/kernels/NEPoolingLayerKernel.cpp
@@ -1578,7 +1578,12 @@ void NEPoolingLayerKernel::poolingMxN_f32_nhwc(const Window &window_input, const
// Calculate square-root in case of l2 pooling
if(pooling_type == PoolingType::L2)
{
- vres = vmulq_f32(vres, vinvsqrtq_f32(vres));
+ float32x4_t l2_res = { static_cast<float>(sqrt(vgetq_lane_f32(vres, 0))),
+ static_cast<float>(sqrt(vgetq_lane_f32(vres, 1))),
+ static_cast<float>(sqrt(vgetq_lane_f32(vres, 2))),
+ static_cast<float>(sqrt(vgetq_lane_f32(vres, 3)))
+ };
+ vres = l2_res;
}
// Store result