docs / GPU Programming / WGSL Backend Limits

WGSL backend limits

Miri's first GPU backend targets WebGPU (WGSL) through wgpu, the most portable GPU host driver. A few features sit outside WGSL's core. Each is gated explicitly — refused before dispatch with a clear message, never miscomputed:

FeatureBehavior today
Native i64 / u64 / f64Run on adapters that support them (checked before dispatch). Refused otherwise. Not available in browser bundles.
Warp / subgroup opsRun on adapters with subgroup support. Refused otherwise.
64-bit atomicsUnavailable — Atomic<T> is 32-bit only.
Cooperative matrix (tensor cores)Unavailable until the native backends land.
bf16 / fp8 / fp4Unavailable — f16 is the smallest float today.

WGSL stays the browser and embedded path. The native primaries — SPIR-V, PTX, Metal — target these features directly once the surface stabilizes. WGSL-first is an implementation milestone, not a long-term ranking.