You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GPU tests on Linux run on SwiftShader instead of the real GPU #121
On Linux, pnpm --filter runntime test:gpu does not run on the machine's GPU. Headless Chromium launched with only --enable-unsafe-webgpu (packages/runntime/vitest.config.ts) gets a SwiftShader adapter, the CPU fallback, which has no shader-f16. Nothing says so: the shader-f16 cases skip with their reason and the run looks like a normal one.
Same machine, same code (the branch of #120), 1849 tests:
adapter
passed
skipped
failed
time
SwiftShader (current config)
858
949
35
338 s
AMD GPU (with the flags below)
1840
0
1
47 s
On SwiftShader half the suite is skipped, and the 35 failures are timeouts, SwiftShader rounding and leak lists written for the f16 routes. #57 was found on the real GPU, where main fails 97 tests.
bench/vitest.config.ts has the same problem, so bench:ab on Linux measures SwiftShader.
The real GPU needs both --enable-features=Vulkan and --use-angle=vulkan. Either one alone still gives SwiftShader.
Steps to reproduce
On Linux with a Vulkan driver, run pnpm --filter runntime test:gpu.
949 tests are skipped. navigator.gpu.requestAdapter() in that browser reports google / swiftshader, shader-f16 missing.
Add '--enable-features=Vulkan', '--use-angle=vulkan' to launchOptions.args and run again: the adapter is the GPU, with shader-f16, and nothing is skipped.
Proposed fix: add those two flags to both vitest configs only when process.platform === 'linux', so macOS and Windows keep their current setup. I don't know if the current config is meant to fall back to SwiftShader on Linux, so I'll wait for your confirmation: if this sounds right, let me know and I'll open the PR.
Activity