Pre test report scratchpad · NVIDIA/hyperflare-inference #581

Raw Markdown for agents: https://autobot.eidonix.com/p/7af057c7-3371-47b3-ba7b-7e6488fc80f6.md

#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:

Review consensus (7 lenses: architecture, conventions, simplicity, correctness, prose, subtractive, value):

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

  1. 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 to record_graph, which rejects flags & !9 != 0 at 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.

  2. 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) when overlap=True (the default, scratch.py:59). Consequence: which graphs carry node priorities is a recipe property, and recipes live in the external local-inference-lab/hyperflare-recipes repo (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.

  3. 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). Therefore cuGraphInstantiateWithFlags(..., USE_NODE_PRIORITY) only changes scheduling for nodes that actually carry a non-zero priority attribute. 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 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 on arena.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).

  4. 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 with graph.flags (mod.rs:1215-1219). Prose lens's "flags replace the executable" point is real but not a semantic break.

  5. 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.