Visitar URL original
Editorial review: Add info about subgroup-size-control WebGPU feature by chrisdavidmills · Pull Request #46225 · mdn/content · GitHub
Skip to content

Editorial review: Add info about subgroup-size-control WebGPU feature - #46225

Merged
hamishwillee merged 8 commits into
mdn:mainfrom
chrisdavidmills:webgpu-subgroup-size-control-feature
Nov 23, 2026
Merged

hamishwillee merged 8 commits into
mdn:mainfrom
chrisdavidmills:webgpu-subgroup-size-control-feature

Conversation

@chrisdavidmills

Copy link
Copy Markdown
Contributor

Description

Chrome 152 adds support for the WebGPU subgroup-size-control feature; see https://chromestatus.com/feature/5077657663438848.

This PR adds information about this new feature to the GPUSupportedFeatures page.

@beaufortfrancois, can you please have a look?

Motivation

Additional details

Related issues and pull requests

@chrisdavidmills
chrisdavidmills requested a review from a team as a code owner October 21, 2026 14:35
@chrisdavidmills
chrisdavidmills requested review from hamishwillee and removed request for a team October 21, 2026 14:35
@github-actions github-actions Bot added Content:WebAPI Web API docs size/xs [PR only] 0-5 LoC changed labels Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Preview URLs (5 pages)

External URLs (5)

URL: /en-US/docs/Web/API/GPUAdapterInfo/subgroupMaxSize
Title: GPUAdapterInfo: subgroupMaxSize property


URL: /en-US/docs/Web/API/GPUAdapterInfo/subgroupMinSize
Title: GPUAdapterInfo: subgroupMinSize property


URL: /en-US/docs/Web/API/GPUSupportedFeatures
Title: GPUSupportedFeatures

(comment last updated: 2026-11-23 18:33:24)

@beaufortfrancois beaufortfrancois left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM with nit

@github-actions github-actions Bot added size/s [PR only] 6-50 LoC changed and removed size/xs [PR only] 0-5 LoC changed labels Oct 27, 2026
chrisdavidmills and others added 4 commits October 27, 2026 10:10
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@chrisdavidmills chrisdavidmills changed the title Add info about subgroup-size-control WebGPU feature Editorial review: Add info about subgroup-size-control WebGPU feature Oct 27, 2026

@hamishwillee hamishwillee left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@chrisdavidmills What we really should do here is define things like subgroups in our docs. As it is now if you're in GPUAdapterInfo.subgroupMinSize you don't get a definition of what they are, but you get sent to this page, which then sends you to the Chromedocs. Those docs aren't bad, but frankly Claude made it much clearer to me:

Details

A GPU runs a compute shader as thousands of small threads. You arrange them into workgroups, and you choose the workgroup size with @workgroup_size(64). The hardware then runs each workgroup in smaller batches that move in lockstep, called subgroups (NVIDIA calls them "warps", AMD calls them "wavefronts"). Threads in the
same subgroup can swap values or add up a sum almost for free, without the slower shared memory and barriers. That's what the subgroups feature gives you access to.

The problem: the subgroup size depends on the hardware, and sometimes it changes from one shader to the next.
NVIDIA uses 32, AMD 32 or 64, and Intel 8, 16 or 32. Without this feature, the shader compiler picks the size for you. subgroupMinSize and subgroupMaxSize only tell you the possible range, not the size you'll actually get. Code tuned for exactly 32 threads per subgroup, such as a matrix-multiply kernel in an AI model, can't rely on getting 32.

What subgroup-size-control adds: it lets you choose the size yourself.

An analogy: a class split into teams, where team members can pass notes to each other instantly. Before, the school decided how big the teams were, and the size changed from room to room. Now you can say "teams of 32, lease". The request is refused if the room can't do it: the size isn't a power of 2, it's outside the min/max range, or the class doesn't split evenly into teams of that size. The spec also says pipeline creation can still fail on some hardware even when the size is within range.

Anyway, this upsate is the same level of "not great" as the stuff around it so if you don't want to go to town on this (and I understand why not), what I need to approve is:

  1. Put "subgroups" in table before the new feature: at least that way you might have found the links before you get to the size control part.

  2. Make all internal links consistently use domxref. There is a mixture of links here.

  3. Evaluate these three claude-reported bugs that preexisted, but are in lines you touched

    • Line 45: "texture-compression-bc must also be enabled". The spec enables it automatically.
    • Line 47: the same problem for texture-compression-astc.
    • Line 50: Tier 2 doesn't add formats that core WebGPU lacks. It adds "read-write" storage access to formats.
  4. Check the claude report below and consider which of these need looking at. Up to you which ones. I'm not as concerned about passive voice as our style guide.

Details

files/en-us/web/api/gpusupportedfeatures/index.md

Line: 19
Issue: "If you want to use… thorough testing is advised" addresses the reader, then switches to the passive
voice, even though the reader is the one who should test
Severity: minor
Suggestion: "…in a WebGPU app, test it thoroughly."
────────────────────────────────────────
Line: 41
Issue: (1) subgroups means the WGSL extension in the link and the WebGPU feature in the parenthetical. The
"automatically enabled" parenthetical also doesn't follow the "When enabled, automatically enables X"
pattern of the tier1/tier2 rows. (2) The 42-word "This allows you…" sentence has no clear referent for "This".
"Which is beneficial" attaches to the wrong noun, and "such as for AI workloads" reads as if AI workloads
were platforms. (3) The link "See [Subgroup size control]" goes to a one-off Chrome release blog post (an
ephemeral source, and browser-specific). Its link text reads like an MDN section.
Severity: style
Suggestion: Rewrite the row; see the suggestion block below
────────────────────────────────────────
Line: 41
Issue: subgroupMinSize/subgroupMaxSize are plain Markdown links, but line 42 uses {{domxref}} for the same
pages. "Subgroup size must be…" doesn't say it means the value passed to @subgroup_size(). "Subgroup" is
used
before line 42 explains it. "Beneficial" is never explained: without the attribute, the compiler picks the
size. The row leaves out the spec rule that the @workgroup_size x-dimension must be a multiple of the value
(WGSL §12.14).
Severity: minor
Suggestion: Covered by the same rewrite below
────────────────────────────────────────
Line: 42
Issue: "cross-threaded" means a stripped screw; the old text's "cross-thread" was right. Changing "offering"
to
"provide" makes "provide" read as a third thing the threads do, which breaks the parallel structure.
Severity: style
Suggestion: "…and share data efficiently across threads."
────────────────────────────────────────
Line: 42
Issue: "SIMD" isn't explained, though MDN has a glossary entry for it. "Useful to check if… you have a
hardcoded algorithm" reads as checking whether you have an algorithm.
Severity: minor
Suggestion: {{glossary("SIMD")}}. "…to check whether the adapter supports the subgroup size a hardcoded
algorithm needs"
────────────────────────────────────────
Line: 43
Issue: The rewrite makes the feature the actor ("This feature can rearrange or replace…"). In the spec,
texture
views do the rearranging, through swizzle (WebGPU §25.22).
Severity: minor
Suggestion: "This lets a texture view rearrange or replace a texture's red, green, blue, and alpha channel
values when a shader accesses it."
────────────────────────────────────────
Line: 45
Issue: "texture-compression-bc must also be enabled" tells readers they must request both features. WebGPU
§3.6.1.2 says requesting sliced-3d enables texture-compression-bc implicitly. Line 41 now says
"automatically
enabled" for the same mechanism, so the page now describes it two ways.
Severity: bug
Suggestion: "When enabled, automatically enables texture-compression-bc…" (block below)
────────────────────────────────────────
Line: 45
Issue: The directional "(see texture-compression-bc, above)". The row also says the 3D claim twice, and "those same textures" points back to formats.
Severity: style
Suggestion: Fixed by the rewrite below
────────────────────────────────────────
Line: 47
Issue: Same as line 45: the spec enables texture-compression-astc automatically (§3.6.1.2)
Severity: bug
Suggestion: Same rewrite as line 45, for ASTC
────────────────────────────────────────
Line: 47
Issue: Same as line 45: "(see texture-compression-astc, above)", plus the repeated 3D claim
Severity: style
Suggestion: Fixed by the rewrite
────────────────────────────────────────
Line: 49
Issue: "without rewriting it to use WebGPU's lower capabilities" doesn't say which capabilities are lower
Severity: minor
Suggestion: "…without rewriting it to fit the smaller set of texture formats that core WebGPU supports."
────────────────────────────────────────
Line: 50
Issue: "supports storage texture formats unsupported in 'core' WebGPU" is wrong. Tier 2 allows "read-write"
storage access on formats such as rgba8unorm and rgba16float, which core already supports as storage
textures
(WebGPU §25.20).
Severity: bug
Suggestion: See the block below
────────────────────────────────────────
Line: 50
Issue: The edit broke the agreement between subject and verb: "The Tier 2 set… supports… and are required".
"Supports… unsupported" also repeats itself.
Severity: style
Suggestion: Fixed by the rewrite below

Line 41 suggestion

▎ When enabled, automatically enables the subgroups feature, and allows the use of the subgroups and
▎ subgroup_size_control extensions in WGSL. You can then set the subgroup size of a compute pipeline with the
▎ @subgroup_size() attribute on a compute shader entry point, rather than leaving the choice to the device's
▎ shader compiler. This lets you tune subgroup operations for specific hardware, for example in AI workloads.
▎ The value passed to @subgroup_size() must be a power of 2 between the adapter's
▎ {{domxref("GPUAdapterInfo.subgroupMinSize", "subgroupMinSize")}} and
▎ {{domxref("GPUAdapterInfo.subgroupMaxSize", "subgroupMaxSize")}}, inclusive, and the x-dimension of the
▎ shader's @workgroup_size must be a multiple of it.

Line 45 suggestion (line 47 is the same, with ASTC)

▎ When enabled, automatically enables texture-compression-bc, and allows creation of three-dimensional BC
▎ compressed textures. texture-compression-bc provides the BC texture formats for two-dimensional textures,
▎ and texture-compression-bc-sliced-3d extends them to three-dimensional textures.

Line 50 suggestion

▎ …The Tier 2 set allows read-write storage access on additional texture formats, which some advanced
▎ techniques require.

Pre-existing issues on lines this PR didn't change

  • Line 46: "astc-12x12-unorm``astc-12x12-unorm-srgb" is missing ", and " between the two code spans.
    ▎ require.

Pre-existing issues on lines this PR didn't change

Line 50 suggestion
Line 50 suggestion

Line 45 suggestion (line 47 is the same, with ASTC)

▎ {{domxref("GPUAdapterInfo.subgroupMaxSize", "subgroupMaxSize")}}, inclusive, and the x-dimension of the shader's @workgroup_size must be a multiple of it.

Line 45 suggestion (line 47 is the same, with ASTC)

Line 45 suggestion (line 47 is the same, with ASTC)

▎ {{domxref("GPUAdapterInfo.subgroupMaxSize", "subgroupMaxSize")}}, inclusive, and the x-dimension of the shader's @workgroup_size must be a multiple of it.

Line 45 suggestion (line 47 is the same, with ASTC)
Line 45 suggestion (line 47 is the same, with ASTC)

▎ "subgroupMaxSize")}}, inclusive, and the x-dimension of the shader's @workgroup_size must be a multiple of it.

Line 45 suggestion (line 47 is the same, with ASTC)
Line 45 suggestion (line 47 is the same, with ASTC)

▎ When enabled, automatically enables texture-compression-bc, and allows creation of three-dimensional BC compressed textures. texture-compression-bc provides the BC texture formats for two-dimensional textures, and
▎ texture-compression-bc-sliced-3d extends them to three-dimensional textures.

Line 50 suggestion

▎ …The Tier 2 set allows read-write storage access on additional texture formats, which some advanced techniques require.

Pre-existing issues on lines this PR didn't change

  • Line 46: "astc-12x12-unorm``astc-12x12-unorm-srgb" is missing ", and " between the two code spans.
  • files/en-us/web/api/gpudevice/createtexture/index.md line 163 makes the same wrong Tier 2 claim as line 50. Fixing only this page would leave the two pages disagreeing.
  • The GPUAdapterInfo.subgroupMinSize and subgroupMaxSize pages mention only subgroups. They could also mention that they set the allowed range for @subgroup_size().

@github-actions github-actions Bot added size/m [PR only] 51-500 LoC changed and removed size/s [PR only] 6-50 LoC changed labels Nov 17, 2026
@chrisdavidmills

Copy link
Copy Markdown
Contributor Author

Put "subgroups" in table before the new feature: at least that way you might have found the links before you get to the size control part.

Done

Make all internal links consistently use domxref. There is a mixture of links here.

Done

Evaluate these three claude-reported bugs that preexisted, but are in lines you touched

  • Line 45: "texture-compression-bc must also be enabled". The spec enables it automatically.
  • Line 47: the same problem for texture-compression-astc.
  • Line 50: Tier 2 doesn't add formats that core WebGPU lacks. It adds "read-write" storage access to formats.

Fixed them all. The third one is definitely wrong, but I think the first two have changed behavior since I published them.

Check the claude report below and consider which of these need looking at. Up to you which ones. I'm not as concerned about passive voice as our style guide.

I've fixed most of these, but I've left a few of them where the description of what is wrong was confusing and I wasn't sure what to do, without loads of munging.

I also changed the wording on the subgroupMinSize and subgroupMaxSize pages so that it is a bit more useful, and links directly to the spec's subgroup definition, meaning the reader will read that before the subgroup size definition if they follow the link.

Thanks, @hamishwillee.

@hamishwillee hamishwillee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@chrisdavidmills LGTM - or at least as good as is reasonable given the broader state of the docs.

Approving, but not merging in case you want to fix https://github.com/mdn/content/pull/46225/changes/bac5b60d5d483880a31cbcb6e54ba72faee616b8..02cf1c56e016ec7755aae9dd73a57f1a871cb8df#r4638840632 here.

@chrisdavidmills
chrisdavidmills requested a review from a team as a code owner November 23, 2026 18:30
@chrisdavidmills
chrisdavidmills requested review from hamishwillee and pepelsbey and removed request for a team November 23, 2026 18:30
@chrisdavidmills
chrisdavidmills removed the request for review from pepelsbey November 23, 2026 18:30
@hamishwillee
hamishwillee merged commit e4ffa5e into mdn:main Nov 23, 2026
14 checks passed
@hamishwillee

Copy link
Copy Markdown
Collaborator

Thanks very much @chrisdavidmills !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants