OpenCL-CTS icon indicating copy to clipboard operation
OpenCL-CTS copied to clipboard

correctly rounded divide test for half is not using a correctly rounded reference

Open b-sumner opened this issue 7 months ago • 9 comments

The new correctly rounded divide test for half precision, located in binary_operator_half.cpp is using an fptr for its reference function and computing the reference like this:

    s[j] = HTF(p[j]);
    s2[j] = HTF(p2[j]);
    r[j] = HFF(func.f_ff(s[j], s2[j]));

Here func.f_ff works out to reference_divide(). So r[j] starts with the double precision rounded result of the divide, rounds it to single precision and then rounds that to half. That's 3 roundings instead of the required single rounding.

Shouldn't this test be disabled until a correct reference is used?

b-sumner avatar Jul 01 '24 16:07 b-sumner