From afc9c3df7600dcecf12d3d3a4686d2008502a813 Mon Sep 17 00:00:00 2001 From: Manuel Bottini Date: Mon, 8 Feb 2021 11:51:48 +0000 Subject: Fix tolerance for NEON RNNLayer Hide FP16 tolerances for NEON backend if FP16 vector arithmetic not supported Resolves: COMPMID-4239 Change-Id: Ib6aad2de8a0ea621e2fdb673b9bab92c0520acd5 Signed-off-by: Manuel Bottini Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5022 Tested-by: Arm Jenkins Reviewed-by: Giorgio Arena Comments-Addressed: Arm Jenkins --- tests/validation/NEON/RNNLayer.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/validation/NEON/RNNLayer.cpp b/tests/validation/NEON/RNNLayer.cpp index f8559ff88e..21e2052713 100644 --- a/tests/validation/NEON/RNNLayer.cpp +++ b/tests/validation/NEON/RNNLayer.cpp @@ -39,9 +39,11 @@ namespace validation { namespace { -RelativeTolerance tolerance_f32(0.001f); /**< Relative tolerance value for comparing reference's output against implementation's output for DataType:F32 */ -RelativeTolerance tolerance_f16(half(0.1)); /**< Relative tolerance value for comparing reference's output against implementation's output for DataType:F16 */ -constexpr float abs_tolerance_f16(0.02f); /**< Absolute tolerance value for comparing reference's output against implementation's output for DataType:F16 */ +RelativeTolerance tolerance_f32(0.001f); /**< Relative tolerance value for comparing reference's output against implementation's output for DataType:F32 */ +#ifdef __ARM_FEATURE_FP16_VECTOR_ARITHMETIC +RelativeTolerance tolerance_f16(half(0.1)); /**< Relative tolerance value for comparing reference's output against implementation's output for DataType:F16 */ +constexpr float abs_tolerance_f16(0.02f); /**< Absolute tolerance value for comparing reference's output against implementation's output for DataType:F16 */ +#endif /* __ARM_FEATURE_FP16_VECTOR_ARITHMETIC */ } // namespace TEST_SUITE(NEON) -- cgit v1.2.1