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

Legacy (pre-CUDA 9.0) warp-level primitives in divergent code mismatch with subgroup semantics #210

Open
pjaaskel opened this issue Oct 21, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@pjaaskel
Copy link
Collaborator

pjaaskel commented Oct 21, 2022

The legacy CUDA warp-level functions such as __shfl() [can be called from divergent regions (if the programmer is careful to avoid undefined values in the non-active lanes). See Listing 13 here.

However, OpenCL specifies subgroup functions to be like subgroup barrier calls related to covergence, they must be reached by all WIs inside the subgroup.

This means that above codes might end up in a barrier deadlock. We should probably add a compiler pass to detect these cases. Implementing them (like the new masked warp-level functions) is not trivial with subgroups/OpenCL and needs a further extension.

@pjaaskel
Copy link
Collaborator Author

pjaaskel commented Dec 5, 2022

Moved the lockstep semantics part to another issue: #275.

@pjaaskel
Copy link
Collaborator Author

This is related to #381. Most likely also other warp/WG-level functions of CUDA assume the "or exited" semantics whereas OpenCL doesn't recognize that.

@pvelesko pvelesko added the enhancement New feature or request label May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants