#1 [high] PR #581 core facts and reviewer consensus
PR #581 "ignition: set USE_NODE_PRIORITY flag on exported CUDA graphs", author FujitsuPolycom (CONTRIBUTOR, Discord Dooner), head 61f64f18, base main 167f22c. +137/−7, 3 files: ignition/preparation/runtime_core.py (+38/−1), tests/preparation/test_capture_graph_metadata.py (+96/−3), tests/preparation/test_recorded_export_graph_cuda.py (+3/−3). Open; CHANGES_REQUESTED from voipmonitor (priority reviewer) 2026-11-28; no CI checks on head.
Change: record_export_graph gains kwarg instantiation_flags=CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY (=8) at runtime_core.py:213; validates requested flags before mutation (:224-229); after retain_object(:236)+instantiate_graph(:237) reads cuGraphExecGetFlags via _executable_instantiation_flags (:200-205), rejects prior_flags & ~9 (:240-241), sets graph._flare_instantiation_flags = prior_flags | instantiation_flags (:242). _graphs() (:282-287) then emits dict(name, graph, instantiate_flags=9) instead of dict(name, graph, executable).
Verified myself:
- Only production caller: ignition/preparation/capture.py:193
record_export_graph(graph, warmup_storage, owners=(function,))— takes default 8. Gated by capture.py:170exporting = retain_graphs and warmup_storage is not None=> every serving graph, every recipe, TP and TP1 alike. _graphsstill hardcodesflags & ~9+ duplicate error message at runtime_core.py:284-285 while the new constant PERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGS exists at :194-197. (confirmed)- Downstream accepts 9: heliopause/src/export/capture.rs:589 (
flags & !9 != 0reject), :2823, helios/src/runtime_core/format.rs:495. helios instantiates with graph.flags: helios/src/runtime_core/mod.rs:1215-1219 cuGraphInstantiateWithFlags. Node attribute id 8 applied pre-instantiation at mod.rs:984-1013. So no Rust change needed; bit 8 already permitted in signed format. - Live test asserts flags_by_name == {"decode": 9, "tune": 1} (tests/preparation/test_recorded_export_graph_cuda.py:85-87), gated on FLARE_RUN_CUDA_TESTS=1 (:14). voipmonitor ran it live on SM120: 1 passed, 3.29s.
Review consensus (7 lenses: architecture, conventions, simplicity, correctness, prose, subtractive, value):
- BLOCKING (architecture + value): the flag is a Python default applied unconditionally to every exported serving graph. Nothing in Ignition ties it to prepared data; only source of non-default node priority is ScratchArena.auxiliary_stream (scratch.py:83-105, TP overlap only). Charter "Be explicit and pin everything. No magic defaults" + "Performance PRs need benchmarks showing an actual speedup over main on a served workload (#210)". PR's own text: "Live CUDA export, nondefault kernel-priority instantiation across target drivers, and signed-core flare run replay remain open GPU qualification on this revision."
- SHOULD FIX:
instantiation_flagskwarg has no production caller; None/0 modes exist only in tests; description's "keeps executable-derived flags for startup tuning graphs" is false — tuning graphs use capture_graph+instantiate_graph (runtime_core.py:246-269, capture.py:171/194-197) and never reach record_export_graph. - SHOULD FIX: executable-derived rejection happens AFTER retain_object+instantiate_graph, contradicting description claim "rejecting unsupported bits on either source before mutating graph state"; test at test_capture_graph_metadata.py:244-248 asserts only the raise, while neighbouring case :250-255 asserts no partial mutation.
- SHOULD FIX (correctness): _flare_instantiation_flags has no invalidation path —
instantiation_flags=Noneskips rather than clears (stale attribute survives), and nothing clears it on graph reset()/destroy unlike _RecordedGraphMetadata.release (:153-158) / RecordedExportGraph.reset (:185-189); _graphs prefers the stale attribute over the live executable. Not reachable from today's sole caller (fresh CUDAGraph per capture). - SHOULD FIX (voipmonitor Major #2, not repeated by most lenses): record_export_graph does not validate keep_graph=False/_flare_graph_metadata graphs; a keep_graph=False graph would succeed then fail later with graph=0.
- SHOULD FIX (prose): description "Before:" invents prior behaviour (main wrote no flags at all; _graphs emitted {graph, executable}); "Candidate 61f64f1 on main" mislabels PR head as a main commit.
- NITS: _Cuda() reopened per graph (dlopen per exported graph vs cuda.bindings.driver used at capture.py:43-47, scratch.py:88-101); new capture_forwards test clones existing harness; docstring restates the OR; permitted set hardcoded in 4 places (runtime_core.py:194-197, :284, capture.rs:589, :2823, format.rs:495).
- Subtractive lens: ~104 of 144 added lines removable; production change could be 1-2 lines.
- No correctness defect found in the flag arithmetic itself: 1|8=9 matches CUDA and all validators; old cores with flags=1 still load.
Security screen: all clear, no injection. Peripheral unverifiable: "Discord: Dooner" line, commit link to author's fork.
#2 [high] Corrections to review summaries + decisive untested question
-
Pre-existing Rust mask means the new Python reject is NOT a new export-failure mode. Correctness lens claimed "a newer driver/torch combination that sets bit 2 would now hard-fail export where the pre-PR code succeeded — a compatibility regression". Checked: pre-PR, heliopause already derived flags from the live executable (
heliopause/src/export/capture.rs:788-794:match graph.instantiate_flags { Some(f) => f, None => executable_flags(cuda, graph.executable)? }) and passed them torecord_graph, which rejectsflags & !9 != 0at capture.rs:589. So the same mask reject existed downstream at the same export operation. The PR moves the reject earlier into Python (and, per the ordering finding, leaves a partially mutated graph). No new failure mode for existing targets. This downgrades one rationale for calling the hard-reject a regression. -
The auxiliary priority stream is NOT TP-only. Architecture lens said "the only in-repo source of node priority is the TP scratch auxiliary stream ... TP-overlap-only". Docs say otherwise: docs/core-design.md:852-863 "One preparation-owned auxiliary stream overlaps independent GDN projections, shared and routed experts, and QSA selection with its main QKV producer"; docs/performance-work.md:126-144 attributes it to Qwen GDN projections, shared/routed experts, QSA. It is intra-rank independent-branch overlap created lazily by
ScratchArena.auxiliary_stream(ignition/preparation/scratch.py:83-105) whenoverlap=True(the default, scratch.py:59). Consequence: which graphs carry node priorities is a recipe property, and recipes live in the externallocal-inference-lab/hyperflare-recipesrepo (AGENTS.md:12, 391-393; enforced by tests/preparation/test_core_boundary.py:39-45). So no in-repo artifact determines the blast radius, and our hardware cannot reach a real recipe-overlap graph from this repo alone. -
Bit 8 can be inert, which is the decisive unmeasured question. Heliopause only exports a kernel-node attribute when it is non-zero (
heliopause/src/export/capture.rs:561-569:if id != 13 && any { attributes.push((id, value)) }, KERNEL_ATTRIBUTES includes 8 at :462), and Helios only applies recorded attributes before instantiation (helios/src/runtime_core/mod.rs:984-1013). ThereforecuGraphInstantiateWithFlags(..., USE_NODE_PRIORITY)only changes scheduling for nodes that actually carry a non-zero priority attribute. Whether a kernel captured onScratchArena.auxiliary_stream(created atgreatestpriority, scratch.py:93-99) is exported with a non-zero attribute 8 is a CUDA capture semantic NOT verifiable from this repo and NOT covered by any test in the PR. If it is zero/absent, the PR's claimed benefit never materializes on replay and the premise needs re-derivation. This is the cheapest high-value hardware question and it needs no recipe or served workload: create a ScratchArena on cuda:0 (pattern already in tests/preparation/test_scratch_cuda.py:18-32), capture kernels onarena.auxiliary_stream, export via record_export_graph, and inspect attribute id 8 in the decoded core (decode pattern already in tests/preparation/test_runtime_core.py:130-154). -
Wire-shape change is low risk. The PR also flips every exported serving graph from
{graph, executable}to{graph, instantiate_flags}(runtime_core.py:282-292), because the attribute is always set by default. Both shapes converge: heliopause derives the same RecordedGraph (same nodes, same flags) on either branch (capture.rs:762-794), so core content is equivalent; validators accept both (capture.rs:2820-2824, format.rs:495) and Helios always rebuilds from nodes and instantiates withgraph.flags(mod.rs:1215-1219). Prose lens's "flags replace the executable" point is real but not a semantic break. -
Load/replay mechanics already proven for the flag value: no in-repo fixture exports a non-zero instantiate_flags (helios/tests/runtime_core_fixture.py:146-158 uses
record_template(..., 1)/ RecordedExportGraph; other fixtures instantiate with 0 or 1 at cooperative_core_fixture.py:113, programmatic_edges_core_fixture.py:109, shared_memory_core_fixture.py:58). So a core carrying flags=9 has never been loaded by Helios in any test — the "does Helios accept and replay bit 8" question is genuinely untested, in or out of our hardware.