-
Notifications
You must be signed in to change notification settings - Fork 24
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
add a float atomics sample #125
Conversation
This is currently a "draft" because the emulated floating-point atomic add that returns a value is not producing correct intermediate results. The final results of all floating-point atomic adds is correct, though, and the intermediate results using To see the issue with intermediate results, pass the $ ./floatatomics -p3 -c -e
Running on platform: Intel(R) OpenCL Graphics
Running on device: Intel(R) Arc(TM) A750 Graphics
Forcing emulation.
Finished in 0.007057 seconds
Basic Validation: Success.
Error at index 0: expected 0.000000, got 1.000000!
Error at index 1: expected 1.000000 > 1.000000!
<snip>
Intermediate Results Validation: Found 64797 mismatches / 65536 values!!! |
Might try to shift to the older OpenCL 1.x atomics to improve portability.
After some discussion, I confirmed that the emulated float atomic implementation that uses The non-emulated versions are still preferred and are chosen by default, for supporting devices. |
Adds a sample demonstrating how to use floating-point atomics in an OpenCL kernel.