-
Notifications
You must be signed in to change notification settings - Fork 724
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
[SYCL][CUDA] sycl::atomic_ref usage on CUDA backend produces linking error #5647
Comments
I had the same error previously. I believe it's because the default address space is |
Yes it generic: llvm/sycl/include/CL/sycl/atomic_ref.hpp Line 659 in 5e6995e
|
Thanks a lot! That indeed works. I'll have to check tomorrow if that combination of template parameters will work in our actual code under all circumstances, but it smells like it should. |
@krasznaa Glad it helped :) You might still need to adapt the address_space (as |
I wrote
However, it gives this error
|
When I tried Thanks in advance! |
This has been fixed in the CUDA backend in: #7391 |
Let me close this then. It has not affected out code in quite some time. |
Describe the bug
In the past I've made use of
sycl::atomic
for atomic operations in our code, which used to behave well on all backends that I tried. (Including the CUDA and HIP ones.) Now that the latest nightlies warn aboutsycl::atomic
being deprecated, I tried to teach our code to usesycl::atomic_ref
instead when it is available.But when I do that, building the code for an NVIDIA backend fails like:
To Reproduce
Take the following example:
In this exact form (without
USE_ATOMIC_REF
being defined) it builds and runs correctly, albeit with a good number of warnings.But if I un-comment the line defining
USE_ATOMIC_REF
, the build fails with:I tried a few different arguments for the memory order and memory scope template arguments, but that didn't seem to make much of a difference.
Environment (please complete the following information)
Pinging @fwyzard and @ivorobts.
The text was updated successfully, but these errors were encountered: