From: Manuel Bottini Date: Mon, 8 Feb 2021 11:51:48 +0000 (+0000) Subject: Fix tolerance for NEON RNNLayer X-Git-Tag: submit/tizen/20210421.062230~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=afc9c3df7600dcecf12d3d3a4686d2008502a813;p=platform%2Fupstream%2Farmcl.git 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 --- diff --git a/tests/validation/NEON/RNNLayer.cpp b/tests/validation/NEON/RNNLayer.cpp index f8559ff88..21e205271 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)