Explore report · NVIDIA/hyperflare-inference #332

Raw Markdown for agents: https://autobot.eidonix.com/p/60b28052-0c41-4e04-a92c-1bca650874dd.md

PR #332 — "Report unresolved kernel argument address candidates during export"

Case file. Author mark-yong; open, ready-for-review, head c3cc87e, base f9aec99; +434/−30 in 2 files (heliopause/src/export/reachability.rs, heliopause/src/export/capture.rs). Refs #266.

Key findings


1. The change

Plain terms: the export reachability scan walks kernel argument bytes looking for values that look like pointers into recorded allocations. Values in gaps between allocations, or in inactive (freed) parts of recorded segments, used to be silently discarded. Now they are collected into one address→(first site, count) map, and after each rank's graph phase a bounded report is printed to stderr: total occurrences, distinct addresses, up to ten distinct addresses with first graph / node / recorded kernel symbol / module / argument / byte offset, and how many occurrences were omitted.

Mechanically, at pr/332:

Things the change does that its description does not say (all verified at head):

  1. No 8-byte alignment filter (reachability.rs:259). Each stale pointer is counted at up to eight window positions, and windows straddling two adjacent parameters are reported — the author's own first printed example is "argument 0, offset 4, 0x100000000800", an offset that cannot hold a pointer field.
  2. "Occurrences" are byte-window hits, not call sites. unresolved_count() sums per-address occurrences (reachability.rs:190-195); because blob memoizes, identical argument bytes in later graphs replay the cached misses and re-increment counts (test shared_argument_bytes_record_one_example_per_address, :793). So 175,329 occurrences cannot be mapped onto "10 stale arguments".
  3. Output path. Raw eprintln! inside capture_rank, on every rank (progress output is rank-0-only at capture.rs:2774), emitted before module/global capture, so a later export failure still leaves the report on stderr, and nothing is persisted for after-the-fact inspection.
  4. Scope. Candidates are only recorded for kernel-argument blobs; allocation contents and module globals pass None and report nothing, and values outside [first allocation start, last allocation end) are never candidates (the description's Limitations do concede the latter).
  5. Non-retention is exact. candidate() returns early for inactive ranges without calling reference() (reachability.rs:131-145); nothing returns Err for a candidate; validate_allocations remains the only failure path. This matches the description.
  6. No opt-out and no fail mode, although #266's reporter's request offered "either fail the export or warn".

The description says nothing that the code does not do.

2. The why

Driving defect: issue #266 (open, P1; labels area:memory/packaging/preparation, bug, model:deepseek-v4.1, triage:investigate), opened 2026-11-11 by calvarado2004, updated 2026-11-13. Four DGX Spark GB10 (SM121) nodes, TP4, deepseek-ai/DeepSeek-V4.1-Flash-1017 at 7f534bb6: a package exported with --prefill-chunk-size 8192 Xid-31s on the first prefill8192 prompt; the fault VA 0x812d3a00000 lies in a 104 MiB gap between recorded allocations and is carried by 10 kernel arguments (5 pairs): nvjet_sm121_..._splitK_TNNN (384-byte parameter, offset 256) and cublasLt::splitKreduce_kernel (argument 1). Root cause: PyTorch's cached cuBLAS workspace, created in transient storage during warmup, is baked into the first captured graph. The chunk-4096 export aliases instead of faulting.

The check this PR implements was requested in #266 by its own reporter (2026-11-11 15:28) as "a second suggestion, independent of the Ignition change": record [floor, ceiling) values inside no recorded allocation, and values inside inactive free blocks, with graph, node, function symbol, argument index and byte offset, and either fail the export or warn; handle false positives via the existing typed numeric spans; optionally narrow the scan to 8-byte-aligned offsets of parameters. The reviewer's current blocking item (aligned offsets only) originates in that comment. The reporter's out-of-tree checker listed exactly the 10 split-K arguments on the faulting package and only W4A8 MoE constants on the chunk-4096 package.

original-el8 triaged it on 2026-11-13: P1, "the next step is a focused lifetime fix and regression covering the first captured graph, plus export-time detection where pointer provenance can be established without misclassifying numeric kernel parameters."

So #332 is the export-time detection half of a two-part response; the lifetime half is #331 (merged 2026-11-20), same author. How widely wanted: a single-reporter P1 bug rather than a broad feature request — two maintainers (calvarado2004 as reporter, original-el8 as triager) plus the author.

4. Recent activity

Branch point f9aec99 (2026-11-17, Luke Alonso). The author's last push is c3cc87e (2026-11-20); every main commit touching these files landed after that:

  1. 040f39ff 2026-11-24 PCCessna (#498) — capture.rs +259/−16, rewrote the Downloader/module-global/weight paths that begin at capture.rs:3142, just after the new print block at 3137-3141.
  2. 052fbdf5 2026-11-24 Jason Cook (#431) — reachability.rs +113, capture.rs +1/−9; the semantic and textual conflict described above.
  3. f646bebc 2026-11-24 Luke Alonso (#507) — reachability.rs +5.
  4. 716df00f 2026-11-25 yatesdr (#504) — capture.rs KV compression.

Historically this exact path has been Luke Alonso's: 3919c1db "Retain CUDA graph resources throughout core export" (2026-11-11), b455be5e/0f0b7626 (2026-11-09) restructured native export. #332 builds on that design (reachability pruning, typed numeric spans) and reverses nothing; the tension is sequencing — it was written against a file since refactored twice by other maintainers, and its reviewer's merge-into-main test (d8fd1431, 2026-11-19) predates all four commits.

5. People

6. Community

Four discussion entries in total: three reviews by yatesdr (2026-11-18 22:40; 2026-11-19 15:56 at 499710e9; 2026-11-20 04:34 at c3cc87e) and one author reply (2026-11-19 21:02) carrying the export numbers. No approvals, no reactions, no additional inline threads of consequence, no autobot case file or autobot review (those appear on #314, #498, #524/#525/#526, all dated 2026-11-24/25, after this PR's last update). By comparison, the sibling #331 drew 12 discussion entries, three reviewers and an independent GB10 validation. Interest level: low-to-moderate, and stalled for five days after the last round.

Review trajectory: round 1 (2026-11-18) found the CUfunction handle printed instead of the symbol, no rank label, first-hits rather than one example per address, noise unmeasured, and a missing Signed-off-by. Round 2 (2026-11-19 15:56) accepted those fixes and raised: no export run yet; a cuBLASLt example that contradicts #266's own finding; inactive ranges still dropped silently; and bookkeeping (store the function index, collapse the parallel miss lists). Round 3 (2026-11-20 04:34) accepted all of the above ("inactive ranges are reported without being retained; one map now holds each address's first site and count; symbols come from the recorded function index; the description's account of #266 is fixed") and left one blocking item (8-byte-aligned offsets, with counts to be re-taken and "one example per kernel symbol" if thousands remain) plus three minor ones.

7. Project fit

8. Claims and evidence

Claim Backing
cargo test --locked --manifest-path heliopause/Cargo.toml (not opened) --lib → 205 passed, 4 ignored Author's local run only. Reviewer independently got "206 passed, 4 ignored, both" at 499710e9 and at that head merged into main d8fd1431 (2026-11-19 15:56) — the off-by-one is consistent with main gaining a test. 205/4 also matches what #431 reports for main. No CI covers heliopause (.github/workflows builds eos/selene/selene-manager/helios/flare-cli/flare and Kani for helios), so no machine-checked result exists.
Tests "cover distinct-address and occurrence counting, first-site order across graphs, recorded-function symbol lookup, numeric exclusions, inactive-range boundaries, and non-retention of inactive storage" Verified: the ten tests exist at the lines cited above and cover those cases. They use only 8-byte-aligned values and never exercise an unaligned or straddling window, so the blocking item has no failing test.
SM120 two-GPU export of local-inference-lab/DeepSeek-V4-Flash-Vision-Exp-lossless-CSF completed with the diagnostic; rank 0 175,329 occurrences / 2,646 distinct, rank 1 170,544 / 2,637; all ten examples per rank b12x mHC Cutlass MHCPostPrePartialKernel, prefill4096 node 34, argument 0, offset 4, addresses 0x100000000800 / 0x100000000900 (module-13 on rank 0, module-6 on rank 1) Author's comment 2026-11-19 21:02 plus the description table; reviewer accepted the numbers ("they answer the first item of the last round", 2026-11-20). Not reproduced by anyone else. The example addresses are unaligned-offset artifacts at the very start of the recorded envelope — the noise the blocking item is about.
"The recipe configures its MXFP4 experts with A8 activations (load_mxfp4_experts)" Not checkable from this repository; recipes live in local-inference-lab/hyperflare-recipes.
The diagnostic is non-blocking and does not retain inactive storage Verified in code (reachability.rs:131-145; nothing returns Err for a candidate; no retained inactive allocation).
"Numeric exclusions and allocation-content scanning retain their existing behavior" Verified: blob() still subtracts merged numeric ranges (reachability.rs:152-165); contents scanners pass None and report nothing. One behavior change worth noting: blobs moved from HashSet to HashMap so misses are memoized, which is why occurrence counts include repeats across graphs.
Limitations (does not reproduce #266's four-GPU failure, no W4A8 kernel among examples, values outside the envelope and stale values aliasing live storage undetected, only three RTX PRO 6000 GPUs available) Author-stated, consistent with the code and with what the printed report can show.

9. Reach

10. Process

Open questions / not found

  1. Whether the commit message body still says "outside live recorded allocations" and still lists W4A8 as untested (round-3 item 4) — the commit body was not readable from the PR view.
  2. Whether the branch merges cleanly into current main after #431/#507/#498/#504, and whether the full test suite (not just heliopause --lib) still passes — the reviewer's merge check predates all four commits, and no CI runs.
  3. Whether the diagnostic actually reports #266's ten stale cuBLASLt arguments on a four-GPU DeepSeek V4.1 export. Not demonstrated; the author has three RTX PRO 6000s. calvarado2004 (who has the failing package and a scanner) and FujitsuPolycom (who validated #331 on four GB10s) are the two people who could settle it and neither has appeared.
  4. Whether the W4A8 MoE constant-noise premise holds: no W4A8 kernel appeared among the printed examples, and the recipe claim about load_mxfp4_experts is not checkable from this repository.
  5. Whether maintainers other than yatesdr — particularly lukealonso, who owns heliopause/src and the export design, and original-el8, who owns #431 and triaged #266 — intend this diagnostic to exist at all in its non-failing, unpersisted form; neither has commented.