aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/NEON
diff options
context:
space:
mode:
authorGian Marco Iodice <gianmarco.iodice@arm.com>2018-08-23 15:29:16 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commitf2cde9b29deee6423ea6fe9a1a9afc9ef61d2663 (patch)
tree8a770ff88dc93cee025c44de3c1b8d6f35b9e317 /arm_compute/core/NEON
parent13d96e061fe3be14f9693e6761f1795a2399b249 (diff)
downloadComputeLibrary-f2cde9b29deee6423ea6fe9a1a9afc9ef61d2663.tar.gz
COMPMID-1534 - Fix NENormalizationLayer for FP16
Implemented vinvq_f16 with fp32 data type in order to avoid accuracy issue. Change-Id: Ibfffd12e4a941c1388a982fc7bbe3e1832351feb Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/145416 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'arm_compute/core/NEON')
-rw-r--r--arm_compute/core/NEON/NEMath.inl11
1 files changed, 10 insertions, 1 deletions
diff --git a/arm_compute/core/NEON/NEMath.inl b/arm_compute/core/NEON/NEMath.inl
index 61d25d115c..1ebc9c10af 100644
--- a/arm_compute/core/NEON/NEMath.inl
+++ b/arm_compute/core/NEON/NEMath.inl
@@ -303,7 +303,16 @@ inline float16x8_t vlogq_f16(float16x8_t x)
inline float16x8_t vpowq_f16(float16x8_t val, float16x8_t n)
{
- return vexpq_f16(vmulq_f16(n, vlogq_f16(val)));
+ // TODO (giaiod01) - COMPMID-1535
+ float32x4_t n0_f32 = vcvt_f32_f16(vget_low_f16(n));
+ float32x4_t n1_f32 = vcvt_f32_f16(vget_high_f16(n));
+ float32x4_t val0_f32 = vcvt_f32_f16(vget_low_f16(val));
+ float32x4_t val1_f32 = vcvt_f32_f16(vget_high_f16(val));
+
+ float32x4_t res0_f32 = vexpq_f32(vmulq_f32(n0_f32, vlogq_f32(val0_f32)));
+ float32x4_t res1_f32 = vexpq_f32(vmulq_f32(n1_f32, vlogq_f32(val1_f32)));
+
+ return vcombine_f16(vcvt_f16_f32(res0_f32), vcvt_f16_f32(res1_f32));
}
#endif /* DOXYGEN_SKIP_THIS */
#endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */