WebGPU benchmark
GEMM on your GPU
Same f32 matrices
C = A × B, N×N
MIND
pre-compiled WGSL
ONNX Runtime Web
WebGPU provider
Your GPU
WebGPU, this tab
Your numbers
ms · GFLOPS
MIND
A pre-compiled WGSL shader: 8×4 register tiling, vec4 loads and stride-17 padded shared memory, one 128×64 output tile per 16×16 workgroup.
- Average time
- not run yet
- Throughput
- not run yet
- Fastest dispatch
- not run yet
- Shader compile
- not run yet
ONNX Runtime Web
ONNX Runtime Web 1.21 with the WebGPU execution provider, running a static-shape MatMul model that matches the selected size.
- Average time
- not run yet
- Throughput
- not run yet
- Fastest dispatch
- not run yet
- Session init
- not run yet
How to enable WebGPU
- Chrome 113+ (Windows, macOS)On by defaultUses the native D3D12 or Metal backend.
- Edge 113+On by defaultChromium-based, same as Chrome.
- Chrome (older versions)Flag required
- Open
chrome://flags - Search for “WebGPU” and enable “Unsafe WebGPU”
- Relaunch the browser
- Open
- Chrome or Chromium (Linux)Launch flags
Launch from a terminal for the native Vulkan backend (use google-chrome in place of chromium if needed):
chromium --enable-unsafe-webgpu --use-angle=vulkan --enable-features=Vulkan - FirefoxDepends on version and OS
Where WebGPU is not on by default:
- Open
about:config - Set
dom.webgpu.enabledto true - Set
gfx.webgpu.force-enabledto true - Restart the browser
- Open
- SafariDepends on version and OS
Where WebGPU is not on by default:
- Safari, Settings, Advanced: check “Show Develop menu”
- Develop, Feature Flags: enable “WebGPU”
Open files
Source and method
The files this page runs are published next to it, unchanged.
- gemm.mindThe MIND source: a tiled GEMM kernel with static tensor types, shared-memory tiles and workgroup barriers.
- gemm.wgslThe WGSL shader this page runs, unchanged. Its header records the MIND compiler version that produced it.
- mind.tomlThe project manifest: WebGPU target, 16×16 workgroup size and high-performance power preference.
- 01
Warm up
1 dispatch, uncounted
- 02
Timed runs
5 synced dispatches
- 03
GFLOPS
2·N³ / average time
- 04
Compile time
Amortised when on
Methodology
Both paths perform the same operation, C = A × B, where A, B and C are 1024×1024 f32 matrices. Each run has 1 warmup dispatch (not counted), then 5 timed dispatches with queue.onSubmittedWorkDone() synchronisation between each. GFLOPS = 2·N³ / average time.
MIND uses a pre-compiled WGSL compute shader fetched from /bench/gemm/gemm.wgsl: 8×4 register tiling (32 FMAs per inner-loop iteration), bank-conflict-free shared memory (stride-17 padding) and vec4 loads. Shader compile time is measured separately and not included in the dispatch average.
ONNX Runtime Web 1.21 uses the WebGPU execution provider with a static-shape MatMul model matching the selected size, giving it full opportunity to specialise its kernel. Session init time (including generating WGSL from the ONNX graph) is measured separately.
Include compile time amortises each side's compile or init cost across the timed runs: effective = (compile + Σ dispatch) / N. For MIND that cost is fetching a pre-built WGSL file and creating a pipeline; for ONNX Runtime Web it includes runtime WGSL generation.
The WebGPU compile path that produced this shader ships in the commercial mind-runtime; the open-source compiler ships the deterministic CPU backend. This page measures GEMM dispatch speed on your GPU. Byte-identical determinism across GPU substrates is a roadmap item, not a property of this benchmark.
Results vary by GPU, driver version, browser and system load.