Skip to content

WebGPU subgroups for attention and matmul shaders #386

Description

@sauravpanda

Context

WebGPU subgroups (shipping Chrome 144-145) enable warp-level SIMT operations. Benchmarks show up to 13x speedup, 26x with swizzle on some GPUs.

Proposal

  • Add subgroup reductions to attention softmax (replace shared memory reduction)
  • Use subgroup shuffle for matmul accumulation
  • Feature-detect subgroup support, fallback to existing shaders
  • Subgroup ballot for sparse attention patterns

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    browserBrowser/WASM specificperformancePerformance optimization

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions