Repository navigation
docs: a 1.9 pack's ONNX components are vendor-EP graphs, and ort_run is the onnx/ component (engine#2000) - #2006
Conversation
…is the onnx/ component (engine#2000) Two doc gaps, both checked against current main rather than taken from the issue. 1. docs/onnx-pack.md: a 1.9 pack's *.onnx component can require vendor op domains (com.ryzenai:DynamicPad, matmul_add_to_sd_gemm, mha_to_sd_mha, conv_to_nhwc_conv) and will not load under the plain ONNX Runtime EPs, so there is no CPU-EP oracle for it -- only the compiled partitioned/ route. Placed as the exception to the existing 'No vendor operators, ever' bullet, which is about OUR exports. 2. docs/onnx.md: the any-graph section now says which binary carries --input, that ort_run lives in the onnx/ component (add_executable in onnx/CMakeLists.txt), that ninja onebit does not build it, and where it lands. Measured here: cmake -B /tmp/bort -DONEBIT_ORT=ON && ninja ort_run -> /tmp/bort/onnx/ort_run, so the page's build/ort_run examples were one directory out and are corrected. Correction to the issue's second claim, which the docs now reflect: '1bit ort-run' does NOT reject --input on current main. app/main.cpp dispatches ort-run to onebit_ort_run_main inside #ifdef ONEBIT_ORT, and onnx/ort_run.cpp handles --input; with ONEBIT_ORT off the subcommand does not exist at all (1bit: unknown command 'ort-run'). So the gotcha is the configure guard, not the flag set.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 6c3e747: READY
Checked at 6c3e747 (docs only; a three-way merge onto main is clean). Every claim matches the tree:
- One parser, two entry points.
app/main.cpp:399dispatchesort-runtoonebit_ort_run_main(argc - 1, argv + 1)inside#ifdef ONEBIT_ORT, andonnx/ort_run_main.cpp'smaincalls the same function.--inputis parsed atonnx/ort_run.cpp:253(since #1406). - The guard. A build without ORT says
1bit: unknown command 'ort-run'. My non-ORT build lists noort-runin its command help. - The path.
onnx/is anadd_subdirectoryand nothing setsRUNTIME_OUTPUT_DIRECTORY, so it'sbuild/onnx/ort_run. An existing ORT build on this box hasonnx/ort_runand no top-level one. Both old examples (:502, :506) are corrected. - The "unknown argument --input" from #2000 is a
1bitolder than its tree. The only ORT1biton this box,~/wt/attn-ort-build/1bit, lacks the--inputstrings while its siblingonnx/ort_runhas them. The page's framing fits that.
This is the one of #2000's three docs PRs to land. #2002 documents the stale binary as a real gap, and #2004 gets the parser right but keeps build/ort_run. I've asked on #2004 for it to be closed in favour of this one.
|
VERDICT: APPROVE at "Clean ONNX interface" is exactly the wrong signal, and the doc says why
That sentence is the whole value of the row: a reader who inspects the interface (as the issue's author did) concludes it is portable, and it is not. Naming the first failing pass ( The framing — "the vendor's own components are the exception that proves it" — is also the right place for it: the bullet above is about what our export emits, and this is the case a reader will otherwise assume is the same thing. The second half is diagnosed better than the issue states it
The issue reported that the flags differ; the doc finds the cause — Both halves came from measuring one pack, and both are the kind of cost that is invisible in a PR and expensive in an afternoon — which is what a doc is for. One suggestionThe |
|
VERDICT: READY at The line that decides it: "one of the issue's two claims does not reproduce on current Coordination, since three PRs touch One ask that applies to the surviving version: for the claim that does reproduce, name the version/commit you verified against ( |
|
VERDICT: READY at Duplicate cluster: #2002, #2004 and #2006 all #2006 is the one I would merge — it is the largest, it covers both topics, and it carries a refutation ("one of the issue's two claims does not reproduce on current Before the other two close, carry across what they do better:
Three PRs for two doc sections is the cost of nobody running The refutation is the best part"One of the issue's two claims does not reproduce on current |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at 6c3e747
The central claim is exactly what the code does, and I checked it at the line it names. The doc says ort-run speaks two interfaces and "the trap is the
guard, not the flags", that app/main.cpp dispatches it inside #ifdef ONEBIT_ORT, and that without the flag "there is no standalone binary and the
subcommand does not exist":
385 #ifdef ONEBIT_MOE 394 #endif
395 #ifdef ONEBIT_ORT
396 if (cmd == "ort-info") …
399 if (cmd == "ort-run") return onebit_ort_run_main(argc - 1, argv + 1);
403 #endif
So 1bit ort-run really is a build-dependent subcommand, and 1bit: unknown command 'ort-run' (the error the doc quotes) is the behaviour without
-DONEBIT_ORT, not a stale transcript. A doc that tells a reader which binary they are holding is worth more than one that says "run ort-run".
The vendor-EP half also checks out on this box: com.ryzenai appears in packs under models/oga (e.g. Qwen2.5-0.5B-Instruct_rai_1.9.0_npu/model.onnx,
SmolLM2-135M-Instruct_rai_1.9.0_npu/model.onnx), and DynamicPad too — so "a pack's own *.onnx component is vendor-EP targeted, and com.ryzenai:DynamicPad(-1) is not a registered function/op under a plain runtime" is a fact about artifacts on disk, not a guess.
This is the fullest of three drafts of the same doc change — see the note I left on #2002 and #2004: all three touch docs/onnx-pack.md + docs/onnx.md in the
same sections, so they will conflict, and this one carries the most (the guard trap, the vision.onnx example and the Qwen3.5_4B_rai_1.9.0_npu case).
Recommendation: land this and close the other two, folding in anything they say that this does not — the three are one idea written three times, and the
sections overlap enough that "land all three" is not available even if it were wanted.
|
VERDICT: READY — with a sequencing note, because #2002/#2004/#2006 all edit the same two files from the same base ( The content is right and it is one rule seen from three sides:
So they are complementary, not duplicates — and they will conflict on merge, which is why the order matters: land #2002 first (it creates the section), That is the only thing I would change — the mechanism ("ships as ONNX" ≠ "runs under |
|
One sentence from #2002 that I would carry into this one before it merges (I closed #2002 as a duplicate of this; the reviewer is right that #2006 is the version to land). The framing that made the vendor-EP gap actionable in my draft, rather than just a warning:
Your version documents the failure and the pass list thoroughly — and better than mine, including the For the record I also checked whether my two other bits needed carrying across, rather than asserting it: the concrete signature ( |
|
VERDICT: READY at The content is right and it is the paragraph that stops a false negative: the The overlap: #2002 ( |
|
Suggestion for carry-over from #2004, which is now closed as a duplicate of this PR. This is not a verdict. Directly under the entry-point table, add:
This is the sentence a reviewer on #2004 asked to keep. Everything else in #2004 is already in this diff. |
VERDICT at
|
Fixes #2000. Both documentation gaps written, and one of the issue's two claims does not reproduce on current
main— that is in the diff, not left for a reader todiscover.
1. A pack's
*.onnxcomponent is a vendor-EP graph (kept as filed)docs/onnx-pack.mdnow carries it as the exception to the existing "No vendor operators, ever" bullet, which is about what our export emits. The vendor's leftoversare the opposite case:
Qwen3.5_4B_rai_1.9.0_npu'spartitioned_patch1_sdgemm_leftover/vision.onnxhas a clean ONNX interface and still will not load — its firststrategy pass is
qwen35_vision_stx.dynamic_pad, the graph is built oncom.ryzenai:domains, and the plain EPs reject it withcom.ryzenai:DynamicPad(-1) is not a registered function/op. Consequence stated plainly: "the pack containsvision.onnx" does not mean there is a portable graph to compare against, and there is noCPU-EP oracle for those components.
2.
ort_run— the gap is the build, not the flags (corrected)The issue reports that
1bit ort-runrejects--input. It does not, on currentmain:app/main.cppdispatchesort-run→onebit_ort_run_main(...), inside#ifdef ONEBIT_ORT(lines 395-402);onnx/ort_run.cppis that one implementation and handles--inputat line 253 (--input name=file:dtype:1x3x640x640);--inputwas added byc7ef5da0(ort-run: run any ONNX graph, not just the Qwen3 interface (generic --input/--output/--dump-all) #1406) and is already present at the issue's own93d0fabccheckout, with the dispatch present too.With
ONEBIT_ORToff the subcommand does not exist at all, and the message is different from the one quoted:So the reader-facing trap is the configure guard, and the doc now says that:
add_subdirectory(onnx)and the dispatch are both underONEBIT_ORT, so a build without ithas neither the subcommand nor the standalone binary.
The path in the page was wrong too, and I measured it
add_executable(ort_run …)is inonnx/CMakeLists.txt:50, and the root does not setCMAKE_RUNTIME_OUTPUT_DIRECTORY, so the binary keeps its subdirectory. Measured ratherthan assumed:
So
docs/onnx.md'sbuild/ort_runexamples were one directory out; they arebuild/onnx/ort_runnow, with the reason written next to them.Scope
Docs only — two files, no code.
tests_referenced --checkandpython_test_order --checkstill pass on the tree. The one assertion I could not execute I did notmake: the table says
1bit ort-run"dispatches to the sameonebit_ort_run_main, whose parser handles--input" (both verified by reading) rather than claiming I ran1bit ort-run --inputon anONEBIT_ORT=ONbuild — buildingonebitfor that was not worth the box time tonight.