From 39fa6e6d1b8c7c6c8ef6a411c2ed162c17dc91a5 Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Tue, 16 Jul 2024 18:53:18 +0200 Subject: [PATCH] math_brute_force: remove spurious tan skip check (#1992) The `skipTestingRelaxed` check suffers the following problems: - The use of `skipTestingRelaxed` in the `if` seems reversed: when skipping correctness testing using the `-l` command line option, this variable causes correctness testing to be run for relaxed-mode `tan` regardless. - Accuracy testing should only be skipped for derived `tan` implementations. Non-derived `tan` implementations must still be tested for accuracy, so the condition for setting the `skipTestingRelaxed` variable is incomplete. - It is unclear why only `tan` is conditionalized here. There are other functions such as `tanpi` for which one would expect identical behaviour. The actual skipping of accuracy checks for derived implementations happens in `Test()`, so just remove `skipTestingRelaxed` as it does not seem to add any value. Signed-off-by: Sven van Haastregt --- test_conformance/math_brute_force/unary_float.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/test_conformance/math_brute_force/unary_float.cpp b/test_conformance/math_brute_force/unary_float.cpp index 9666d5ea4..cd93d3c97 100644 --- a/test_conformance/math_brute_force/unary_float.cpp +++ b/test_conformance/math_brute_force/unary_float.cpp @@ -489,7 +489,6 @@ int TestFunc_Float_Float(const Func *f, MTdata d, bool relaxedMode) cl_int error; float maxError = 0.0f; double maxErrorVal = 0.0; - int skipTestingRelaxed = (relaxedMode && strcmp(f->name, "tan") == 0); logFunctionInfo(f->name, sizeof(cl_float), relaxedMode); @@ -583,7 +582,7 @@ int TestFunc_Float_Float(const Func *f, MTdata d, bool relaxedMode) return error; // Run the kernels - if (!gSkipCorrectnessTesting || skipTestingRelaxed) + if (!gSkipCorrectnessTesting) { error = ThreadPool_Do(Test, test_info.jobCount, &test_info); if (error) return error; @@ -603,12 +602,6 @@ int TestFunc_Float_Float(const Func *f, MTdata d, bool relaxedMode) else vlog("passed"); - if (skipTestingRelaxed) - { - vlog(" (rlx skip correctness testing)\n"); - return error; - } - vlog("\t%8.2f @ %a", maxError, maxErrorVal); }