v134 · graphics

WebGPU Subgroups

Adds subgroup functionality to WebGPU. Subgroup operations perform SIMT operations to provide efficient communication and data sharing among groups of invocations. These operations can be used to accelerate applications by reducing memory overheads incurred by inter-invocation communication.

concepts

  1. Subgroups

    WebGPU exposes subgroup operations (SIMD-style intrinsics within a workgroup). Big speedup for compute workloads.

  2. Reduction: subgroups vs workgroup memory

    The GPUweb explainer microbench: sum-reduce 1M floats two ways — log₂N barriers vs subgroupAdd — and time both on this adapter.

  3. WGSL Playground

    Edit a WGSL compute shader using subgroupAdd / Max / Broadcast / Shuffle. Run it on this adapter, read back the buffer; adapter limits and subgroup size exposed.

  4. Subgroup Ops Explorer

    Browse the full catalog of subgroup operations with WGSL examples and speedup ratings. Probe real adapter support and watch animated invocation-grid simulations for broadcast, reduce, shuffle, elect, and ballot.

why it shipped

Subgroup operations can provide significant performance advantages for many algorithms from sorting to ML. They provide efficient communication and data sharing between invocations in a subgroup (generally between 4 and 64 invocations). Work dispatches are divided hierarchically into subgroups (e.g. a workgroup is divided into multiple subgroups). Each of the underlying APIs used to implement WebGPU provides a common subset of functionality that can be exposed to users.

references