From f5f0ecca39c905bc8c1f90e7469eed2221ca662f Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Wed, 20 Jun 2018 10:16:31 +0100 Subject: COMPMID-1246 Increase tolerance in CLArithmeticDivision for FP16 Also change the random distribution range to not include values close to zero which will produce inf. Change-Id: I75f72c57b5cc66b4b305501b7f9c6a63c6cc30eb Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/136351 Reviewed-by: Anthony Barbier Reviewed-by: Pablo Tello Tested-by: Jenkins Reviewed-by: Georgios Pinitas --- tests/validation/CL/ArithmeticDivision.cpp | 2 +- tests/validation/fixtures/ArithmeticDivisionFixture.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/validation/CL/ArithmeticDivision.cpp b/tests/validation/CL/ArithmeticDivision.cpp index dab3f75018..42e2d223c2 100644 --- a/tests/validation/CL/ArithmeticDivision.cpp +++ b/tests/validation/CL/ArithmeticDivision.cpp @@ -44,7 +44,7 @@ namespace validation namespace { RelativeTolerance tolerance_fp32(0.000001f); -RelativeTolerance tolerance_fp16(0.0001f); +RelativeTolerance tolerance_fp16(0.001f); } // namespace TEST_SUITE(CL) diff --git a/tests/validation/fixtures/ArithmeticDivisionFixture.h b/tests/validation/fixtures/ArithmeticDivisionFixture.h index d113977ca8..cf9db9505b 100644 --- a/tests/validation/fixtures/ArithmeticDivisionFixture.h +++ b/tests/validation/fixtures/ArithmeticDivisionFixture.h @@ -55,7 +55,8 @@ protected: template void fill(U &&tensor, int i) { - library->fill_tensor_uniform(tensor, i); + std::uniform_real_distribution<> distribution(1.0f, 5.0f); + library->fill(tensor, distribution, i); } TensorType compute_target(const TensorShape &shape0, const TensorShape &shape1, DataType data_type) -- cgit v1.2.1