ort-test
Skill22k starsChanged 3 months agoMITView on GitHub
Run ONNX Runtime tests. Use this skill when asked to run tests, debug test failures, or find and execute specific test cases in ONNX Runtime.
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-transformers-gpu-pytestSkill
- python-kwargs-setattr-securitySkill
- webgpu-local-testingSkill
- workspace-estimation-shared-headerSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 33
Use --gtest_filter to select specific tests:
- Distinctive: line 68
If you can't find a test binary, search for it:
- Very specific: line 80
Use pytest as the test runner:
- Distinctive: line 92
Activate a Python virtual environment: before running tests. See "Python > Virtual environment" in AGENTS.md.
- Very specific: line 98
Use --gtest_filter to run a targeted subset when the full suite takes too long.
- Distinctive: line 110
Stale binary from an incremental build: If the build did not actually recompile your change (e.g.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Running ONNX Runtime Tests
ONNX Runtime uses Google Test for C++ and unittest (preferred) / pytest for Python.
C++ tests
Test executables
| Executable | What it tests |
onnxruntime_test_all | Core framework, graph, optimizer, session tests |
onnxruntime_provider_test | Operator/kernel tests (Conv, MatMul, etc.) across execution providers |
Two attention_op_test.cc files — don't confuse them
There are two same-named files testing different operators. Both build into
onnxruntime_provider_test:
| Path | Operator | gtest suite |
test/providers/cpu/llm/attention_op_test.cc | ONNX-domain Attention (opset 23/24) | AttentionTest.* |
test/contrib_ops/attention_op_test.cc | contrib MultiHeadAttention / GroupQueryAttention | ContribOpAttentionTest.* |
The MEA negative-offset regression tests (Attention_Causal_NonPadKVSeqLen_MEA_*,
e.g. ..._MEA_NegOffset_ForceFlashDisabled_FP16_CUDA) live in the providers/cpu/llm file —
the ONNX-domain op.
Use --gtest_filter to select specific tests:
./onnxruntime_provider_test --gtest_filter="*Conv3D*"Running tests
Always run from the build output directory — tests may fail to find dependencies otherwise.
# Linux
cd build/Linux/Release
./onnxruntime_provider_test --gtest_filter="*TestName*"
# macOS
cd build/MacOS/Release
./onnxruntime_provider_test --gtest_filter="*TestName*"
# Windows
cd build\Windows\Release
.\onnxruntime_provider_test.exe --gtest_filter="*TestName*"You can also run all tests via the build script (assumes a prior successful build):
./build.sh --config Release --test
.\build.bat --config Release --test # WindowsLocating the build output directory
The default path follows the pattern build/<Platform>/<Config>/ where Platform is Linux, MacOS, or Windows. With Visual Studio multi-config generators on Windows, the config may appear twice (e.g., build/Windows/Release/Release/). The path can also be customized via --build_dir.
If you can't find a test binary, search for it:
# Windows
Get-ChildItem -Path build -Recurse -Filter "onnxruntime_provider_test.exe" | Select-Object -ExpandProperty FullName
# Linux/macOS
find build -name "onnxruntime_provider_test" -type fPython tests
Use pytest as the test runner:
pytest onnxruntime/test/python/test_specific.py # entire file
pytest onnxruntime/test/python/test_specific.py::TestClass::test_method # specific test
pytest -k "test_keyword" onnxruntime/test/python/ # by keywordPython test naming convention: test_<method>_<expected_behavior>_[when_<condition>]
Agent tips
- Activate a Python virtual environment before running tests. See "Python > Virtual environment" in
AGENTS.md. - Beware false-green results — a green run does not always prove anything. See the "False-green taxonomy" section below for the four ways a test can pass without testing your change.
- Redirect test output to a file (e.g.,
> test_output.txt 2>&1) — output can be large. - For C++ tests, verify the build directory exists and a prior build completed before running.
- Use
--gtest_filterto run a targeted subset when the full suite takes too long. - Running WebGPU tests locally on Linux without a GPU — WebGPU op tests build into
onnxruntime_provider_testand can run against a software Vulkan adapter (Mesa lavapipe). See thewebgpu-local-testingskill.
False-green taxonomy — ways a test can "pass" without proving anything
A green result is not always a real pass. Watch for all five modes:
- Zero-match filter. A
--gtest_filterthat matches no tests still exits 0 (green). Confirm the[==========] N tests ranline is non-zero — a zero-match run prints0 tests from 0 test suites. Many operator/kernel gtests run only inonnxruntime_provider_test(CI runs this), NOTonnxruntime_test_all; the wrong binary matches nothing and looks green. - Stale binary from an incremental build. If the build did not actually recompile your
change (e.g. a header not tracked by the compiler's depfile), the "passing" run executes
the OLD code. A test that was failing cannot truly flip to passing without a real
rebuild — treat an unexpected FAIL→PASS with suspicion and confirm the linked artifact's
mtime advanced. CUDA/CUTLASS instance (nvcc depfiles don't track
cutlass_fmha/*.h): see thecuda-cutlass-fmha-incremental-rebuildskill. - Checking the wrong artifact's freshness. With a dlopen'd shared provider (e.g.
libonnxruntime_providers_cuda.so), the test executable is NOT relinked when the provider recompiles — its mtime stays old while the.soadvances. Verify the artifact that actually links your change, not the test exe. Detail:cuda-cutlass-fmha-incremental-rebuildskill. - A correct fallback path masks the intended path. A value-only assertion can pass via a different, correct code path without ever exercising the one you meant to test (e.g. a test meant for MEA silently handled by the unfused fallback). Assert/verify which path ran, not just the output value — see "Verify which path/kernel actually executed" below.
- Arch-portability false-green (verified on only one GPU arch). A CUDA kernel that
launches on a large-dynamic-smem arch (e.g. sm90/H100, ~227KB) can fail to launch on a
smaller opt-in cap (sm86/89 ~99KB, sm80 ~163KB) with
CUDA failure 1: invalid argument— and a path with no fallback (e.g. ORT's MEA) turns that into a hard error, not a silent degrade. So a green run on your local GPU can mask a launch failure on CI's arch. Verify arch-portability, or pick a config whose shared-memory footprint fits every target arch (e.g. a smallhead_size). Concrete instance: CUTLASS MEAhead_size=512FP16 exceeds sm86's smem opt-in cap and dies at launch — live bug #28388 (thecuda-attention-kernel-patternsskill §1 has the dispatch detail).
Verify which path/kernel actually executed
Value equality alone does not prove the intended code path ran — a correct fallback can produce the right answer (false-green mode 4 above). When a test targets a specific kernel/path, confirm it actually dispatched there instead of trusting the output:
- Enable verbose logging and check the dispatch log line. ORT attention logs one of these
exact strings (
core/providers/cuda/llm/attention.cc):ONNX Attention: using Flash Attention(:1400)ONNX Attention: using Memory Efficient Attention(:1451)Attention: using unified unfused path(:1482) — note: noONNXprefix and it reads "unified unfused path", not "Unfused".
- Or force the path via the relevant env var / build config AND add a compile-time guard so
the test SKIPs (not silently passes) when the target path is unavailable — e.g.
SKIP_IF_MEA_NOT_COMPILED.
Operator-specific routing/forcing details: cuda-attention-kernel-patterns skill §1/§7.
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.

