WebGPU device hung test

Does your GPU lose the WebGPU device after a compute kernel with large function-scope arrays?

On an NVIDIA RTX 4070 (Windows, Chrome, D3D12 backend), the sequence below always ends in DXGI_ERROR_DEVICE_HUNG: a kernel holding more than 1652 32-bit ints (6608 bytes) of dynamically indexed function-scope arrays per thread, then any other dispatch in the same submit, then (after the GPU went idle) a later large kernel loses the device. There, 1652 ints never does it, 1653 always does, and a queue submit right after the large kernel prevents it. We do not know yet which GPUs are affected. Running this page and reporting the result helps answer that.

Reported upstream: Chromium issue 585125915. Workaround tracked in SpawnDev.ILGPU#10.

Before you run the test: on an affected GPU the screen may go black for a moment while Windows resets the display driver, and the browser may turn WebGPU off for this tab. Save your work first. Nothing is uploaded: the page only replays WebGPU calls locally, and the report below is sent only if you choose to open the GitHub issue.

1. Your GPU

Checking for WebGPU...

2. Run the tests (in this order)

Each test replays 855 recorded WebGPU calls (about 5 MB, 20 compute shaders) on a fresh device and takes 20 to 90 seconds, mostly shader compilation. The three tests differ only as stated.

On a slower CPU the page can stop responding for up to a minute while the browser compiles a large shader. That is normal and is not the bug: an affected GPU shows DEVICE LOST here when the test ends.

After a device loss, reload the page before the next test (results are kept). If WebGPU stays unavailable, restart the browser.

3. Report your result

Add your GPU driver version and the graphics backend if the report does not show them, then open the issue. In Chrome, starting it with --enable-webgpu-developer-features lets this page read both (backend, for example "D3D12", and driver) from the adapter. Reports from GPUs that pass are just as useful as from those that fail.

Results so far

GPUDriverBrowser / backendResult
NVIDIA RTX 4070 (lovelace)596.21, 621.14Chrome 157 (.52, .78), D3D12affected: 1653 loses the device, 1652 and 1653 + submit pass (repeated; also at workgroup sizes 1 and 256)
NVIDIA RTX 4070 (lovelace)621.14Chrome Canary 157.0.8079.0 and Edge 148, D3D12affected: 1653 loses the device, 1652 and 1653 + submit pass
NVIDIA RTX 4070 (lovelace)621.14Firefox 159 (wgpu)not affected: all three pass with 0 WebGPU errors
NVIDIA RTX 2060 (turing)610.88Chrome 157 (.50, .78), D3D12not affected: control, test and fix pass on this page; the original recording (1656 ints) passes too
AMD RX 590 (gcn-4)31.0.21925.1001Chrome 157 (.51), D3D12not affected: control, test and fix pass on this page; the original recording (1656 ints) passes too
NVIDIA GeForce 940MX (maxwell)430.63 (26.21.14.3063)Chrome 157 (.51), D3D12not affected: control, test and fix pass on this page
Intel HD Graphics 620 (gen-9)31.0.101.2145Chrome 157 (.51), D3D12not affected: control, test and fix pass on this page

Results from this page will be added here as reports come in.

How it works

The page replays a recording of every WebGPU call a real page made (a VP9 decode, then an encode, compiled to WGSL by SpawnDev.ILGPU). No application code runs: replay.js reissues the recorded calls in order and waits on each promise where the original page did. The decoder's two kernels were replaced by a small synthetic kernel (one thread loops over two function-scope arrays and touches no memory); the kernel that loses the device later is the real encoder kernel. Sources, the trace builder and details: github.com/LostBeard/webgpu-device-hung-test.