KhronosGroup / KhronosGroup/Vulkan-Docs
Do Subgroup Shuffle Intrinsics require a preceeding `OpControlBarrier` with scope at least Subgroup to avoid UB?
- Dominant language
- JavaScript
- Stars
- 3.3k
- Forks
- 549
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 2
Description
We've ran into some really weird behaviour on Nvidia GPUs, it looked as-if Subgroup Shuffles were exchanging values where one or more invocation was at a different place in the SPIR-V code.
Its too long to write up in a GitHub issue, but its described in our blog post
https://graphics-programming.org/blog/subgroup-shuffle-execution-dependency-on-nvidia
Btw slight errata on the blogpost, broadcasts and relative shuffles with constant deltas can be implemented as register snooping, while shuffles with non-constant indices or relative deltas can't and the data exchange needs to happen through some bit of compiler allocated shared/on-chip memory.
Its possible that the compiler messed up the sync on on that bit of memory we don't even know exists or expect since the shuffles are pure SSA without taking any pointers.
Contributor guide
Assessment
This issue has not been assessed yet.