Skip to content
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

Atomic scope #410

Open
syifan opened this issue Aug 3, 2017 · 4 comments
Open

Atomic scope #410

syifan opened this issue Aug 3, 2017 · 4 comments

Comments

@syifan
Copy link

syifan commented Aug 3, 2017

I am wondering what is the scope of the atomic operation in the hc namespace. HSA platform requires CPU that support system level atomic. So, is the atomic operation in C++ HC system level? Or it depends on the devices? If the atomic is not system level, is that possible to use system level atomic in C++ HC?

@jvesely
Copy link
Contributor

jvesely commented Aug 21, 2017

atomic operations are system level (i.e. work between CPU and GPU).
I haven't tested dGPUs which require special flag for the atomic instructions.
the following tests work as expected on carrizo APU:
https://github.com/jvesely/hcc-atomic-test.git

@syifan
Copy link
Author

syifan commented Sep 28, 2017

@jvesely Thank you very much. Finally got a chance to test. The system level atomic works on APUs but not dGPUs. Do you know if there is any way to enable dGPU like R9 nano to support system level atomic? I know system level atomic is a requirement for the hardware to use ROCm, but as a user, can I use it?

@jvesely
Copy link
Contributor

jvesely commented Sep 29, 2017

Sounds like either l2$ configuration bug, or wrong code generated by the compiler (missing SLC flag for atomic instructions). Either way you'll need someone from AMD to address it.

@jvesely
Copy link
Contributor

jvesely commented Oct 30, 2017

you can check the discussion here:
https://reviews.llvm.org/D39350
looks like system scope atomics are not supported on dGPUs

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

No branches or pull requests

2 participants