v152 · graphics · webgpu
WebGPU: Subgroup Size Control
The optional WebGPU feature subgroup-size-control adds the WGSL enable subgroup_size_control extension and @subgroup_size(...) compute entry-point attribute so expert workloads can request a specific subgroup size.
concepts
Feature gate
Request a WebGPU adapter and check whether its optional features include
subgroup-size-control.WGSL shader builder
Generate the exact
enable subgroup_size_controland@subgroup_sizecompute shader text for a chosen subgroup size.Workgroup validation
Validate the power-of-two subgroup requirement and the
workgroup_size.xmultiple rule before trying pipeline creation.
why it shipped
Compute-heavy workloads such as AI kernels sometimes need predictable subgroup sizes for correctness testing, memory sizing, and architecture-specific performance tuning. The optional feature lets those apps request a size and handle pipeline-creation failure when the implementation cannot support it.