From f81652dc970a8071f41c4138508c39684ed9111a Mon Sep 17 00:00:00 2001 From: steniu01 Date: Mon, 11 Sep 2017 15:29:12 +0100 Subject: COMPMID-516 Increase tolerance rate of Scale, Conv, fully connected and GEMM This patch also fix the scale kernel issue where it was calcuated the scale factor inside the gpu but now in the CPU. The GPU and CPU gave different result for simple float division operation Change-Id: Ib6709cb6c41dcf4fc0fa4eb79e481430695bf40e Reviewed-on: http://mpd-gerrit.cambridge.arm.com/87266 Tested-by: Kaizen Reviewed-by: Moritz Pflanzer --- tests/validation/CL/GEMM.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tests/validation/CL/GEMM.cpp') diff --git a/tests/validation/CL/GEMM.cpp b/tests/validation/CL/GEMM.cpp index 854551917e..62671e34d7 100644 --- a/tests/validation/CL/GEMM.cpp +++ b/tests/validation/CL/GEMM.cpp @@ -43,9 +43,10 @@ namespace validation { namespace { -RelativeTolerance tolerance_f32(0.001f); /**< Tolerance value for comparing reference's output against implementation's output for floating point data types */ -RelativeTolerance tolerance_f16(half(0.2)); /**< Tolerance value for comparing reference's output against implementation's output for floating point data types */ -constexpr AbsoluteTolerance tolerance_q(1.0f); /**< Tolerance value for comparing reference's output against implementation's output for fixed point data types */ +RelativeTolerance tolerance_f32(0.001f); /**< Tolerance value for comparing reference's output against implementation's output for floating point data types */ +RelativeTolerance tolerance_f16(half(0.2)); /**< Tolerance value for comparing reference's output against implementation's output for floating point data types */ +constexpr AbsoluteTolerance tolerance_q(1.0f); /**< Tolerance value for comparing reference's output against implementation's output for fixed point data types */ +constexpr float tolerance_num = 0.02f; /**< Tolerance number */ /** CNN data types */ const auto CNNDataTypes = framework::dataset::make("DataType", @@ -92,13 +93,13 @@ TEST_SUITE(FP16) FIXTURE_DATA_TEST_CASE(RunSmall, CLGEMMFixture, framework::DatasetMode::PRECOMMIT, combine(datasets::SmallGEMMDataset(), framework::dataset::make("DataType", DataType::F16))) { // Validate output - validate(CLAccessor(_target), _reference, tolerance_f16); + validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num); } FIXTURE_DATA_TEST_CASE(RunLarge, CLGEMMFixture, framework::DatasetMode::NIGHTLY, combine(datasets::LargeGEMMDataset(), framework::dataset::make("DataType", DataType::F16))) { // Validate output - validate(CLAccessor(_target), _reference, tolerance_f16); + validate(CLAccessor(_target), _reference, tolerance_f16, tolerance_num); } TEST_SUITE_END() -- cgit v1.2.1