-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added cl_half support for test_bruteforce #1681
Conversation
Testing / reviewing. |
We would like to double check results at our end, can we get some more time. |
…sts for cl_half (issue KhronosGroup#142, bruteforce)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requesting changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me now; thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a quick run with these changes on our implementation with:
test_bruteforce -f -r -w -1
Aside from the known failure with fract
I'm also seeing a failure with divide_cr
:
83: divide_cr fp16
ERROR: divide_cr: -0.500000 ulp error at {-0x1.394p-12 (0x8ce5), -0x1.cp+5 (0xd300)}
Expected: 0x1.68p-18 (half 0x005a)
Actual: 0x1.64p-18 (half 0x0059) at index: 22220
ERROR: ThreadPool_Do: TestHalf failed
! (CL_DEVICE_NOT_FOUND from /home/bashbaug/git/OpenCL-CTS/test_conformance/math_brute_force/binary_operator_half.cpp:667)
divide_cr FAILED
I haven't investigated further but I wanted to raise this ASAP.
|
It looks like the tests are checking for a correctly rounded result in this case, but it's not clear this is required. The build option specifically says (emphasis mine): "-cl-fp32-correctly-rounded-divide-sqrt I think the safest thing to do would be to disable the I'll look at |
Correctly rounded results for fp16-divide and fp16-sqrt are not dictated by That made me realize that the additions to |
We are seeing failures in multiple tests with this patch and haven't fully resolved them to bugs in the test or in our implementation. List: Add -> Fails when one or more inputs are subnormal. |
float err2, err3; | ||
|
||
correct2 = HTF(func.f_ff(0.0, s2[j])); | ||
correct3 = HTF(func.f_ff(-0.0, s2[j])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The half_to_float is unnecessary here since func.f_ff() returns a double. Similar changes are needed elsewhere in the code as well.
correct2 = func.f_ff(0.0, s2[j]);
correct3 = func.f_ff(-0.0, s2[j]);
We're still debugging a few unexpected failures on our side, also. Can we merge these changes but with half testing disabled by default, able to be enabled via command line arguments? Then, when debug is complete and any issues are fixed, we can re-enable half testing by default? |
That sounds good to me; as this is a very large patch, it will be hard to get everything right the first time without the patch going stale. |
I just created an |
Got 2 fails with
|
I'm seeing
on our implementation. |
Removing "focused review", since we are reviewing and merging changes into the staging branch now. |
I was asked to open a PR for this against |
The |
When is this PR expected to be merged? |
This PR was merged to main branch along with this |
According to issue description (bruteforce section):
#142
Additional remark: This PR is based on @gwawiork work from PR #1433. Due to long approval process it was necessary to rebase and adapt to #1634 modernization. Due to reassignment to
mobica-backlog
it was more convenient to introduce new PR (which was discussed with Grzegorz).