Skip to content

Add subgroup_uniformity language extension#5431

Merged
alan-baker merged 2 commits intogpuweb:mainfrom
alan-baker:subgroup-uniformity
Dec 15, 2025
Merged

Add subgroup_uniformity language extension#5431
alan-baker merged 2 commits intogpuweb:mainfrom
alan-baker:subgroup-uniformity

Conversation

@alan-baker
Copy link
Contributor

@alan-baker alan-baker commented Nov 7, 2025

  • Adds subgroup uniformity language
  • When supported uniformity analysis is performed at twice (at different scopes)

See: #5368

* Adds subgroup uniformity language
* When supported uniformity analysis is performed at twice (at different
  scopes)
@alan-baker alan-baker requested a review from dneto0 November 7, 2025 04:02
@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

Previews, as seen when this build job started (c5a46a5):
WebGPU webgpu.idl | Explainer | Correspondence Reference
WGSL grammar.js | wgsl.lalr.txt

Copy link
Contributor

@dneto0 dneto0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good functionally.

Mostly a request for editorial strengthening: add a definition of "uniformity scope" and making uniform control flow be defined with respect to a particular scope.

@dneto0
Copy link
Contributor

dneto0 commented Nov 7, 2025

Mostly a request for editorial strengthening: add a definition of "uniformity scope" and making uniform control flow be defined with respect to a particular scope.

This strengthening could be done now, uncoupled from the subgroup uniformity change.

* Add uniformity scope and related definitions and update text to use
  them
* Add a note about combining scopes in the analysis
@alan-baker alan-baker requested a review from dneto0 November 9, 2025 03:01
Copy link
Contributor

@dneto0 dneto0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is much better, thank you.

I think it's not necessary to update the description of the subgroup_uniformity diagnostic.

A call to a subgroup or quad builtin function, but uniformity analysis cannot prove that the call occurs in uniform control flow. Additionally, when uniformity analysis cannot prove that the following parameter values are uniform: ...

I think that still holds, because it inherits the shift in uniformity scope for the subgroup and quad builtins.

It still feels a little inside-out to have the definitions of the uniformity scope in the bullet point for uniform control flow. It feels like it uniformity scopes should be defined more up front in the previous section. But this PR is an improvement to the spec and should not be blocked on that. (Also, I want to draft what I have in mind to see if it reads better.)

@alan-baker alan-baker marked this pull request as ready for review December 3, 2025 16:18
ajperel pushed a commit to chromium/chromium that referenced this pull request Dec 11, 2025
Spec: gpuweb/gpuweb#5431
CTS: gpuweb/cts#4516

Both are approved and waiting for final coordination to land.

Fixed: 454979994
Change-Id: I7e20e3360536040941d7d7181d79bf111da05a63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7236332
Commit-Queue: Alan Baker <alanbaker@google.com>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1557102}
@alan-baker alan-baker merged commit fbaf903 into gpuweb:main Dec 15, 2025
4 checks passed
@alan-baker alan-baker deleted the subgroup-uniformity branch December 15, 2025 21:27
alan-baker added a commit to alan-baker/webgpu-headers that referenced this pull request Jan 8, 2026
@gpuweb gpuweb deleted a comment from pohi99999 Jan 12, 2026
kainino0x added a commit to webgpu-native/webgpu-headers that referenced this pull request Jan 22, 2026
Spec PR merged here:
gpuweb/gpuweb#5431

Co-authored-by: Kai Ninomiya <kainino@chromium.org>
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

Successfully merging this pull request may close these issues.

3 participants