-
Notifications
You must be signed in to change notification settings - Fork 329
Description
Add subgroup (a.k.a. simd_group, wave, wavefront) operations. Favour portability.
There have been a number of earlier issues and PRs. None seemed quite right to restart the conversation, so I'm opening this new one.
Previous work:
- Introduce Subgroup Operations Extension #954 Closed. Oguz’s original PR.
- Includes discussion of nonportability: theoretical and theoretical and demo and Myles’s broader replication of the demo (including an M1 bug, and an Intel hang)
- Introduce Subgroup Operations Extension #1459 Closed. Oguz’s second PR.
- Add capability to query gpu "warp" size #4290 Request query for subgroup size (“warp”)
- Investigation: Querying Subgroup Support #78 Investigation: Querying subgroup support
- Considerations for subgroups #3950 Raph's “Considerations for subgroups”
- Request for compute: anyInvocation() and allInvocation() #2137 Request for compute: anyInvocation(), allInvocation()
Implementations
gfx-rs/wgpu#4428 Naga. request.
Interactions with uniformity:
- Annotation for the uniformity analysis #2323 annotation for uniformity analysis
- Uniformity annotations for global variables #1791 Uniformity annotations for global variables
Benefits: Subgroup operations offer compelling performance benefits.
Drawbacks: ( There are theoretical reasons to doubt their portability. Earlier discussion included tiny demonstrations of nonportability.
Subgroups were postponed out of "v1" until we could devote more energy to investigating them in more detail. Now is the time.
@alan-baker has been leading an effort at Google to:
- Implement an experimental subgroups extension supporting the "ballot" and "broadcast" operations only.
- Write prototype conformance tests to check the portability behaviours we were concerned about. You only need "ballot" to do this because it tells you the effective active mask.
- This work is in this draft PR: WIP: Experimental reconvergence tests cts#2916
Let's use this issue to show the data, and then discuss how to shape the feature.