WebGPU benchmark

GEMM on your GPU

A MIND-produced WGSL GEMM shader and ONNX Runtime Web's WebGPU backend run the same f32 matrix multiply on your GPU, in this tab. The result is your measurement, not ours.
Measured 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

Both sides run sequentially, never at once, so they do not compete for the GPU.
Matrix size

1024×1024 f32 · 2 GFLOP per run

Include compile time

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
Output will appear here.
How to enable WebGPU
  • Chrome 113+ (Windows, macOS)On by default
    Uses the native D3D12 or Metal backend.
  • Edge 113+On by default
    Chromium-based, same as Chrome.
  • Chrome (older versions)Flag required
    1. Open chrome://flags
    2. Search for “WebGPU” and enable “Unsafe WebGPU”
    3. Relaunch the browser
  • 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:

    1. Open about:config
    2. Set dom.webgpu.enabled to true
    3. Set gfx.webgpu.force-enabled to true
    4. Restart the browser
  • SafariDepends on version and OS

    Where WebGPU is not on by default:

    1. Safari, Settings, Advanced: check “Show Develop menu”
    2. Develop, Feature Flags: enable “WebGPU”

Open files

Source and method

The files this page runs are published next to it, unchanged.

The GEMM shader computes C one 128 by 64 tile per 16 by 16 workgroup, reading a row band of A and a column band of B for each tile.BAC128×64tile per16×16workgroup
One output tile per workgroup: 8×4 register tiling, vec4 loads, stride-17 padded shared memory.
  1. 01

    Warm up

    1 dispatch, uncounted

  2. 02

    Timed runs

    5 synced dispatches

  3. 03

    GFLOPS

    2·N³ / average time

  4. 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.