From 96ea9d601151eac929fae47f865a5ef07f55273a Mon Sep 17 00:00:00 2001 From: Jack Frankland <30410009+FranklandJack@users.noreply.github.com> Date: Thu, 2 Jul 2020 10:43:10 +0100 Subject: [PATCH] Skip Reduced Precision Testing (#819) * OpenCL versions before 2.0 do not have precision requirements for reduced precision math. * Skip reduced precision testing for devices with versions < 2.0. --- test_conformance/math_brute_force/main.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test_conformance/math_brute_force/main.cpp b/test_conformance/math_brute_force/main.cpp index 39e9a78e..2a343623 100644 --- a/test_conformance/math_brute_force/main.cpp +++ b/test_conformance/math_brute_force/main.cpp @@ -174,25 +174,30 @@ int doTest( const char* name ) InitILogbConstants(); } - if ( gTestFastRelaxed ) + if (gTestFastRelaxed && func_data->relaxed) { - if( func_data->relaxed ) + if (get_device_cl_version(gDevice) > Version(1, 2)) { gTestCount++; - vlog( "%3d: ", gTestCount ); + vlog("%3d: ", gTestCount); // Test with relaxed requirements here. if (func_data->vtbl_ptr->TestFunc(func_data, gMTdata, true /* relaxed mode */)) { gFailCount++; error++; - if( gStopOnError ) + if (gStopOnError) { gSkipRestOfTests = true; return error; } } } + else + { + vlog("Skipping reduced precision testing for device with " + "version 1.2 or less\n"); + } } if( gTestFloat )