webgpu-local-testing
Skill22k starsChanged 3 months agoMITView on GitHub
Build and run ONNX Runtime WebGPU provider tests on Linux WITHOUT a real GPU, using a software Vulkan adapter (Mesa lavapipe). Use when you need to exercise WebGPU EP kernels off-Mac — the Linux webgpu CI leg is build-only, so software Vulkan is how you actually run WebGPU correctness tests locally. SCOPE - lavapipe only validates host-side enforce/shape bugs and MatMul-free kernels; any graph containing MatMul (including the expanded-Attention node tests) crashes lavapipe and runs ONLY on macOS-arm64 Metal, which is the source of truth for those. Covers install (dnf on Azure Linux), the --use_webgpu build flag, the onnxruntime_provider_test target, VK_ICD_FILENAMES, and the lavapipe MatMul crash gotcha.
Trending
Less talk lately.about the whole repository
Who's talking about microsoft/onnxruntime
- A Hacker News story“ONNX Runtime merges WebGPU backend”Hacker News · Apr 24, 2023 · 178 points
- immich-app/immich“feat(ml): introduce support of onnxruntime-rocm for AMD GPU”GitHub · Jul 12, 2024 · 28 reactions
- Unstructured-IO/unstructured“feat/numpy_2”GitHub · Oct 1, 2024 · 17 reactions
- microsoft/vcpkg“[onnxruntime] new ports for microsoft/onnxruntime v1.23.2”GitHub · Feb 19, 2024 · 17 reactions
- huggingface/transformers.js“Can GPU acceleration be used when using this library in a node.js environment?”GitHub · Feb 7, 2024 · 17 reactions
The biggest 5 of 39 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 39
Talked about on GitHub, Hacker News, Bluesky and the web (39 times).
On GitHub · 32
- Jul 12, 2024feat(ml): introduce support of onnxruntime-rocm for AMD GPU — immich-app/immich28 reactions · 58 comments
- Oct 1, 2024feat/numpy_2 — Unstructured-IO/unstructured17 reactions · 10 comments
- Feb 19, 2024[onnxruntime] new ports for microsoft/onnxruntime v1.23.2 — microsoft/vcpkg17 reactions · 80 comments
- Feb 7, 2024Can GPU acceleration be used when using this library in a node.js environment? — huggingface/transformers.js17 reactions · 6 comments
- Jan 21, 2024FAQ/GUIDE: I've figured out why CUDA isn't available in Insightface! — cubiq/ComfyUI_IPAdapter_plus17 reactions · 14 comments
27 more on GitHub
- Jan 8, 2020[request] some of most relevant c++ libraries in github (by number of stars) — conan-io/conan-center-index16 reactions · 132 comments
- Jun 18, 2024feat: add support for custom ai models | Pipeline API RFC — supabase/edge-runtime14 reactions · 18 comments
- Mar 16, 2021Add support for anchor tags — lycheeverse/lychee13 reactions · 39 comments
- May 14, 2024wanted: microsoft/onnxruntime — bazelbuild/bazel-central-registry11 reactions · 3 comments
- Mar 6, 2021[request] onnxruntime/1.7.1 — conan-io/conan-center-index11 reactions · 11 comments
- Nov 13, 2025Getting wrong .NET version — actions/setup-dotnet10 reactions · 18 comments
- May 8, 2025Enable Android 16 KB page size support — microsoft/onnxruntime-extensions9 reactions · 14 comments
- Apr 11, 2024Expose onnxruntime session options (intra_op_num_threads) — deepinsight/insightface9 reactions
- Sep 16, 2020Exporting the pytorch grid_sample operator to ONNX opset version 9 is not supported — pytorch/pytorch7 reactions · 1 comment
- Dec 29, 2023wasm does not work on node right now with multiple threads — huggingface/transformers.js6 reactions · 3 comments
- Mar 22, 2022Define layer normalization as a function — onnx/onnx6 reactions
- Dec 2, 2020[onnxruntime] Add new port — microsoft/vcpkg6 reactions · 28 comments
- Jul 28, 2026(partially) fix #23462: configure onnxruntime to stop VRAM usage from growing — immich-app/immich5 reactions · 4 comments
- Jul 23, 2024windows 10 installation tutorial (win10 安装教程) — warmshao/FasterLivePortrait5 reactions · 1 comment
- Nov 30, 2023[ROCm] TunableOp — pytorch/pytorch5 reactions · 31 comments
- Apr 15, 2025[DO NOT SUBMIT] Model cache POC — shiyi9801/chromium4 reactions · 2 comments
- Nov 19, 2024GafferML — GafferHQ/gaffer4 reactions · 3 comments
- Apr 15, 2026Add support for q1, q1f16, q2, q2f16 data types — huggingface/transformers.js3 reactions · 1 comment
- Dec 26, 2025onnx and onnxruntime bump versions (fixed onnx dependency with shared=True) — conan-io/conan-center-index3 reactions
- Nov 4, 2025python3Packages.rapidocr-onnxruntime: fix aarch64-linux build — NixOS/nixpkgs3 reactions · 7 comments
- Feb 26, 2025introduce "--webnn-ort-ov-gpu-precision" to specify gpu precision — shiyi9801/chromium3 reactions · 1 comment
- Feb 4, 2025Add: WASM Emscripten example — pykeio/ort3 reactions · 33 comments
- Feb 1, 2025Object mask — darktable-org/darktable3 reactions · 5 comments
- Sep 23, 2024C, C++, and Python API for Adapters (Multi-LoRA and others) — microsoft/onnxruntime-genai3 reactions
- Dec 12, 2023relax protobuf restriction — microsoft/onnxconverter-common3 reactions · 12 comments
- Apr 1, 2023onnxruntime: add 1.14.1 — conan-io/conan-center-index3 reactions · 36 comments
- Jan 14, 2022Add Col2Im operator — onnx/onnx3 reactions · 21 comments
On Hacker News · 5
- Apr 24, 2023ONNX Runtime merges WebGPU backend178 points · 35 comments
- Jan 19, 2020ONNX Runtime: cross-platform, high performance scoring engine for ML models8 points · 1 comment
- Sep 26, 2025ONNX Runtime v1.23.0 Released4 points
- Dec 11, 2020ONNX Runtime v1.6.0 Release1 point
- Oct 31, 2019Microsoft collects telemetry in onnxruntime Python module1 point
On Bluesky · 1
- Aug 22, 2026📦 microsoft / onnxruntime ⭐ 21,420 (+5) 🗒 C++ ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator — @github-trending.bsky.social1 likes and repost
On the web · 1
- Oct 21, 2026microsoft/onnxruntime - GitHub Explorer — ghe.derekchia.com
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- code-reviewSkill
- contrib-op-shape-inference-memory-safetySkill
- cuda-attention-kernel-patternsSkill
- cuda-cutlass-fmha-incremental-rebuildSkill
- onnx-opset-bump-checklistSkill
- ort-buildSkill
- ort-ciSkill
- ort-lintSkill
- ort-release-notesSkill
- ort-testSkill
- ort-transformers-gpu-pytestSkill
- python-kwargs-setattr-securitySkill
- workspace-estimation-shared-headerSkill
The file
Files
Running ONNX Runtime WebGPU Tests Locally on Linux (No GPU)
Reusable knowledge for exercising the WebGPU execution provider on a Linux box with no physical GPU.
Scope: Linux ORT WebGPU only. macOS uses the Metal backend and a real GPU; this skill is the off-Mac story for running WebGPU EP kernels in CI-less dev loops.
1. Why software Vulkan is enough
On Linux, ORT's WebGPU EP runs on Dawn with the Vulkan backend. Vulkan does not require a hardware GPU — Mesa lavapipe is a software (CPU) Vulkan adapter that Dawn enumerates like any other device. For EP correctness tests this is sufficient because:
- Many host-side validation paths (shape/broadcast checks,
ORT_ENFORCEs) fire before any shader is dispatched. E.g. the WebGPU broadcastORT_ENFORCEruns host-side, so the failure is observable on a software adapter without ever touching the GPU. - Element-wise and broadcasting kernels that do dispatch run correctly (if slowly) on lavapipe, so their numeric output can be validated against the CPU reference.
You are trading speed for not needing hardware. It is not a substitute for a real GPU on perf-sensitive or driver-specific paths — but for kernel correctness it is the practical local loop.
Scope — what lavapipe can and cannot validate. Software Vulkan covers (a) host-side failures (shape/broadcast
ORT_ENFORCEs that fire before any shader dispatch) and (b) MatMul-free kernels that dispatch. It does NOT cover any graph that contains a MatMul — the MatMul family crashes lavapipe's LLVM JIT (see §5). This explicitly includes the motivating expanded-Attention node tests (test_attention_4d_softcap_neginf_mask_expanded): they decompose tosoftmax(Q·Kᵀ + bias)·V, which contains MatMuls, so they cannot run on lavapipe. For those, macOS-arm64 Metal is the source of truth. Concretely, the #28969 WebGPU broadcast-underflow fix was validated on lavapipe via a standalone Add-broadcastOpTesterproxy (a host-side enforce/shape path) — NOT via the expanded-Attention node test. Never run lavapipe green and conclude an Attention/MatMul fix is validated off-Mac.
2. Install the software Vulkan stack (Azure Linux — use dnf, NOT apt)
dnf install -y mesa-vulkan-drivers vulkan-loader
# optional, for sanity-checking the adapter:
dnf install -y vulkan-tools && vulkaninfo | headmesa-vulkan-drivers provides lavapipe; vulkan-loader provides the ICD loader.
The lavapipe ICD manifest lands at /usr/share/vulkan/icd.d/lvp_icd.<arch>.json —
lvp_icd.x86_64.json on x86_64, lvp_icd.aarch64.json on arm64. The examples below
use the x86_64 name; substitute your arch, or glob it:
VK_ICD_FILENAMES=$(echo /usr/share/vulkan/icd.d/lvp_icd.*.json).
3. Build with --use_webgpu
./build.sh --config Release --parallel --use_webgpuSee the ort-build skill for general build phases and flags.
4. Run the WebGPU provider tests
WebGPU operator/kernel tests are provider op tests — they build into the
onnxruntime_provider_test target (NOT onnxruntime_test_all; see the ort-test
skill for the executable taxonomy). Point the Vulkan loader at the lavapipe ICD and
select a subset with --gtest_filter:
cd build/Linux/Release
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.x86_64.json \
./onnxruntime_provider_test --gtest_filter="*WebGPU*"VK_ICD_FILENAMES forces Vulkan to load only lavapipe, so the run is
deterministic regardless of what else is installed.
5. Gotcha: lavapipe crashes on the MatMul family
MathOpTest.MatMulFloatType (and other MatMul-family tests) crash lavapipe with:
LLVM ERROR: Instruction Combining did not reach a fixpoint after 1 iterationsThis is a pre-existing limitation of software Vulkan (Mesa lavapipe's LLVM JIT), not an ORT bug. Exclude the MatMul family from broad lavapipe runs:
VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.x86_64.json \
./onnxruntime_provider_test --gtest_filter="*WebGPU*:-*MatMul*"6. Why this matters: the Linux webgpu CI leg is build-only
The Linux webgpu CI leg (.github/workflows/linux_webgpu.yml) only builds — it does not run
WebGPU kernels. A green Linux webgpu leg therefore does not mean any WebGPU test
actually executed. The macOS-arm64 webgpu leg is the only CI leg that runs WebGPU
backend node tests. So a local lavapipe run is the practical way to actually exercise
WebGPU kernels off-Mac before you push.
But mind the §1 scope: lavapipe covers host-side enforce/shape paths and MatMul-free
kernels only. Any MatMul-containing graph — including the expanded-Attention node
tests (test_attention_4d_softcap_neginf_mask_expanded) — crashes lavapipe and runs
only on the macOS-arm64 Metal leg, which is the source of truth for those. A green
lavapipe run never validates a MatMul/Attention fix off-Mac.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

