#1 [high] PR #332 facts and citations
PR #332 (mark-yong, open), "Report unresolved kernel argument address candidates during export", refs #266. Files: heliopause/src/export/capture.rs (+6 -1), heliopause/src/export/reachability.rs (+428 -29). One commit c3cc87ea.
- capture.rs:3102 reach.graph(&graph.name, ...); capture.rs:3137-3141
if reach.unresolved_count() > 0 { for line in reach.unresolved_report(&output.index.ranks[0].functions) { eprintln!("export: rank {}: {line}", request.rank) } }. - reachability.rs:45-75 new UnresolvedCandidate/Site/UNRESOLVED_EXAMPLES=10; :84
blobsHashSet -> HashMap<(Vec,Vec<usize,usize>), Vec<(usize,u64)>>; :85 unresolved map; :131-145 candidate() (was pointer()); :147-188 blob() records misses per unique blob; :190-246 unresolved_count/unresolved_unique_addresses/unresolved_report; :248-274 scan() takes base + Option, recomputes in_free_block that candidate() already computed; :276-317 graph() takes name, enumerate nodes/args for Site. Non-blocking: nothing new fails export; no retention change (candidate() still returns early for inactive without reference). Validation claimed: cargo test --lib 205 passed/4 ignored; SM120 2-GPU export of local-inference-lab/DeepSeek-V4-Flash-Vision-Exp-lossless-CSF printed rank 0: 175,329 occurrences / 2,646 distinct addresses, 10 examples all b12x mHC MHCPostPrePartialKernel in prefill4096 node 34; rank 1 170,544 / 2,637. Did NOT reproduce #266; no W4A8 MoE kernel in examples; cannot run 4-GPU DeepSeek V4.1 export (3 GPUs). Root cause already fixed elsewhere: #331 (merged, warmup-stream isolation) fixes #266; #331 validation incl. FujitsuPolycom 4xGB10 TP4 DeepSeek V4.1 export where all 120 split-K workspace args resolved to recorded allocations and 864 unaligned byte-window matches + 1 aligned CUTLASS param match per rank remained. #331 notes pre-change cores may retain a transient address and need re-export. Maintainer ask: #266 comment by calvarado2004 2026-11-11 15:28 asked for export-time rejection or strict/warn with context (graph, node, symbol, argument, offset); original-el8 2026-11-13 set P1 and asked for "export-time detection where pointer provenance can be established without misclassifying numeric kernel parameters". #266 also suggests narrowing the scan to aligned 8-byte params + tensor-map base field. Related: #395 (CUDAGraph.reset frees shared workspace), #517 (Qwen3.8 Xid 31, different cause). No duplicate export check exists;flare inspect --memory-maponly shows coverage. Charter: goals include serving captured graphs from supported recipes; "solve the right problem in the right place / smallest footprint"; "bring real evidence"; "no per-model branches or flags"; "no unsupported abstractions or churn"; priority contributors get spelled-out requirements.
#2 [high] Review findings: defects and evidence gaps in #332
- Example selection defeats the purpose. reachability.rs:73-75 UNRESOLVED_EXAMPLES=10; :222-224 sorts by
entry.order= insertion order of first occurrence; entry.occurrences tracked but only used for the hidden-occurrence count. From the PR's own SM120 run all 10 examples per rank come from prefill4096 node 34, while 175,329 occurrences / 2,646 distinct addresses exist. In #266 the real signal is ONE address in ~10 arguments (below the ~66 occurrences/address average), so it would be crowded out of the first-10 window by benign values from the earliest nodes. A genuinely stale pointer is rare; ubiquitous constants are not. Sorting by ascending occurrence count (or grouping per graph/kernel with distinct-address counts) is a small change that would surface the target. - scan() duplicates candidate()'s inactive test (reachability.rs:262-269 vs :131-134):
if (!self.candidate(pointer)? || in_free_block). Two copies of one predicate that tests rely on; should be one function returning an enum (Live/Numeric-free/Gap/Inactive). - blobs cache regression: HashSet->HashMap<(Vec,Vec<usize,usize>), Vec<(usize,u64)>> (:84, :147-169) and
Some(misses) => misses.clone()re-copies the miss list on every cache hit, plus stores misses for every distinct blob for the whole export. Previously a duplicate blob short-circuited. - Reporting path: capture.rs:3137-3141 raw eprintln!, bypassing StartupProgress/Phase (helios/src/startup.rs:241-369) used by every other export stage. No structured channel, not captured by startup observation, interleaves with phase rows on a terminal.
- Tests assert exact prose (reachability.rs:826-846, 858-875): brittle churn; repo prose rules (AGENTS.md:40-45) make this costly to maintain.
- Docs: docs/cli-design.md:1609 enumerates what
ignition exportprints; a new per-rank diagnostic emitted on every export is undocumented. AGENTS.md:52-55 requires unresolved limits in docs/TODO.txt; limitations currently live only in the PR text. - No true positive evidence: SM120 2-GPU Vision-Exp export shows only benign mHC matches; #266 not reproduced (only 3 GPUs). #331 (merged) already fixed the root cause and its 4xGB10 DeepSeek V4.1 export still showed 864 unaligned byte-window matches + 1 aligned match per rank, i.e. the scan as written fires heavy noise even on a healthy package.
- Not implemented: #266's suggested narrowing (8-byte-aligned slots of 8-byte params + tensor-map base field), which is what would make the output actionable. parameter_layouts (ignition/preparation/tensor_metadata.py:140-149, capture.rs:2927-2942) already supplies typed parameter sizes, so the narrowing is cheap.
- Scope/layer is right: Heliopause reachability scan is the correct place, no per-model branches, no flags, non-blocking so no guarantee is weakened; retention semantics unchanged (candidate() returns before referencing inactive, same as former pointer()).
#3 [high] Verdict for #332
Verdict: worth it with changes (not as-is). Why worth doing: layer is right (Heliopause reachability scan, heliopause/src/export/reachability.rs), it is non-blocking so no guarantee is weakened, no flags/per-model branches, and #266 (calvarado2004, 2026-11-11 15:28) asked exactly for an export-time report with graph/node/symbol/argument/offset; original-el8 (2026-11-13) asked for export-time detection "where pointer provenance can be established without misclassifying numeric kernel parameters". Detection is still needed because #331's warmup-stream isolation only prevents this leak class, and #395 (graph.reset frees shared workspace) is another live lifetime hazard; old cores keep the stale address. Why not as-is: (a) the maintainer condition (provenance / no misclassification) is not met; (b) author's own SM120 run shows 175,329 occurrences / 2,646 distinct addresses on a healthy export with all 10 examples from one benign kernel, and the sample value is at byte offset 4 of a parameter (0x100000000800 -> looks like two adjacent 32-bit fields), i.e. the output is dominated by misaligned numeric constants; (c) no true positive demonstrated — #266 not reproduced (3 GPUs only); (d) examples kept in first-encounter order so a rare stale pointer (10 args out of ~175k occurrences in #266) would be buried; (e) code issues: duplicated inactive predicate, blobs cache now stores+clones miss vectors, raw eprintln! bypassing StartupProgress and the existing Console-based print_inventory path (ignition/preparation/runtime_core.py:346-348, memory_inventory.py:323-327), tests asserting exact prose. Required changes: narrow to 8-byte-aligned slots with parameter size 8 and the tensor-map base field (parameter sizes already reach capture.rs:2917-2942 / tensor_metadata.py:140-149); group report by kernel+argument with per-group distinct counts, and rank examples by rarity or by group rather than first encounter; show examples under --verbose / progress detail; collapse the duplicate predicate into one function returning an enum; fix the miss-cache clone; drop prose-equality assertions; document in docs/cli-design.md:1609 and docs/TODO.txt (AGENTS.md:52-55); add one true-positive check (an argument that a known-bad layout would flag, or an archived faulting package) plus a false-positive budget on a real export.
#5 [high] Round 2: what the revision fixed in #332
PR #332 @ 1ac7073d (rebased on c9935887). Files: reachability.rs +579/-34, capture.rs +6/-1, docs/runtime-core-design.md +8/-2, docs/TODO.txt +6.
Fixed since c3cc87ea (all verified in code):
- Alignment: reachability.rs:294-303 — retention still byte-by-byte (
data.windows(8).enumerate()), reporting gated by(base + offset).is_multiple_of(8)at :300. Tests:unaligned_straddling_window_is_not_reported_while_aligned_stale_pointer_is(:1046), aligned/unaligned in :1072. - Single predicate:
candidate():156-170 is the only live/inactive/gap rule; scan uses!self.candidate(pointer)?at :298 — the duplicate in_free_block lookup is gone. - Wording: summary now says "resolve to no active recorded allocation (gap or inactive range)" (:236-246), which is TRUE because
intervalsare the granule-trimmed live pieces (capture.rs:1473-1486 via live_pieces :1259-1303 / :1274-1275 trims inward) — a value in the retained edge is in no live interval. Author kept rawrequest.inactive(capture.rs:3164) deliberately: trimming inward would let pointers into freed sub-granule blocks retain the segment and vanish from the report. - Hidden-count units: distinct addresses and occurrences reported separately (:264-279) with 4 tests; no hidden line when <=10 distinct (:264).
- Docs: runtime-core-design.md:154-157 (scan semantics) and :337-341 (per-rank stderr line). TODO.txt new item: 4-GPU DeepSeek V4.1 + 8-GPU W4A8 measurement.
- Author claim: cargo test --lib heliopause 221 passed / 5 CUDA ignored, 26/26 reachability tests.
- Emission site capture.rs:3219-3223 sits after
graph_phase.finish(:3215) and beforemodule_phasecreation (:3224), so it does not interleave inside an animated phase.
New aligned export counts (author, 2x RTX PRO 6000 SM120, DeepSeek-V4-Flash-Vision-Exp): rank0 22,618 occ / 762 distinct; rank1 19,417 / 832 (was 175,329/2,646 and 170,544/2,637). Printed output bounded at UNRESOLVED_EXAMPLES(10)+2 = 12 lines/rank. Residual noise is structural: e.g. 0x100000000800 == two adjacent 32-bit fields (0x1000, 0x800) at an 8-aligned offset; 0xfff00000fff; 0x7cb800000004. Alignment cannot separate these from pointers.
CORRECTION to my earlier advice: a "parameters whose size is 8" filter would MISS #266's primary case. #266 lists the nvjet split-K parameter as a 384-byte parameter, offset 256; only the cublasLt::splitKreduce_kernel is argument 1. Both offsets (256 and 0) are 8-aligned, so the author's alignment-only filter preserves detection while a size-8 filter would not.
#6 [high] Round 2: #266's own evidence for the mechanism
#266 (calvarado2004) 2026-11-11 15:28 / 16:12 — decisive for the evidence question:
- The reporter wrote an out-of-tree script that "walks every kernel argument of a package. It reports 8-byte values that fall inside the rank's reservations but outside every recorded allocation." That is precisely this scan's gap predicate (this PR additionally reports inactive ranges, which the reporter independently called "just as unsafe").
- On the faulting 8192 package it "reports exactly the 10 arguments above" — the 5 split-K pairs,
nvjet_sm121_..._splitK_TNNN384-byte parameter at offset 256 andcublasLt::splitKreduce_kernel<32,16,int,float,bf16,...>argument 1. - "Its only other hits are constants in the W4A8 MoE kernels (for example 0x813000fa000)", which also appear in a differently laid out package, so they are not addresses.
- After the workspace clear, the pointer check reported 0 out-of-allocation kernel arguments on all 4 ranks. So on the exact package class this diagnostic targets, signal-to-noise is good (~10 true hits, few false) and the offsets are 8-aligned. The 762/832-distinct noise seen in the author's Vision-Exp export is layout-dependent (mHC/CUTLASS geometry constants), not intrinsic to the predicate.
- original-el8 2026-11-13 set P1 and asked for "export-time detection where pointer provenance can be established without misclassifying numeric kernel parameters" — a standing maintainer request.
- #331 (merged) fixed the root cause (isolate cuBLAS warmup workspaces); #266 notes existing cores embed the addresses, so detection still has value for already-exported cores; #395 is a second live lifetime hazard.
Remaining gaps: author has no personal true positive on 4-GPU hardware (has 3 GPUs); example ordering is still first-encounter (reachability.rs:248 sort by entry.order), so a lone stale pointer in a 762-distinct-address export could be crowded out of the 10 shown (author offered one example per kernel symbol). Some report tests assert exact prose (:842-876, :877-906).