mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-21 06:49:02 +00:00
fix correctly rounded behavior for math bruteforce tests (#2397)
fixes #2387 Corrects the "correctly rounded" behavior for the math bruteforce tests. Specifically: * Only applies the `-cl-fp32-correctly-rounded-divide-sqrt` build option for the `divide_cr` and `sqrt_cr` tests. The other tests do not receive this build option. This means that there is a difference in the behavior of the `divide` and `divide_cr` tests and the `sqrt` and `sqrt_cr` tests, and the "correctly rounded" build option is not applied to the fp16 or fp64 tests. * Removes the build option to toggle testing the correctly rounded divide and square root tests since it no longer needed. Instead, the test names can be used to choose whether to test the correctly rounded functions or the non-correctly rounded functions. Additionally: * Relaxes the fp16 sqrt accuracy requirements to 1 ULP. This is needed to pass this test on some of our devices. This part is still under discussion, so I will keep this PR as a draft until it is settled.
This commit is contained in:
@@ -563,10 +563,12 @@ int TestFunc_Float_Float(const Func *f, MTdata d, bool relaxedMode)
|
||||
INFINITY; // out of range resut from finite inputs must be numeric
|
||||
}
|
||||
|
||||
bool correctlyRounded = strcmp(f->name, "sqrt_cr") == 0;
|
||||
|
||||
// Init the kernels
|
||||
BuildKernelInfo build_info{ test_info.threadCount, test_info.k,
|
||||
test_info.programs, f->nameInCode,
|
||||
relaxedMode };
|
||||
test_info.programs, f->nameInCode,
|
||||
relaxedMode, correctlyRounded };
|
||||
if ((error = ThreadPool_Do(BuildKernelFn,
|
||||
gMaxVectorSizeIndex - gMinVectorSizeIndex,
|
||||
&build_info)))
|
||||
|
||||
Reference in New Issue
Block a user