Repository navigation
[#449 inc4] Container-type closeout: SequenceMap + cross-subgraph capture + Scan state - #531
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #531 +/- ##
==========================================
- Coverage 80.59% 80.59% -0.01%
==========================================
Files 315 315
Lines 123096 123259 +163
Branches 123096 123259 +163
==========================================
+ Hits 99209 99337 +128
- Misses 19859 19890 +31
- Partials 4028 4032 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…aph container capture + Scan state Closeout slice of the #449 container-type arc, stacked on inc3a (#527). - SequenceMap (opset 17): maps a subgraph body over sequence element(s), wrapping each body output back as a Sequence. Handled in infer_control_flow like If/Loop/Scan (subgraph ops are not registry rules). Zips multiple input sequences; broadcasts additional tensor inputs. Composed from the inc3a body-threading driver (set_body_input / body_container_seeds / read_body_output / map_container_to_parent) — no fork. - Cross-subgraph container capture: remap_node_io now threads the captured value's full ValueType (new remap_container_type helper, mirroring the tensor path via remap_dim_expr) instead of dropping it; bind_captures / extend_visible_scope gained a containers channel so a body referencing an outer-scope sequence sees its element type. - Scan container state (folded in, previously deferred inc3b): Scan state vars can be containers; reuses seed_container_input / body_container_seeds and infer_scan_outputs' container check. All four subgraph ops now container-complete. Byte-identical tensor path preserved (every new path gated on a container being present; regression test stays green). Catalog stays 217 ops / 262 entries — SequenceMap is a control-flow op, not a registry rule (no phantom bump). Tests: graph_inference 33 -> 39 (SequenceMap identity/transform/zip/broadcast, If capturing an outer-scope sequence, Scan carrying a sequence state var). refs #449 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
968ab3c to
f99fd65
Compare
🔴 Benchmark Regression DetectedComparison of criterion micro-benchmarks: PR head vs merge-base, measured on the same runner in the same job (base first → PR second).
Visual flags: Host infoWhat this cannot catch
|
|
VERDICT: APPROVE Independent review of PR #531 ( Verification (all GREEN)
1. Byte-identical tensor path — CONFIRMED, gate is real for the new pathsEvery new container path is gated on a container actually being present:
2. SequenceMap semantics — CORRECT, general, DRY
3. Cross-subgraph capture fix — SOUND, both branches, not degraded
4. Scan container fold — CORRECTState slots ( 5. Catalog honesty — CONFIRMED217/262 unchanged is correct. SequenceMap is control-flow, handled in 6. Close-#449 judgment (advisory)Support closing #449. The container-type shape-inference arc is genuinely complete for the real-model surface: full Sequence family + threading through all four subgraph ops (If/Loop/Scan/SequenceMap) + cross-subgraph capture. Remaining Optional/Map op handlers have zero in-tree real-model demand (onnx-genai targets are tensor transformer/LLM graphs), and the Recommendation: APPROVE and close the #449 epic. — Lori (independent review) |
…te (#542) Scribe round 6 state consolidation (state-only, no code). - **decisions.md** 19858→20389 B (under 20480 gate); size-archived the round-6 per-PR narrative into 2026-07 archive. - Logged merges: **#533** (native CUDA decode beats ORT 1.38×, Lori approved), **#529** (qwen3.5-0.8b hybrid 100% CUDA), **#531** (#449 container epic closed), **#532** (round 5). - **#534** recorded HELD — targets Justin's own `feat/genai-demo-dashboard` (#476), not auto-merged. - Refreshed `identity/now.md`; recorded reviewers Lori→#533, Melina→#534. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Squad Scribe <223556219+Copilot@users.noreply.github.com>
#449 increment 4 — closeout slice (DRAFT — do NOT merge)
Rebased onto main now that inc3a (#527) is merged — a trivial superset (single commit on top of main). CPU-only, pure
onnx-runtime-shape-inferencecrate.Closes out the #449 container-type arc: foundation → seq ops → seq↔tensor → If/Loop control flow → this.
What landed
Sequence. Handled ininfer_control_flowlikeIf/Loop/Scan(subgraph ops are not registry rules). Zips multiple input sequences; broadcasts extra tensor inputs. Composed from the inc3a body-threading driver (set_body_input/body_container_seeds/read_body_output/map_container_to_parent) — no fork.remap_node_iopreviously dropped a captured value'sValueType(value_type: None). Newremap_container_typethreads the full container type (recursing, remapping tensor-leaf dims viaremap_dim_expr, mirroring the tensor path).bind_captures/extend_visible_scopegained acontainerschannel, so a body referencing an outer-scope sequence now sees its element type.seed_container_input/body_container_seeds+infer_scan_outputs' container check. All four subgraph ops now container-complete.Hard bar
tensor_only_path_is_byte_identical_after_container_type_modelstays GREEN.unify_value_type/unify_tensor_type/merge_element_shape. No per-op copy-paste.If/Loop/Scan); there is no 218th handler, so bumping the pin would be a phantom declaration.graph_inference33 → 39 — SequenceMap identity/transform/zip/broadcast,Ifcapturing an outer-scope sequence (proves theremap_node_iofix),Scancarrying a sequence state var.Verification (all GREEN, post-rebase)
cargo test -p onnx-runtime-shape-inference(16 op_rules + 39 graph_inference + 275 unit + 1 doctest);cargo fmt --all --check;cargo clippy -p onnx-runtime-shape-inference --all-targets -- -D warnings;cargo build -p onnx-runtime-session -p onnx-runtime-eager.Recommendation
Close #449. The sequence container-type arc is complete end to end. Only Optional/Map op handlers remain — not implemented, not used by any in-tree target model, no real-model demand → optional low-priority follow-up, not a load-bearing gap.
refs #449