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

volatile atomics should include .mmio in their lowering to uphold what CUDA C++ promises about volatile #1613

Open
jrhemstad opened this issue Apr 10, 2024 · 3 comments
Assignees

Comments

@jrhemstad
Copy link
Collaborator

volatile atomics should include .mmio in their lowering to uphold what CUDA C++ promises about volatile.

Originally posted by @gonzalobg in #1424

@wmaxey wmaxey self-assigned this Apr 18, 2024
@wmaxey
Copy link
Member

wmaxey commented May 2, 2024

@gonzalobg @griwes

Here's a topic up for discussion:
volatile atomic_ref<T> goes against the standard, however it appears that atomic_ref<volatile T> is allowable simply by omission. Would this be sufficient for exposing MMIO?

volatile atomic already serves its purpose for this as the volatile qualifier isn't shallow. I don't think we need to add any extra behavior there as it should end up on any volatile codepaths.

@gonzalobg
Copy link
Collaborator

atomic_ref is allowable simply by omission. Would this be sufficient for exposing MMIO?

Yes, but see both https://cplusplus.github.io/LWG/issue4069 and https://cplusplus.github.io/LWG/issue3508 .

@wmaxey
Copy link
Member

wmaxey commented May 7, 2024

atomic_ref is allowable simply by omission. Would this be sufficient for exposing MMIO?

Yes, but see both https://cplusplus.github.io/LWG/issue4069 and https://cplusplus.github.io/LWG/issue3508 .

Ah perfect. Thanks for the references. I would much rather implement according to 4069 as selectively stripping and adding CV qualifiers on the user API would be a nightmare.

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

No branches or pull requests

3 participants