#1 [high] Change: what PR #581 does, size, mechanics
PR #581 "ignition: set USE_NODE_PRIORITY flag on exported CUDA graphs" by FujitsuPolycom, branch perf/ignition-export-use-node-priority, head 61f64f18, base main, +137/-7, 3 files.
Diff (ignition/preparation/runtime_core.py:192-243):
- Adds module constants CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH=1, CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY=8, PERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGS=9.
- New _executable_instantiation_flags(graph): calls cuGraphExecGetFlags via ctypes through the module's existing _Cuda helper (loads libcuda.so.1/nvcuda.dll per call).
- record_export_graph gains keyword param instantiation_flags=CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY (default 8). Validates the requested value (must be exact int, >=0, no bits outside 9) BEFORE touching pools/retain/instantiate. After instantiate_graph(graph), if instantiation_flags is not None it reads prior_flags from the live exec, rejects prior_flags outside 9, and sets graph._flare_instantiation_flags = prior_flags | instantiation_flags.
- _graphs() (runtime_core.py:272-293) already had a branch for graph._flare_instantiation_flags emitting dict(name=..., graph=template, instantiate_flags=flags) with validation
flags & ~9hardcoded; the PR only changes record_export_graph, so that pre-existing branch (unchanged code) is what carries the flag into the export request.
Tests: tests/preparation/test_capture_graph_metadata.py Fake CUDAGraph gains exec_flags field and monkeypatches runtime_core._executable_instantiation_flags; asserts combined 1|8=9, 0->8, flags=0 preserves 1, None leaves attribute absent, unsupported exec bit 2 rejects, bad requested bit rejects before mutating (instantiations==0 and no retained objects). New test test_capture_forwards_export_sets_node_priority_instantiation_flag asserts capture_forwards-exported prefill/decode both carry instantiate_flags=9. tests/preparation/test_recorded_export_graph_cuda.py:82-92 now asserts flags_by_name == {"decode": 9, "tune": 1} on real CUDA.
Nothing else in the repo calls record_export_graph with the new kwarg: default 8 therefore applies to every caller (verified via search: only runtime_core defines it; capture.py imports it).
#2 [high] Project fit: charter evidence requirement vs PR's perf-style claim
Charter (read_charter) vs PR:
- Principle/Working-agreement "Bring real evidence: Performance PRs need benchmarks showing an actual speedup over main on a served workload (#210)". This PR is labelled perf/ branch (branch name perf/ignition-export-use-node-priority) and title is a graph flag change whose claimed benefit is scheduling/priority of TP collectives; description explicitly says "Live CUDA export, nondefault kernel-priority instantiation across target drivers, and signed-core
flare runreplay remain open GPU qualification on this revision" — i.e. no served-workload benchmark or end-to-end measurement. No latency/throughput numbers at all. - docs/design-review.md Principle 12 (lines 106-115): performance claims require equivalent baselines, complete GPU steps across all ranks, and actual Helios service measurements; disclose unrun checks. PR discloses unrun checks (good) but supplies no measurement.
- Principle 13 (lines 116-123): preserve model core compatibility — existing cores must load without re-export. PR's change only affects newly exported cores (writing instantiate_flags); helios/src/runtime_core/format.rs:495 already validates
graph.flags & !9 != 0(pre-existing), so old cores with flags 0/1 still load. heliopause/src/export/capture.rs:2820-2824 validates instantiate_flags mutually exclusive with executable. - Principle 17: Discord line present ("Discord: Dooner") — satisfied.
- Principle 16: PR description has why/what/claim/evidence sections, but reviewer flagged two factual inaccuracies (see review entry).
- Charter goal: "serve captured CUDA graphs from Rust on SM103, SM120, and SM121"; "Check state and CUDA-graph transitions" (compatibility bullet).
#3 [high] Community: voipmonitor's CHANGES_REQUESTED review of #581
Review by voipmonitor (COLLABORATOR, priority contributor per charter), 2026-11-28 22:13, CHANGES_REQUESTED (the only discussion on #581). Independently verified by reviewer:
- CPU:
pytest -q tests/preparation/test_capture_graph_metadata.py→ 12 passed. - Live SM120 CUDA:
FLARE_RUN_CUDA_TESTS=1 pytest -q tests/preparation/test_recorded_export_graph_cuda.py→ 1 passed (3.29s), "confirming real cuGraphExecGetFlags Driver API FFI and flags_by_name == {"decode": 9, "tune": 1}". This is the only evidence that the ctypes FFI works, since CPU tests monkeypatch runtime_core._executable_instantiation_flags (tests/preparation/test_capture_graph_metadata.py:110-113). Findings:
- [Major] USE_NODE_PRIORITY is a per-graph-exec instantiation flag, so it "globally activates CTA-level preemption for every kernel captured on ScratchArena.auxiliary_stream (ignition/preparation/scratch.py:83-105) across all recipes", not just small TP collectives; asks for end-to-end exported TP core served via
flare runplus a Helios load+replay check asserting cuGraphExecGetFlags == 9 (Principle 12). - [Major] record_export_graph does not validate keep_graph=False /
_flare_graph_metadatagraphs (runtime_core.py:208-242): instantiate_graph supports the metadata path, thengraph._flare_instantiation_flagsis set unconditionally, so a metadata graph would pass here and fail later in _graphs()/Heliopause with graph=0. Asks for an up-front checkgetattr(graph, "_flare_graph_metadata", None) is Noneandint(graph.raw_cuda_graph()) != 0when instantiation_flags is not None; also suggests clearing a pre-existing attribute when instantiation_flags=None. - [Minor] PR-description inaccuracies (Principle 16): (a) "rejecting unsupported bits on either source before mutating graph state" is false for prior_flags — retain_object and instantiate_graph run before the cuGraphExecGetFlags check; (b) "Passing instantiation_flags=None keeps executable-derived flags for startup tuning graphs" — tuning graphs never call record_export_graph (they use capture_graph + instantiate_graph).
- [Nit] Reuse PERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGS in _graphs() (runtime_core.py:284 still hardcodes
flags & ~9); cache _Cuda() instead of reopening libcuda.so.1 per graph. Reviewer also states the Heliopause/Helios wiring is already in place:flags & !9 == 0and kernel-node attribute id 8 = CU_LAUNCH_ATTRIBUTE_PRIORITY, "forward- and backward-compatible with existing cores".
#4 [high] Related work: flag plumbing already on main; #581 only adds the producer
The PR only supplies a producer of instantiation flags; all downstream consumers already exist on main and are unchanged by this PR:
- Wire field: heliopause/src/export/mod.rs:114
pub instantiate_flags: Option<u64>; proto helios/proto/runtime_core.proto:722uint64 flags = 2(graph record), docs/core-format-design.md:220 documents "instantiation flags" in the Graph record. - Heliopause accepts template+flags: heliopause/src/export/capture.rs:788-794 uses
graph.instantiate_flagsif Some, else reads cuGraphExecGetFlags from the executable; capture.rs:589 validatesflags & !9 != 0; capture.rs:2820-2824 validates request graph records (instantiate_flags mutually exclusive with executable, needs live template,flags & !9 != 0rejects). - Helios consumes it: helios/src/runtime_core/format.rs:495 rejects
graph.flags & !9 != 0when validating a core; helios/src/runtime_core/mod.rs:1217-1219 callscuGraphInstantiateWithFlags(&executable, handle, graph.flags); driver decl at helios/src/runtime_core/driver.rs:304. Kernel launch attributes are re-applied by id (mod.rs:984-1013, driver.rs:302cuGraphKernelNodeSetAttribute); heliopause captures kernel attribute ids[1,2,4,5,8,9,10,11,13,14](capture.rs:462), i.e. 8 = CU_LAUNCH_ATTRIBUTE_PRIORITY is already round-tripped. - Ignition side already existed on main:
_graphs()branch readinggraph._flare_instantiation_flagsand emittinginstantiate_flagsis on main (runtime_core.py:245-250 on main; identical code in the PR, only line numbers shift). tests/preparation/test_runtime_core.py:18-37 on main already parametrizes flags 0/1/8/9 and rejects -1/True/2/4/16/1.0 — so the flag plumbing dates from earlier merges, not from #581. What #581 adds is that record_export_graph actually sets the attribute (previously nothing in ignition set it, verified: only _graphs() reads it on main). - Origin of the mechanism: voipmonitor's closed PRs #245 "Export CUDA graph templates without holding executable instances" (2026-11-09/10, closed with note "merged differently through another commit") and #262 (closed, "merged differently through another commit"), which first introduced recorded instantiation flags / template-with-flags export; landed as Luke Alonso's b455be5e / 0f0b7626 (2026-11-09) per search_history. #245 explicitly says "Retained capture now records the supported instantiation flags" and was validated over flags 0/1/8/9. So #581 is small glue on a design that upstream already accepted; the only new behaviour is the default-8 policy and the executable-flag preservation.
#5 [high] Claims vs code: PR's "Before" is inaccurate; default 8 covers every export
Verification of the PR's "Before" claim, by reading main (read_file ref=main on ignition/preparation/runtime_core.py:192-256):
- On main,
record_export_graph(graph, storage, *, owners=())only validates pools, retains owners, calls instantiate_graph(graph) and returns the graph. No flags are written at all. The executable-derived flag path is native: heliopausegraph_metadata(capture.rs:788-794) callsexecutable_flags(cuda, executable)(cuGraphExecGetFlags) when instantiate_flags is None. - Description's "Before: record_export_graph serialized executable-derived instantiation flags without USE_NODE_PRIORITY (or replaced the whole flag word instead of preserving prior permitted bits)" is thus half-true for the Python function: nothing wrote flags before, so nothing "replaced the whole flag word". The union behaviour (prior | requested) is genuinely new, but there was no prior Python-side flag word to clobber; the executable-derived flags came from Heliopause at export time. This is an undeclared nuance in the before/after (Principle 16 asks for explicit before/after).
- Description says "matching helios/src/runtime_core/format.rs" for the permitted mask 9 — verified: format.rs:495
graph.flags & !9 != 0; also heliopause capture.rs:589, :2823 and runtime_core.py:284 hardcode 9. The new constant PERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGS is only used inside runtime_core.py's record_export_graph; _graphs() still hardcodes ~9 (the reviewer's nit), so the mask is now defined in five places across three languages. - Default is 8 (USE_NODE_PRIORITY) for every caller; capture.py:193 is the only production caller and does not pass the kwarg (ignition/preparation/capture.py:192-197), so every exported serving graph gets 8|prior. Tuning graphs never pass through record_export_graph: they are captured with capture_graph(retain_graphs=True) and instantiated with instantiate_graph (capture.py:194-197, test_recorded_export_graph_cuda.py:62-65, ignition/preparation/execution.py:316), which is why the CUDA test expects {"decode": 9, "tune": 1} — confirming the reviewer's point 3b that the description's "startup tuning graphs" sentence describes a path that does not exist.
#6 [high] Why: completes the auxiliary-stream precedence design from #499
Why the change is wanted (motivation, traced rather than stated in the PR):
- The PR's own "Why" only says Helios should honor captured node priorities. The concrete origin is the auxiliary/overlap stream:
ScratchArena.auxiliary_stream(ignition/preparation/scratch.py:83-105) is created withcuStreamCreateWithPriority(..., greatest)wheregreatestis the most negative (highest) priority from cuCtxGetStreamPriorityRange, with the comment "Highest stream priority lets small collective kernels preempt main-stream GEMMs". A stream priority has no effect on replay inside a graph unless the captured launch attribute survives instantiation — CUDA requires CU_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY for that, which is exactly the gap this PR fills. So the change completes the stream-priority design in scratch.py. - That path arrived with FujitsuPolycom's own merged PR #499 "recipe-declared row-sharded prefill planning and PCIe DMA / RoCE row-shard collectives" (merged 2026-11-24): it added ConcurrentReduceScatter/ConcurrentGatherShards over
ScratchArena.auxiliary_stream("Overlapping those Copy-Engine ring transfers with SM compute on ScratchArena.auxiliary_stream"), with combined-stack claims of +7.3% avg 8K–128K prefill attributed to the stack incl. recipes#23, not to #499 alone. #581 is the missing export-side half of that overlap story. - The launch-attribute round-trip already existed on the Heliopause side (capture.rs:462 includes attribute id 8; Helios re-applies via cuGraphKernelNodeSetAttribute, helios/src/runtime_core/mod.rs:984-1013), so priorities were captured and re-applied but inert without the instantiation flag.
- Recent activity note: the in-tree consumers of auxiliary_stream are gone — commit 4d957175 (Luke Alonso, 2026-11-27) "Move recipe collective wrappers and PCIe factories out of core Ignition" moved the Concurrent* wrappers to the external hyperflare-recipes repo (search_code for auxiliary_stream now finds only ignition/preparation/scratch.py and tests/preparation/test_scratch*.py). So the beneficiaries of this flag are now external recipes, not in-tree code.
#7 [high] People & process: author batch of 6 PRs, priority-contributor reviewer, no CI
People / process:
- Author FujitsuPolycom (CONTRIBUTOR, Discord "Dooner" per PR line; AGENTS principle 17 satisfied). Last 180 days: 7 merged, 7 closed, 11 open. Merged work in these areas: #499 (row-shard collectives + auxiliary-stream overlap, +1546/-191, merged 2026-11-24), #498 (Flush PCIe D2H tails before export completion in Heliopause), #431-adjacent export work; areas touched by merged PRs per packet: docs (4), helios/src (4), ignition (3), ignition/cli (3), ignition/components (3).
- The PR is part of a batch of six opened the same day (2026-11-28, all 20:45–22:13, all based on main 167f22c): #580 helios/engram ready signal, #582 prefill checkpoint anchors, #584 Ignition forward compile/tuning/warmup, #585 native capture/publish acceleration (+3046/-206, draft, review by voipmonitor COMMENTED with 3 blockers), #586 Engram plane assembly, #587 heliopause skip digest/fsync, #588 multi-host rank export. #583 was already closed. Each carries the same WSL2-verification template and "Discord: Dooner".
- Area owners: recent committers to ignition/preparation are Luke Alonso (155), Martin Vit (52), Eugene Rakhmatulin (36); tests/preparation Luke Alonso (203), Martin Vit (34), jasonc (23). The file's history is mostly Luke Alonso (runtime_core.py: 716df00f, 27716185, 3919c1db, bbad44fe, fa158284 per search_history). No maintainer (lukealonso/original-el8) has commented on #581 yet; the only engagement is voipmonitor's review.
- voipmonitor is a listed priority contributor in the charter/design-review (lines 15 and 58) and is the original author of the instantiation-flag mechanism (#245, #262) now being extended — worth noting for the decision: the reviewer is reviewing an extension of their own design, and asked for changes rather than rejecting it.
- Process state: open, "ready for review", no labels, no CI checks on head commit 61f64f1 (packet: "CI on the head commit: no checks"), 0 comments besides the review, age < 1 day (opened and reviewed 2026-11-28).
#8 [high] Claims and evidence: tests verified, no served benchmark, risk unmeasured
Evidence ledger for #581 (claims vs backing): Backed by the PR itself (WSL2, claimed):
- 22 passed on tests/preparation/test_core_boundary.py + tests/test_design_review_hook.py (house-keeping suites, not about the change; #499 used the same pair).
- 46 passed, 15 skipped across test_capture_graph_metadata.py, test_recorded_export_graph_cuda.py, test_runtime_core.py, test_preparation_reclamation.py, test_capture_stream_isolation.py. The CUDA file is skipped without FLARE_RUN_CUDA_TESTS=1, i.e. the PR's own run did not exercise the real FFI. Independently confirmed by the reviewer (voipmonitor): 12 passed CPU; 1 passed live SM120 CUDA export with decode=9/tune=1 — so the ctypes cuGraphExecGetFlags call and the 1|8 union are verified on real hardware at least once, on SM120. Not backed / unverified anywhere:
- No served-workload measurement. The branch is named perf/..., the PR sits in a chain of perf PRs, and the claimed benefit ("Helios requests node priority ... while preserving permitted executable flags and existing signed-core compatibility") is a mechanism claim, not a measured speedup. Charter: "Performance PRs need benchmarks showing an actual speedup over main on a served workload (#210)"; design-review Principle 12 requires actual Helios service measurements and equivalent baselines.
- Live CUDA export at other drivers/SM103/SM121, nondefault kernel-priority instantiation, and signed-core
flare runreplay are explicitly disclosed as open. - No test asserts that Helios actually instantiates with 9 (reviewer's finding 1 asks for exactly that check). The value 9 is only asserted at the Python request boundary (test_capture_graph_metadata.py:217, :300) and in the exported index (test_recorded_export_graph_cuda.py:86).
- No test covers Helios loading an old core (flags 0/1) after this change; the compatibility claim rests on format.rs:495 already accepting 0/1/8/9 and being unchanged. Behavioural risk named by the reviewer but not measured by anyone: bit 8 enables node-priority preemption for every kernel in every exported graph, including recipes that launch heavy compute on auxiliary_stream; a 1-bit, global, default-on scheduling change with no regression evidence.
#9 [high] Reach: default-on for all models/exports, no knob, old cores unaffected
Reach / compatibility / blast radius of #581:
- Affects every newly exported core from this tree: capture.py:193 is the only production call site of record_export_graph and passes no kwarg, so the default 8 applies to all serving graphs of all models, all TP layouts, SM103/SM120/SM121. No config knob, CLI flag or recipe declaration controls it — it is a hardcoded default (
instantiation_flags=CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY), which sits awkwardly with design-review Principle 10 ("Use explicit configuration... No magic defaults") and the charter's "Be explicit and pin everything". A user cannot opt out without code changes. - Existing artifacts: no impact. Cores already exported keep flags 0 or 1 and Helios accepts them (format.rs:495 unchanged); the PR does not change any format, proto field, or Helios/Heliopause code. No re-export needed for old cores; conversely the benefit only appears in cores exported after merging.
- Heliopause is not rebuilt by this PR (Python-only change; heliopause already accepts instantiate_flags).
- Failure modes introduced: ValueError on an executable carrying bits other than 1|8 (would abort export; previously such a core would have been exported with those bits), and ValueError on requested bits outside 9. The prior_flags check runs after retain_object/instantiate_graph, so a failure there leaves the graph retained/instantiated (reviewer finding 3a).
- Deployment: exported cores are signed; the PR claims "existing signed-core compatibility". Since only the exported flag value changes, newly signed cores differ in that one field; nothing in heliopause's signature/compat checks (rebuild_compatible) keys on flags, and #499's precedent shows flags are deliberately not part of compatibility. Not independently verified here.
- Docs: docs/runtime-core-design.md:622-623 already says Helios "instantiate[s] each graph with its recorded flags" and docs/core-format-design.md:220 already lists instantiation flags in the Graph record, so no doc update is strictly missing; but nothing in docs records that ignition now sets 8 by default or why. The PR touches no docs.
- Windows path: _executable_instantiation_flags uses the module's _Cuda helper which loads nvcuda.dll on Windows (runtime_core.py:76-78) — covered only indirectly; the live test was Linux/SM120.
#10 [high] Related work: #245/#262 (closed siblings), #499 (motivation), #585/#588 (consumer churn)
Related work, connected by file/content:
- #245 (closed, voipmonitor) "Export CUDA graph templates without holding executable instances" — introduced recorded instantiation flags + exclusive flag sources, validated flags 0/1/8/9. Closed with "merged differently through another commit" (landed as Luke Alonso's b455be5e / 0f0b7626, 2026-11-09, per search_history "Export recorded CUDA graphs without retaining templates or executables").
- #262 (closed, voipmonitor) "Retain CUDA graph executables and resource owners during export" — where record_export_graph's current shape (retain_object + instantiate_graph + return graph) comes from; closed "merged differently through another commit"; landed as 3919c1db (2026-11-11). Overlaps #581 on all three of its files. Context worth carrying: #262's serving-causality claim was withdrawn after A/B testing (comments 2026-11-11) — the same files have a history of claims outrunning measurements.
- #499 (merged, FujitsuPolycom) row-shard prefill + auxiliary_stream overlap — the motivating consumer; its dense review thread (Autobot: 2 blockers incl. ten unapproved flare:: ops, 8 should-fix) shows maintainers scrutinise this area and that the overlap path is new and lightly qualified.
- #331 (merged, mark-yong) "Isolate cuBLAS warmup workspaces from CUDA graph capture" — touches tests/preparation/test_capture_graph_metadata.py; capture-integrity neighbour.
- #504/#492 (yatesdr) KV compression — touch ignition/preparation/runtime_core.py (+25/-1) but in unrelated regions (codec layout); no overlap with the flag logic.
- #314 (open, schopde-nvidia) "Add signed tensor execution for diffusion" — the only other open PR touching ignition/preparation/runtime_core.py; would need rebasing around the new constants, no semantic conflict.
- #585 and #588 (open, same author) restructure heliopause/src/export/capture.rs, the consumer of instantiate_flags (capture.rs:2820-2824 validation, :788-794 use). #585 is a draft with an unsafe-UB blocker; if it lands first, #581's export must still pass its validation.
- Packet's "possibly related" #427/#268/#395/#310/#222/#266/#332 are about capture warm-up, CUDAGraph.reset workspace aliasing, and export diagnostics — none touch flags or priority; not relevant beyond shared files.
- Nothing in the repo pins this change to a roadmap item, issue, or maintainer request in the tracker: search_items for "node priority", "instantiation flags", "cuGraphExecGetFlags" returns only #581 itself (#24, #28, #29). So the "how long has it been wanted" answer is: the design has existed since 2026-11-09 (#245), the impulse is #499 (2026-11-24), and no user-facing bug report or issue asks for it.
#11 [medium] Process: ready, no CI checks, one review, no drift from main
Process facts for #581:
- Opened 2026-11-28 20:45 by FujitsuPolycom, ready for review (not draft), base main at 167f22c, head 61f64f1, 3 files +137/-7 (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).
- No CI checks on the head commit; repo workflows exist (.github/workflows/helios-lifecycle.yml, native-serving.yml, release.yml). Verification rests on the author's WSL2 runs plus the reviewer's live SM120 run.
- No labels, no maintainer comment, exactly one review (voipmonitor, CHANGES_REQUESTED, 2026-11-28 22:13). No activity since then; PR is under a day old.
- No commits to main since the branch point touch the PR's files (packet: "none"), so no rebase pressure yet.
- Description has the four required parts and a Discord line (Principle 17 satisfied) but two statements are inaccurate (reviewer finding 3), i.e. Principle 16 partially unmet.
#12 [medium] Claims and evidence: what the added tests cover and mock out
Test coverage detail for #581 (what the tests actually pin, and what they mock away):
- tests/preparation/test_capture_graph_metadata.py: the fake CUDAGraph gains
exec_flags(default 1) and therecorderfixture monkeypatchesruntime_core._executable_instantiation_flagsto returngraph.exec_flags(test file lines 31-33, 110-113). So the CPU suite never exercises the real cuGraphExecGetFlags call, the ctypes argtypes/restype, or the executable handle; only the union/validation policy. - Assertions added: combined 1|8 = 9 in
_graphs()output (:204-218); exec_flags=0 → 8 (:222-229); requested 0 with prior 1 → 1 (:231-235);instantiation_flags=Noneleaves the attribute absent and falls back to the executable path (:237-242); unsupported exec bit 2 raises "unsupported CUDA instantiation flags" (:244-248); requested bit 2 raises before mutating — asserted viabad.instantiations == 0 and not bad._retained.objects(:250-255); new end-to-endcapture_forwardstest asserting both prefill and decode get 9 (:258-301). - Live CUDA test tests/preparation/test_recorded_export_graph_cuda.py:86 replaces per-graph scalar checks with
flags_by_name == {"decode": 9, "tune": 1}andall(node_count > 0). This is skipped unless FLARE_RUN_CUDA_TESTS=1, so the PR's own 46-passed run did not include it; only the reviewer ran it. - Gaps against the reviewer's asks: no test for a keep_graph=False/_flare_graph_metadata graph hitting record_export_graph; no test that a rejection of prior_flags leaves state clean; no test that an existing _flare_instantiation_flags is cleared when passing None; no Helios-side assertion that a loaded core instantiates with flags 9.