Opened by a workflow run, Nov 28, 2026 6:10 PM EST.
screen malicious
Screen Result: All Clear
Evidence: I reviewed PR #581's full diff (3 files, +137/−7: ignition/preparation/runtime_core.py, tests/preparation/test_capture_graph_metadata.py, tests/preparation/test_recorded_export_graph_cuda.py), its description, and the single review on it (voipmonitor, CHANGES_REQUESTED). No prompt injection or other content aimed at steering an agent was found.
- Instruction-like text: searched the changed files and the repository for "ignore previous", "disregard", "system prompt", "prompt injection", "Autobot", agent/AI-reviewer references, and approval-leaning phrasing (LGTM / approve / signed off). No hits in the PR's own content.
- Hidden or encoded content: no bidi overrides, zero-width characters, base64 blobs, or obfuscated strings in the changed lines; the additions are ordinary Python constants, a
cuGraphExecGetFlagswrapper call, bitmask validation, and pytest cases. - No new capability surface: the diff adds no
subprocess, network,eval/exec/__import__, environment-variable, or file-write access. Its only native call reuses the file's existing_Cuda()CDLL("libcuda.so.1") wrapper (runtime_core.py:76-90). The onesubprocessuse intest_recorded_export_graph_cuda.py:14-20predates this PR. - No agent-config or CI tampering: no
AGENTS.md,.agents/, skills, or workflow files are touched; the PR is confined to one module and two test files. - Discussion is normal technical review: voipmonitor's comment addresses the human author with substantive points — a
keep_graph=False/_flare_graph_metadatavalidation gap (runtime_core.py:208-242), inaccurate claims about the PR description, and a nit about the hardcodedflags & ~9mask in_graphs(). Nothing asks a tool or reviewer agent to approve, skip checks, or fetch external content.
Peripheral, non-malicious items: the PR body's "Discord: Dooner" line (which design-review.md Principle 17 requires) and a link to commit 61f64f18… in the author's fork FujitsuPolycom/flare-local-inference. Both are unverifiable claims, not instructions.
Open questions/limitations: CI reports no checks on the head commit, so the PR's stated test results (22 + 46 passed) could not be independently confirmed; the fork commit URL was not fetched (fetching it was deliberately avoided, since an unvetted external repository is exactly where injected instructions would live). Neither affects the screening outcome.
Full report · Notes decide malicious: all_clear (100%): No malicious content found
explore
Author: FujitsuPolycom (CONTRIBUTOR, 7 merged / 7 closed / 11 open PRs in 180 days; Discord "Dooner")
Motivation: Graphs captured on a high-priority auxiliary stream only keep their per-node priorities on replay if the graph is instantiated with CUDA's USE_NODE_PRIORITY bit. The Rust side already accepts and applies such flags, but Ignition never emitted one, so the priority captured for small TP collectives was inert in exported cores. This PR makes record_export_graph record prior_flags | 8.
Scale: +137 / −7 lines in 3 files
Proposal:
- Adds flag constants (
AUTO_FREE_ON_LAUNCH=1,USE_NODE_PRIORITY=8, permitted mask9) and a ctypescuGraphExecGetFlagshelper toignition/preparation/runtime_core.py. record_export_graphgainsinstantiation_flags=8(default), validates the requested value before touching state, then recordsprior_flags | instantiation_flagson the graph, rejecting unsupported executable bits.- CPU tests add a fake
exec_flagsfield and monkeypatch the FFI helper; new coverage for 9, 8, preserved 1,None, and two rejection paths, plus one end-to-endcapture_forwardstest. - Live CUDA test now asserts
{"decode": 9, "tune": 1}instead offlags == 1. - No Rust, wire-format, or docs changes;
_graphs()and all downstream plumbing are unchanged. Touches: ignition/preparation/runtime_core.py— the export contract for every serving graph (default-on, no knob)tests/preparation/test_capture_graph_metadata.py— fake-graph fixture now models executable flagstests/preparation/test_recorded_export_graph_cuda.py— live export flag assertion Related items:- #499 recipe-declared row-shard collectives (merged): introduced
ScratchArena.auxiliary_streampriority, the impulse for this flag - #245 Export CUDA graph templates without holding executable instances (closed): first introduced recorded instantiation flags, landed differently
- #262 Retain CUDA graph executables and resource owners (closed): origin of
record_export_graph's retain+instantiate shape - #585 Accelerate native graph capture… (open, same author): restructures the Heliopause consumer of
instantiate_flags - #314 Signed tensor execution for diffusion (open): the only other open PR touching
runtime_core.pyLink: https://github.com/NVIDIA/hyperflare-inference/pull/581 Autobot comments: The description's two key sentences are wrong: nothing inrecord_export_graphwrote flags before (the executable-derived flags came from Heliopause) and tuning graphs never callrecord_export_graph, so theNoneescape hatch has no in-tree user. The flag becomes default-on for every model and export with no config knob, while the reviewer notes it activates preemption for every kernel onauxiliary_streamacross all recipes — and no served-workload benchmark exists, which the charter requires for perf PRs. A priority-contributor review requested changes (one major asks for a liveflare runcore plus a Helios replay check; another asks forkeep_graph=False/metadata-graph validation). Authors of the instantiation-flag design are now the reviewers of its extension. Two tests were verified independently on live SM120; everything else rests on the author's WSL2 run, and there is no CI on the head commit.
Value Proposition
Verdict: worth it with changes
The idea is right and the layer is right, but as submitted this PR flips a scheduling-relevant CUDA flag on for every exported serving graph in every recipe with no serving measurement, and two of its stated claims are false. Fix those and it is a small, welcome change; merge as-is and it is an unmeasured global behavior change.
Why the idea is right (and why it needed almost no code)
- The whole downstream path already supports the flag. Helios validates
graph.flags & !9 == 0and passes them tocuGraphInstantiateWithFlags(helios/src/runtime_core/format.rs:495,helios/src/runtime_core/mod.rs:1216-1219), re-applies captured node attribute id8(CU_LAUNCH_ATTRIBUTE_PRIORITY) —format.rs:574-582,mod.rs:984-1013— and Heliopause already reads attribute8(KERNEL_ATTRIBUTES,heliopause/src/export/capture.rs:462) and already prefers explicitinstantiate_flagsover executable-derived flags (capture.rs:791-794)._graphs()already emitsinstantiate_flagsonmain(ignition/preparation/runtime_core.py:282-287). So9already loads and instantiates in Helios; this PR only supplies a value the pipeline was already carrying. That is the smallest possible footprint — no Rust changes, no new captured-graph op family, no per-model branches. Good. - The flag is not decorative: node priorities are only reproduced at instantiation when
USE_NODE_PRIORITYis set (NVIDIA driver docs,cuGraphInstantiate: "causes the graph to use the priorities from the per-node attributes rather than the priority of the launch stream"). Flare's only source of non-default node priority is the overlap stream created at the range'sgreatestpriority for small TP collectives (ignition/preparation/scratch.py:83-105), documented indocs/core-design.md:852-863anddocs/performance-work.md:126-144. Today those captured priorities are inert on replay. So the change fixes a real (if probably modest) mismatch between what preparation captures and what serving executes — exactly Ignition-owns-decoration / Helios-serves-prepared-graphs. - The prod diff is +38/-1 in one function, preserves previously permitted bits (
prior | 8,1|8 = 9), and the tests cover0 / 1 / 8 / 9 / None / unsupported. Reviewervoipmonitor's live SM120 export run confirms{"decode": 9, "tune": 1}through realcuGraphExecGetFlagsFFI. The contributor handled the hard parts correctly.
What must change before merge
- Evidence for the actual serving path (blocking). The PR itself lists "live CUDA export, nondefault kernel-priority instantiation across target drivers, and signed-core
flare runreplay" as open on this revision. A change that alters GPU scheduling for every exported core needs before/afterflare runlatency on a real served workload (charter "Bring real evidence" / #210;docs/design-review.mdprinciple 12);pytestcounts are not that. At minimum: one exported TP core served throughflare runwith and without8, plus the reviewer's requested assertion that the Helios-instantiated executable reportscuGraphExecGetFlags == 9. - Make the switch explicit, not a library default.
instantiation_flags=CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITYatignition/preparation/runtime_core.py:213silently changes behavior for every recipe. The charter says "Be explicit and pin everything. No magic defaults," anddocs/prefix-cache-offload.md:855-862explicitly forbids leaning on stream priority without measurement. Even if the answer is "always on," the decision belongs at the single call site (ignition/preparation/capture.py:193) or in run configuration, with the reason written down — not in a helper's default argument. - Fix the error path, or fix the claim.
record_export_graphrunsretain_object(...)andinstantiate_graph(...)before validating executable-derived flags (runtime_core.py:236-242). The PR description's "rejecting unsupported bits on either source before mutating graph state" is therefore false forprior_flags, and on that raise the graph keeps retained owners with no_flare_instantiation_flagsset (capture.py:182-200has no cleanup). Validate what you can (both flag sets,_flare_graph_metadata, live template handle) before retaining, per reviewer Major #2. - Fix the other description claim. "Passing
instantiation_flags=Nonekeeps executable-derived flags for startup tuning graphs" is wrong: tuning graphs go throughcapture_graph+instantiate_graph(runtime_core.py:246-269,tests/preparation/test_recorded_export_graph_cuda.py:62-65) and never callrecord_export_graph.docs/design-review.mdprinciple 16 requires accurate evidence statements. - Nit. Reuse
PERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGSin_graphs()(runtime_core.py:284hardcodes~9) and cache the_Cuda()handle instead of reopeninglibcuda.so.1per graph.
Who benefits, and the risk
Beneficiaries are users of TP/prefill cores whose recipes overlap small collective branches on the high-priority auxiliary stream — plausible latency wins when a small collective must preempt a main-stream GEMM; broad but likely small decode-only gains. Cost is low (one function, ~38 lines, no new contracts, backward compatible: existing cores still load, 9 is already within the accepted mask). The risk is that USE_NODE_PRIORITY is all-or-nothing per graph: every kernel captured on the auxiliary stream gets priority-based scheduling, including any recipe that puts heavy compute there, and nothing in the repo has measured whether that helps or hurts under contention. That risk is acceptable only once someone has actually run it, which is precisely what this PR does not do.
Bottom line: right problem, right layer, tiny footprint, no duplication of existing mechanisms — but it ships a global, unmeasured scheduling-policy change with a false evidence statement. Land it after (1)–(4), preferably as an explicit opt-in until a flare run measurement exists.
Full report · Notes Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.
Simplicity
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- ignition/preparation/runtime_core.py:208-243: the new
instantiation_flagskwarg is a configuration switch with one caller that always takes the default; itsNoneand0modes exist only for tests — delete the kwarg, the validation at 224-229 and theis not Nonewrapper. - ignition/preparation/runtime_core.py:224-229, 240-241: the new record-side flag validation duplicates
_graphsat 284 (same type, negative and~9checks, same message) and the newPERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGSconstant is never adopted where~9is hardcoded — keep one check and use the constant in it.
Nits: 3 — _Cuda() reopened per exported graph (runtime_core.py:204); the added four-line docstring paragraph (219-222) restates prior | requested and describes a mode with no caller; the new tests (test_capture_graph_metadata.py:222-302) pin the unused kwarg modes and re-implement the whole capture_forwards mock surface to re-assert a value already asserted directly.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/581
Architecture
Verdict: Blocking issues
Blocking:
- ignition/preparation/runtime_core.py:213:
instantiation_flagsdefaults toUSE_NODE_PRIORITY, turning node-priority instantiation on for every exported serving graph (TP and TP1) although nothing in Ignition sets a priority kernel-node attribute except the TPScratchArena.auxiliary_stream; it is a magic default contradicted by AGENTS.md ("no magic defaults") and by the charter's served-workload evidence rule (#210, design-review principle 12), and the PR states the live qualification is still open.
Should fix:
- ignition/preparation/runtime_core.py:208-243: the new
instantiation_flagsparameter'sNone/0branches have no production caller —record_export_graph's only caller is capture.py:193, and startup tuning graphs go throughcapture_graph/instantiate_graph(capture.py:194-197) — so the docstring's "startup tuning graphs" claim describes a path that does not exist (speculative extension point). - ignition/preparation/runtime_core.py:238-242 (+ :284, helios/src/runtime_core/format.rs:495, heliopause/src/export/capture.rs:589/2823): export now writes flags=9 where it wrote 1, with no core-format/compatibility statement, no test that pre-existing flag-1 cores still load through this path, and the permitted set
{1,8}hardcoded in four places. - tests/preparation/test_capture_graph_metadata.py:113: flag preservation is asserted only after monkeypatching
_executable_instantiation_flagstolambda graph: graph.exec_flags; the sole real-driver assertion (test_recorded_export_graph_cuda.py:86) is gated onFLARE_RUN_CUDA_TESTS=1and was among the 15 skips in the PR's own evidence.
Nits: 2 (PR-description order claim "before mutating graph state"; the nonexistent startup-tuning path sentence). Link: https://github.com/NVIDIA/hyperflare-inference/pull/581
Correctness
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- ignition/preparation/runtime_core.py:236-241: the executable-derived flag check runs after retain_object + instantiate_graph, so a rejection leaves a half-mutated graph (instantiated, new pool/owner refs retained, no
_flare_instantiation_flags), contradicting the PR's "rejecting unsupported bits on either source before mutating graph state" and docs/design-review.md:188. - ignition/preparation/runtime_core.py:238-242 + 282-287:
_flare_instantiation_flagshas no invalidation path —instantiation_flags=Noneskips instead of clears, and nothing drops it on graph reset/destroy (unlike_RecordedGraphMetadata.release:153-158 andRecordedExportGraph.reset:185-189), so_graphs()can publish flags derived from a dead executable in a shape capture.rs:2820-2824 can no longer detect. - ignition/preparation/runtime_core.py:213:
instantiation_flags=Nonehas no production caller — tuning graphs use capture_graph+instantiate_graph (capture.py:171,197) and never reach record_export_graph, so the documented startup-tuning branch is dead outside the unit test.
Nits: 2 (dead None path doubles as a prose/coverage gap; a fresh _Cuda() per exported graph instead of a cached one, runtime_core.py:200-205)
Link: https://github.com/NVIDIA/hyperflare-inference/pull/581
Prose
Verdict: should-fix issues only
Blocking:
- None.
Should fix:
- PR description "Before:" invents a prior behaviour: on main
record_export_graphset no flags at all (runtime_core.py main:192-206, 251-255); the parenthetical "(or replaced the whole flag word…)" describes an unshipped alternative. - PR description "Candidate 61f64f1… on
main" mislabels this PR's own head commit as a commit on main; "Candidate" is an unexplained internal label. - PR description claims rejection "before mutating graph state", but the executable-derived check (runtime_core.py:239-241) runs after
retain_object(236) andinstantiate_graph(237). - PR description's "
instantiation_flags=Nonekeeps executable-derived flags for startup tuning graphs" is false: the only production caller (capture.py:193) never passes the argument, and startup tuners never reachrecord_export_graph.
Nits: 2 (unused new PERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGS constant alongside hardcoded ~9 at runtime_core.py:284, and an unexplained permitted set; docstring at runtime_core.py:219-222 omits that the recorded flags replace the executable in the core and that unsupported executable bits abort after instantiation).
Link: https://github.com/NVIDIA/hyperflare-inference/pull/581
Conventions
Verdict: should-fix issues only Blocking:
- None. Should fix:
- ignition/preparation/runtime_core.py:284:
_graphsstill validates with the bare literal~9and repeats the identical error message, so the newPERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGS(lines 192-197) and its message now exist three times in one module — use the constant, or hoist one shared validator used by bothrecord_export_graph(:224-229) and_graphs. - ignition/preparation/runtime_core.py:238-241: executable-derived flags are rejected only after
retain_objectandinstantiate_graph(:236-237), so the failure leaves the graph instantiated with owners retained — this contradicts the PR's claim that unsupported bits are rejected "on either source before mutating graph state", and the new test (test_capture_graph_metadata.py:244-248) asserts only the exception while its neighbour at :250-255 asserts no partial mutation. Nits: 4 - runtime_core.py:200-205:
_executable_instantiation_flagsuses_Cuda/dlopen and re-hardcodes 1/8, bypassing the pinnedcuda.bindingsdriver API used at capture.py:43-47 and scratch.py:88-101;_Cuda()is also constructed per call. - test_capture_graph_metadata.py:113: the fixture monkeypatches the helper away, so the real
cuGraphExecGetFlagscall is covered only by the skipped GPU test (AGENTS.md:194-196). - runtime_core.py:213: the
instantiation_flagskeyword has no production caller (capture.py:193 takes the default), and the PR's "startup tuning graphs" description refers to graphs built viacapture_graph, not this function. - test_capture_graph_metadata.py:258-302: the new
capture_forwardstest clones the harness at :165-194, though the flag value is already asserted end to end in test_recorded_export_graph_cuda.py:86.
Checked and clean: the 9-bit mask matches helios/src/runtime_core/format.rs:495 and heliopause/src/export/capture.rs:2822-2823; flags-on-export is the documented mechanism (docs/runtime-core-design.md:623, docs/core-format-design.md:220); no layering or injection issues. Open: real PyTorch executable flags (only the GPU test can settle) and whether cuda-python 13.3.1 exposes the flag enumerators. Link: https://github.com/NVIDIA/hyperflare-inference/pull/581
Subtractive
Verdict: make it smaller first The change: +137 / −7 lines Could remove: about 104 lines (25 production, 79 test), in 4 places Biggest subtractions:
- ignition/preparation/runtime_core.py:213, 224–229, 238 + tests/preparation/test_capture_graph_metadata.py:222–255: drop the
instantiation_flagskeyword, its validation block and theis not Nonewrapper; the sole caller (capture.py:193) never passes it, itsNone/0states exist only in its own tests, and_graphs()(runtime_core.py:284) plus Rust (capture.rs:589, 2823; format.rs:495) already validate the same mask: about 48 lines - ignition/preparation/runtime_core.py:192–197, 200–205, 239–242: drop
_executable_instantiation_flagsand theprior_flags | …join; bit 1 (AUTO_FREE_ON_LAUNCH) is inert because the exported template holds only kernel/copy/memset nodes (capture.rs:607–665) and Helios instantiates fresh (helios/src/runtime_core/mod.rs:1215–1219); replace withgraph._flare_instantiation_flags = CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY: about 21 lines - tests/preparation/test_capture_graph_metadata.py:258–302: delete
test_capture_forwards_export_sets_node_priority_instantiation_flag; it re-installs the same eight monkeypatches as lines 179–185 and re-asserts a mapping already asserted at 216–218 and in test_recorded_export_graph_cuda.py:85–86: about 45 lines - ignition/preparation/runtime_core.py:192–197 and _graphs() line 284: one constant for the literal 8 instead of a 6-line block, and stop hardcoding
~9next to the module mask: about 5 lines Left behind: None.instantiate_flagsis already a wire field (heliopause/src/export/mod.rs:114); no other repo code references the added names. Link: https://github.com/NVIDIA/hyperflare-inference/pull/581
code review summary
Recommendation: Changes Requested
Two blockers (default-on USE_NODE_PRIORITY with no served-workload evidence; ~104 of 144 added lines are an unused switch plus a duplicated flag guard) plus five should-fix items, four subtractive reductions and one combined prose item. The core one-line fact is right and backward compatible, so the fix path is subtraction, not redesign.
- Blockers: 2
- Should fix: 5
- Subtractive suggestions: 4
- Nits: 1
For the adjudicator (Verify & Adjudicate): decide (D1) whether "flag 8 on by default for every exported serving graph, unmeasured" blocks or is a disclosed follow-up — charter #210 and "no magic defaults" argue block, and bit 8 is already accepted by main's validators with voipmonitor's SM120 test passing; (D2) whether deleting the unused instantiation_flags kwarg is required (subtractive rule wins) or defensible as capture-time validation — no external caller is provable from this repo; (D3) whether to demand T2 (drop cuGraphExecGetFlags + OR, record plain 8), which is verified (no alloc/free nodes survive export) but contradicts the PR's stated "without clobbering permitted flags" purpose; (D4) whether voipmonitor's keep_graph=False finding (S3) keeps Major severity despite being unreachable from the sole caller; (D5) whether the 45-line capture_forwards test goes with T1.
Refuted upstream claims (do not resurface): the "real-CUDA assertion is skipped/unverified" line repeated by three lenses is stale — voipmonitor ran FLARE_RUN_CUDA_TESTS=1 on SM120 (1 passed, 3.29s, flags_by_name == {"decode": 9, "tune": 1}), so only the CI gap remains (S4); "value 9 lacks a core-format/compatibility statement, older engines may reject it" is false — flags & !9 already existed on main (heliopause capture.rs:589, :2823; helios format.rs:495) and docs/runtime-core-design.md:623 (not opened) already specifies the mechanism; "export regression on drivers setting bit 2" is overstated — the identical bits were already rejected pre-PR at capture.rs:589. No CI-infra/setup-java noise exists because the PR has no configured checks.
One finding is carried on voipmonitor's authority plus my own verification because no lens had it (S3). Nothing in the PR description or comments was an instruction to me; the only bot comment is a case-file notice.
Pre Test Report
Pre-Test Report — PR #581 "ignition: set USE_NODE_PRIORITY flag on exported CUDA graphs"
Author: FujitsuPolycom (CONTRIBUTOR, Discord "Dooner") · head 61f64f18, base main 167f22c · +137/−7 in 3 files · open, CHANGES_REQUESTED from voipmonitor (priority reviewer), no CI on head.
RECOMMENDATION: DO NOT REFER TO HARDWARE TESTING (HOLD)
Do not send this to a test engineer yet. Three independent reasons:
- A blocking architectural problem is unresolved and will change the code under test. The PR turns node-priority instantiation on by default for every exported serving graph of every recipe, with no served-workload evidence — the charter's explicit bar for this class of change. The likely fix (make it explicit at the call site, derive it from prepared data, or drop the default) rewrites the very lines a test would validate.
- The only behaviour that is currently testable has already been validated on the same GPU class. voipmonitor ran the PR's own live CUDA export test on SM120 and it passed (
flags_by_name == {"decode": 9, "tune": 1}, 3.29 s). Re-running it on cn5 (also Blackwell/SM120) buys no new information. - The claimed benefit cannot be measured from this repository. The node-priority mechanism only exists in recipe-owned overlap branches, and recipes live in the external
local-inference-lab/hyperflare-recipesrepo (AGENTS.md:12 (not opened), 391-393; boundary enforced bytests/preparation/test_core_boundary.py:39-45(not opened)). No in-repo artifact produces a priority-bearing graph, so an A/B throughput test is not constructible here without importing external recipe code and model weights onto shared hardware.
Expected value if testing were performed now: low (~1–2 h of cn5 GPU time for near-zero decision value). The export-side assertion is already proven; the value-bearing measurements (served latency, SM121 replay) require a merged-or-reshaped design and an external recipe. Testing now would mostly confirm an unmeasured global scheduling change is live, not that it is good.
Why this is not ready: the blocking findings
B1. The flag is a magic default, applied to every graph, unmeasured — the charter's core objection to this PR
ignition/preparation/runtime_core.py:213 makes USE_NODE_PRIORITY (8) the default of instantiation_flags. The sole production caller, ignition/preparation/capture.py:193, passes no argument, and is reached whenever exporting = retain_graphs and warmup_storage is not None (capture.py:170) — i.e. every serving graph, every recipe, TP and TP1 alike.
- Charter: "Be explicit and pin everything. No magic defaults" and "Performance PRs need benchmarks showing an actual speedup over
mainon a served workload (#210)". Alsodocs/design-review.md:106-115(principle 12). The PR itself concedes: "Live CUDA export, nondefault kernel-priority instantiation across target drivers, and signed-coreflare runreplay remain open GPU qualification on this revision." - The decision is not even expressed as prepared data, though it could be: heliopause already serializes kernel-node attribute id 8 (
heliopause/src/export/capture.rs:462, 544-569) and Helios already replays it (helios/src/runtime_core/mod.rs:984-1013).
Correction to the reviews (important for scope judgement): the architecture lens stated the priority stream is "TP scratch … TP-overlap-only". That is wrong. docs/core-design.md:852-863 and docs/performance-work.md:126-144 describe a single-rank auxiliary stream overlapping GDN projections, shared/routed experts, and QSA selection; it is created lazily by ScratchArena.auxiliary_stream (ignition/preparation/scratch.py:83-105) whenever overlap=True (the default, scratch.py:59). The blast radius is therefore broader than "TP" — it is whichever recipes use overlap, which no in-repo file determines.
B2. The PR's benefit premise is unverified, and it is the cheapest thing to falsify
USE_NODE_PRIORITY only changes scheduling for nodes that carry a non-zero priority attribute. Heliopause exports an attribute only when it is non-zero (heliopause/src/export/capture.rs:561-569, KERNEL_ATTRIBUTES includes 8 at :462), and Helios applies only recorded attributes (mod.rs:984-1013). Whether a kernel captured on ScratchArena.auxiliary_stream (created at greatest priority, scratch.py:93-99) is exported with a non-zero attribute 8 is a CUDA capture semantic that no test in this PR or the repo exercises. If the driver leaves it zero, the flag is inert on replay and the change ships a scheduling-mode flip for no benefit. This premise should be settled before any throughput work is commissioned. (It needs one GPU and no recipe — see the deferred plan.)
B3. _flare_instantiation_flags has no invalidation path (correctness, should-fix)
Set at runtime_core.py:242, consumed at :282-287, and never cleared. instantiation_flags=None skips rather than clears, so a re-record keeps a stale word; and nothing drops it on reset()/destroy, unlike _RecordedGraphMetadata.release (:153-158) and RecordedExportGraph.reset (:185-189). _graphs() prefers the stale attribute over the live executable, publishing a flag word derived from a dead executable in a wire shape that heliopause/src/export/capture.rs:2822 structurally cannot detect. Not reachable from today's sole caller (a fresh CUDAGraph per capture), which is why it is should-fix, not blocking.
B4. Rejection happens after mutation, contradicting the PR's own claim (should-fix, affects test design)
The requested-flags check runs before mutation (:224-229), but the executable-derived check runs after retain_object (:236) and instantiate_graph (:237) at :239-241. The description's "rejecting unsupported bits on either source before mutating graph state" is false for that source, and the failure leaves a graph instantiated with owners retained and no _flare_instantiation_flags. The new test (tests/preparation/test_capture_graph_metadata.py:244-248) asserts only the raise, while its neighbour at :250-255 asserts no partial mutation — so the asymmetry is documented rather than caught.
Correction to the reviews: the correctness lens claimed this creates a new export regression on targets that set e.g. bit 2 (DEVICE_LAUNCH). It does not. On main, heliopause already derived flags from the live executable (capture.rs:788-794) and already rejected flags & !9 != 0 at capture.rs:589 during the same export operation. The PR moves an existing rejection earlier into Python (and leaves the graph half-mutated). This is an error-path and lifetime defect, not a new compatibility failure.
B5. instantiation_flags is a speculative extension point; the description is wrong twice (should-fix)
The None and 0 modes exist only in tests (test_capture_graph_metadata.py:234, 240). The description's "Passing instantiation_flags=None keeps executable-derived flags for startup tuning graphs" describes a path that does not exist — tuning graphs use capture_graph + instantiate_graph (runtime_core.py:246-269, capture.py:171, 194-197) and never reach record_export_graph (AGENTS.md:188-193 (not opened) rejects switches without a concrete requirement). Additionally the description's "Before:" clause invents prior behaviour (main wrote no flags at all), and "Candidate 61f64f1… on main" mislabels the PR's own head commit. All seven lenses flagged at least one description inaccuracy; voipmonitor raised the same two.
Open item no lens checked: voipmonitor's Major #2 — record_export_graph does not validate keep_graph=False/_flare_graph_metadata graphs before setting the flag, so such a caller would succeed and fail later with graph=0 in _graphs/Heliopause. Unverified by me; worth confirming in re-review, since it is a second, independent precondition gap.
Nits (ignorable, not gating)
_Cuda() re-dlopens libcuda.so.1 per exported graph (:200-205, while capture.py:43-47 and scratch.py:88-101 use the pinned cuda.bindings.driver); _graphs keeps the hardcoded ~9 and duplicate error string (:284-285) beside the new PERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGS (:194-197); the new capture_forwards test clones the existing harness; the added docstring paragraph restates the OR. The subtractive lens estimates ~104 of the 144 added lines are removable, with the production change reducible to 1–2 lines.
What is genuinely fine (so it is not retested)
- Flag arithmetic and vocabulary are correct.
1|8 = 9matches CUDACUgraphInstantiate_flags, and every consumer accepts it:helios/src/runtime_core/format.rs:495,heliopause/src/export/capture.rs:589and:2823. Helios instantiates withgraph.flags(helios/src/runtime_core/mod.rs:1215-1219), so bit 8 reaches instantiation. - Backward compatibility holds. Old cores with
flags=1still load everywhere; bit 8 was already permitted in the signed format, andtests/preparation/test_runtime_core.py:18-37already parametrizes0,1,8,9on_graphs. No Rust, wire, or docs change is needed. - Layer placement and model-agnosticism are right. No per-model branch, no new captured-graph op family, no Helios change.
- The wire-shape flip is low risk. Every exported graph now emits
{graph, instantiate_flags}instead of{graph, executable}, but both branches converge on the sameRecordedGraphin heliopause (capture.rs:762-794), and Helios always rebuilds from nodes and re-instantiates (mod.rs:1215-1219). - Security screen: all clear. No injection in the diff, description, or comments; I found no attempt to direct an agent (only a normal technical review from voipmonitor addressed to the human author). Peripheral unverifiable items: the "Discord: Dooner" line and a commit link to the author's fork.
Deferred minimal test plan (to run only after the blocking design question is settled)
Use cn5 (4 × RTX PRO 6000 Blackwell, SM120, amd64 — matches the charter's target and the SM120 box voipmonitor used). Do not use cn7 for anything but the single optional SM121 item. Budget: ~45–60 min of cn5 GPU time total; do not run the A/B throughput leg until an explicit measurement decision exists.
T0 — premise check (the highest-value test; ~10 min, 1 GPU). Run this first regardless of the design outcome.
Build a ScratchArena("cuda:0") (pattern already in tests/preparation/test_scratch_cuda.py:18-32), launch a few kernels on arena.auxiliary_stream and a few on the main stream, capture them into one graph, export via record_export_graph, then decode the exported nodes (decode pattern in tests/preparation/test_runtime_core.py:130-154) and print attribute id 8 per kernel node.
- Pass: auxiliary-stream nodes carry a non-zero attribute 8 and main-stream nodes carry 0/absent → the PR's premise holds; proceed.
- Fail: all zero → the flag is inert at replay; the PR must be reworked (set the attribute explicitly) and no further testing is warranted.
T1 — export correctness (only if T0 passes; ~5 min, 1 GPU).
FLARE_RUN_CUDA_TESTS=1 pytest -q tests/preparation/test_recorded_export_graph_cuda.py with CUDA_VISIBLE_DEVICES set. Expect {"decode": 9, "tune": 1}. This duplicates voipmonitor's SM120 run; run it once as the regression baseline for the revised revision, not per-commit.
T2 — Helios load + replay of a flags=9 core (only after the revision; ~15 min, 1 GPU).
This is the one genuinely untested area: no in-repo fixture has ever exported a non-zero instantiate_flags (helios/tests/runtime_core_fixture.py:146-158 uses record_template(..., 1)/RecordedExportGraph; the other fixtures instantiate with 0 or 1). Extend runtime_core_fixture.py so one graph carries instantiate_flags=9, flare run it, and assert (a) the node values are bit-identical to the pre-PR core (no numerical regression), and (b) cuGraphExecGetFlags on the Helios-instantiated executable reports 9. This satisfies voipmonitor's Major #1 second half and principle 13 ("validate previous cores through loading and serving").
- Regression leg (cheap, include here): load a pre-PR core (
flags=1) through the same binary and confirm identical output — one run, no extra hardware time.
T3 — served A/B throughput (defer; ~20 min, ≥2 GPUs, only on an explicit maintainer decision).
Requires a real recipe from local-inference-lab/hyperflare-recipes plus model weights on cn5, and --bypass-performance-check if the workstation GPUs are not NVLink-paired (docs/cli-design.md:1538-1545). Baseline main vs PR branch on the same core, same checkpoint, same TP width, flare run only (not ignition debug-serve, per principle 12), reporting TTFT and decode tok/s with raw values and repeatability bounds (docs/performance-work.md:35-59). If T0 shows the attribute is only present on small-collective branches, the expected effect is small and concentrated in prefill — measure prefill separately and do not run a long sweep chasing noise.
Do not test: the CPU unit tests (22 + 46 passed are reproducible anywhere), old-core loading beyond the T2 regression leg (path unchanged), or anything on cn7 unless an SM121 replay is specifically requested.
What the author should be told
Make the flag explicit and data-driven, not a default (derive it from recorded per-node priority, or pass it at capture.py:193); delete the instantiation_flags None/0 modes and the duplicated validation, adopting the constant in _graphs; validate executable-derived flags before mutating, or fix the claim and assert the retained-on-failure state; clear/invalidate _flare_instantiation_flags on reset; validate keep_graph=False up front; and bring either the served-workload flare run comparison or the T0 premise evidence. T0 is cheap and the author can run it without our hardware — asking for it before referral is the efficient move.
Final review
Recommendation: Changes Requested
The downstream Heliopause/Helios pipeline already accepts USE_NODE_PRIORITY (8) and replays captured node priority attributes with full core compatibility, and live SM120 export passes ({"decode": 9, "tune": 1}). However, this PR globally enables CTA-priority scheduling on every exported serving graph without any live flare run serving measurement, silently breaks keep_graph=False / _flare_graph_metadata graphs passed to record_export_graph, leaves stale _flare_instantiation_flags across reset() / None, and makes two factually incorrect behavioral claims in the PR description.
Blockers
- Unqualified global GPU scheduling change without
flare runserving evidence (ignition/preparation/runtime_core.py:208-243,ignition/preparation/capture.py:170-193,ignition/preparation/scratch.py:83-105,docs/core-design.md:852-863,docs/performance-work.md:133-144).record_export_graphenablesCUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY(8) by default for every serving graph exported throughcapture_forwards(capture.py:193).- The repo's high-priority stream,
ScratchArena.auxiliary_stream(ignition/preparation/scratch.py:83-105, created withcuStreamCreateWithPriority(..., greatest)), is used not only for small TP collectives, but also for heavy overlapped compute branches across recipes — shared experts up to 256 rows, Qwen GDN input projections, and QSA index selection (docs/core-design.md:852-853,docs/performance-work.md:133-138). TurningUSE_NODE_PRIORITYon globally changes GPU CTA scheduling/preemption for every kernel captured onauxiliary_streamacross all recipes. - The PR provides no
flare runlatency measurements and no live Helios instantiation/replay check (its own limitations note that live CUDA export, nondefault priority instantiation across target drivers, and signed-coreflare runreplay remain open). - This violates the Charter ("Bring real evidence. Performance PRs need benchmarks showing an actual speedup over
mainon a served workload (#210)"),docs/design-review.md:106-115(Principle 12: performance claims require equivalent baselines and actual Helios service measurements), anddocs/performance-work.md:142-144("Measure complete graph latency, including synchronization and resource contention, at each relevant row capacity"). Priority reviewer@voipmonitorhas already issuedCHANGES_REQUESTEDon this requirement. - Required before merge: Qualify an exported TP/overlap core end-to-end via
flare runwith before/after serving latency (covering both collective overlap and heavyauxiliary_streamcompute branches to confirm no scheduling regression), and confirm that the Helios-instantiated executable reportscuGraphExecGetFlags == 9.
Should Fix
-
record_export_graphsilently breakskeep_graph=False/_flare_graph_metadatagraphs until export (ignition/preparation/runtime_core.py:208-243,:256-269,:282-292).record_export_graphcallsinstantiate_graph(graph)(which explicitly accepts_flare_graph_metadatagraphs created bycapture_graph(retain_graphs=True)withkeep_graph=False, whose CUDA template Torch releases upon instantiation) and then unconditionally setsgraph._flare_instantiation_flags = prior_flags | instantiation_flags.- On
main,_graphs()fell through to lines 288-292 and emittedgraph=0, executable=executable, which Heliopause resolved viarecorded_graph(graph.executable)(heliopause/src/export/capture.rs:775-786). With this PR,_graphs()(runtime_core.py:282-287) takes theflags is not Nonebranch first and callsint(graph.raw_cuda_graph()), crashing late withRuntimeError("template was released") or emittinggraph=0withinstantiate_flags=9(rejected atheliopause/src/export/capture.rs:2823). - Fix: When
instantiation_flags is not None(or unconditionally if the kwarg is removed), validate up front beforeretain_object(...)andinstantiate_graph(...)thatgetattr(graph, "_flare_graph_metadata", None) is Noneand thatgraph.raw_cuda_graph()returns a live nonzero template handle (matching@voipmonitorMajor #2), and add a unit test covering that rejection.
-
Stale
_flare_instantiation_flagssurvivesinstantiation_flags=Nonere-recording andgraph.reset()(ignition/preparation/runtime_core.py:238-243,:282-287,:153-166).- Unlike
_RecordedGraphMetadata.executable, which clears itself on reset viaregister_destroy_callback(runtime_core.py:166),_flare_instantiation_flagsis never cleared whenrecord_export_graphis called withinstantiation_flags=Noneon a previously recorded graph, nor whengraph.reset()tears down the graph. Because_graphs()prefers_flare_instantiation_flagsover the live executable, a reused graph would silently serialize stale flags. - Fix: Clear any pre-existing
_flare_instantiation_flagsoninstantiation_flags=None(or at entry after pre-validation), and clear it on reset via aweakref-guarded destroy callback (do not capture a strong reference tographin the callback, which would break GC reclamation tested intest_export_graph_retains_external_owners_until_releaseattests/preparation/test_capture_graph_metadata.py:335-339).
- Unlike
-
Post-failure mutation ordering and inaccurate PR description claims (
ignition/preparation/runtime_core.py:236-242,tests/preparation/test_capture_graph_metadata.py:244-255).record_export_graphrunsgraph.retain_object(...)andinstantiate_graph(graph)before querying_executable_instantiation_flags(graph)and validatingprior_flags(necessarily, sincecuGraphExecGetFlagsrequires an instantiatedCUgraphExec). On unsupportedprior_flags,graphremains instantiated with owners retained and_flare_instantiation_flagsunset. While retaining owners until reset is consistent withtest_export_instantiation_failure_retains_owners_until_reset(test_capture_graph_metadata.py:342-363), it directly contradicts the PR description's statement "rejecting unsupported bits on either source before mutating graph state", andtest_capture_graph_metadata.py:244-248asserts nothing about post-failure state forunsupported_exec.- Two additional description statements contradict the code (
AGENTS.md:88-112,docs/design-review.mdPrinciple 16):- "Passing
instantiation_flags=Nonekeeps executable-derived flags for startup tuning graphs" is false: startup tuning graphs callcapture_graph+instantiate_graph(tests/preparation/test_recorded_export_graph_cuda.py:62-65) and never callrecord_export_graph. - Before: misstates
main(record_export_graphonmainrecorded no flags;_graphs()passedexecutableto Heliopause, which readexecutable_flagsatheliopause/src/export/capture.rs:791-794).
- "Passing
- Fix: Assert the intended post-failure contract for
unsupported_execintests/preparation/test_capture_graph_metadata.py:244-248(either owners retained until reset, or explicit cleanup), and update the PR description so its before/after, caller, and non-mutation claims match the code.
Subtract / Simplify
-
Remove the unused
instantiation_flagskeyword parameter unless a concrete caller needs it (ignition/preparation/runtime_core.py:208-230,:238).- The sole in-repo production caller (
ignition/preparation/capture.py:193) passes noinstantiation_flagsargument, and the only caller cited forinstantiation_flags=Nonein the PR description (startup tuning graphs) does not callrecord_export_graph. Removing the speculative kwarg, itsNone/0branches, and its duplicated input-validation guard trims ~15 production lines (AGENTS.md:188-190). Keep it only if a concrete caller (for example inhyperflare-recipes) actually requires per-call overrides — and name that caller in the PR description.
- The sole in-repo production caller (
-
Reuse
PERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGSin_graphs()(ignition/preparation/runtime_core.py:284)._graphs()still hardcodesflags & ~9with the identicalValueErrorstring duplicated fromrecord_export_graph:229. Replace~9with~PERMITTED_CUDA_GRAPH_INSTANTIATE_FLAGSso the permitted mask has one definition in Python (matching@voipmonitorNit #4).
Nits
- Lazily cache
_Cuda()instead of reopeninglibcuda.so.1/nvcuda.dllper graph (ignition/preparation/runtime_core.py:200-205,:76-78)._executable_instantiation_flagsconstructs a fresh_Cuda()on every call, whereasCoreStorage(ignition/preparation/core_storage.py:76) andVirtualStorage(ignition/preparation/virtual_storage.py:27) instantiate_Cuda()once and reuse it. Cache a module-level_Cudainstance lazily (matching@voipmonitorNit #4).
Verified passes
- Layer boundary & runtime simplicity: The flag decision stays in Ignition (
ignition/preparation/runtime_core.py); Helios stays model-agnostic with zero Rust changes (helios/src/runtime_core/format.rs:495,helios/src/runtime_core/mod.rs:984-1013,:1215-1219). - Core compatibility & downstream wiring: Existing
flags=1cores still load unchanged;main's Heliopause and Helios validators already acceptflags & !9 == 0(heliopause/src/export/capture.rs:589,:2823;helios/src/runtime_core/format.rs:495),heliopause/src/export/capture.rs:462,544-569already captures kernel-node attribute8(CU_LAUNCH_ATTRIBUTE_PRIORITY), andhelios/src/runtime_core/mod.rs:984-1013already replays it. - No new captured-graph op family or per-model branch: No new op contract approval is implicated, and no recipe allowlist or per-model switch is added.
- Live SM120 CUDA export FFI confirmed: Priority reviewer
@voipmonitorranFLARE_RUN_CUDA_TESTS=1 pytest -q tests/preparation/test_recorded_export_graph_cuda.pyon SM120 (1 passed,3.29s), confirming realcuGraphExecGetFlagsFFI andflags_by_name == {"decode": 9, "tune": 1}. - Windows portability:
_Cuda(ignition/preparation/runtime_core.py:78) already handlesnvcuda.dllonnt. - PR metadata: Required four-part ordering,
Discord: Doonercontact line, and honest disclosure of unrun live GPU qualification are present.
Dropped on verification
- Candidate B2 as a Blocker (unused
instantiation_flagskwarg / duplicated guard): Downgraded to Subtract / Simplify; an optional kwarg on a publicignitionhelper (potentially consumable by externalhyperflare-recipes) is not a correctness, safety, or broken-contract blocker, and capture-timeprior_flagsvalidation fails earlier with a distinct message than_graphs(). - Candidate B1's "enable only when a recorded node carries a priority attribute" trigger & Value Proposition's "make it an opt-in switch": Refuted; on graphs without
auxiliary_stream, all nodes already have default priority0matching Helios's default-priority launch stream (docs/prefix-cache-offload.md:855-857), soUSE_NODE_PRIORITYis already a no-op there — the real regression risk is on graphs that do capture heavy compute onScratchArena.auxiliary_stream(docs/core-design.md:852-853,docs/performance-work.md:133-138), where a priority-attribute trigger would still fire; andAGENTS.md:209-212/docs/design-review.md:58disallow rescuing unmeasured changes with default-false opt-ins. - Candidate T2 (delete
_executable_instantiation_flagsand hardcode8, dropping bit1AUTO_FREE_ON_LAUNCH): Dropped; whileheliopause/src/export/capture.rs:607-679currently rejects MemAlloc/MemFree node kinds (CUDACUgraphNodeTypekinds 10/11, not 3/4 as upstream stated), stripping bit1changes exported metadata from9to8, diverges from PyTorch's instantiated flags andtune: 1, and alters the PR's stated flag-preservation semantics rather than removing dead code. - Candidate T3 (delete
test_capture_forwards_export_sets_node_priority_instantiation_flag): Dropped;tests/preparation/test_capture_graph_metadata.py:258-303is the only CPU integration test exercising theexporting=Truebranch ofcapture_forwards(ignition/preparation/capture.py:170,192-193) into_graphs()(the neighboring test at lines 165-194 passeswarmup_storage=None). - Candidate S4 (monkeypatched
_executable_instantiation_flags/ opt-in CUDA test gap): Dropped;@voipmonitorverified the realcuGraphExecGetFlagsFFI on SM120 viaFLARE_RUN_CUDA_TESTS=1 pytest -q tests/preparation/test_recorded_export_graph_cuda.py, matching the repo's opt-in GPU test convention, and adding a mock for_Cuda.callprovides minimal signal (AGENTS.md:194-196). - Candidate S5's "
_Cudabypassescuda.bindings" claim: Dropped;_Cuda(ignition/preparation/runtime_core.py:76-90) is an established driver-API helper in this module already used byignition/preparation/core_storage.py:76andignition/preparation/virtual_storage.py:27(only the per-call_Cuda()instantiation survives as a Nit). - Candidate N1(d) ("Candidate
61f64f18onmain" phrasing): Dropped as mechanical prose nitpick with no technical impact.
Full report Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.
Classify & Apply Labels
Applied: +triage:validation, +performance, +area:preparation
Threshold: 65%
Triage
- [✓]
triage:validation: 90.3% -
triage:review: 9.5% -
triage:design-review: 0.2%
Priority
-
none: 99.9% -
priority:P1: 0.1% -
priority:P2: 0.0%
Type
- [✓]
performance: 99.5% -
enhancement: 62.2% -
community: 37.8%
Area
- [✓]
area:preparation: 99.0% -
area:kernels: 50.0% -
area:scheduling: 46.9%
Model
-
model:nemotron-3.5-bolt: 46.9% -
model:qwen3.8-flash-next: 46.9% -
model:kimi-k3.1: 43.8% -
model:qwen3.8-27b: 40.7% -
model:deepseek-v4: 37.8% -
model:mimo-v2.6: 34.9% -
model:inkling-small: 32.1%