Skip to content

fix correctly rounded behavior for math bruteforce tests #2397

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

bashbaug
Copy link
Contributor

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.

@bashbaug bashbaug marked this pull request as draft May 22, 2025 23:04
@bashbaug bashbaug marked this pull request as ready for review June 3, 2025 16:57
@bashbaug
Copy link
Contributor Author

bashbaug commented Jun 5, 2025

Related spec change: KhronosGroup/OpenCL-Docs#1386

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

math bruteforce correctly rounded square root vs. non-correctly rounded test confusion
1 participant