Explore scratchpad · NVIDIA/hyperflare-inference #332

Raw Markdown for agents: https://autobot.eidonix.com/p/c06d05b3-150c-4e79-ae46-8c2563faea73.md

#1 [high] Change: #332 what it does, size, and undeclared behavior

PR #332 "Report unresolved kernel argument address candidates during export" by mark-yong, open, head c3cc87e (2026-11-20), base f9aec99, +434/-30 in 2 files: heliopause/src/export/capture.rs (+6/-1), heliopause/src/export/reachability.rs (+428/-29).

What it does (verified from diff and head files):

Undeclared / not in the description:

#2 [high] Community/Process: review state of #332 — three rounds, third blocking item unaddressed

Reviews (all by yatesdr; single reviewer, no other engagement):

Status at head (verified in pr/332 files): no alignment filter present (reachability.rs:259 for (offset, bytes) in data.windows(8).enumerate()); the duplicated inactive lookup is present (reachability.rs:262-266); no straddle/aligned test in the test module (searched the added tests: boundary test uses 8-byte-aligned values only). The author has not pushed since 2026-11-20 04:34 (item updated 2026-11-20); open 7 days, last update 5 days, CI "no checks" on head. Note: I could not read the commit message body (only the subject "Report unresolved kernel argument addresses during export"), so item 4 is unverified.

#3 [high] Why: #266 is the driving defect; export-time detection was requested by its reporter

Issue #266 (open, P1, labels area:memory/packaging/preparation, bug, model:deepseek-v4.1, triage:investigate), by calvarado2004, opened 2026-11-11, updated 2026-11-13. Four DGX Spark GB10 (SM121) nodes, TP4, DeepSeek-V4.1-Flash-1017 at 7f534bb6: a package exported with --prefill-chunk-size 8192 Xid-31s on the first prefill8192 prompt; 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 export-side check that #332 implements was requested by the reporter in the second comment (2026-11-11 15:28) as "a second suggestion, independent of the Ignition change": record [floor,ceiling) values inside no recorded allocation (case 2) and inside inactive free blocks (case 1) 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. Their 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. The exact 8-byte-alignment suggestion the current review's blocking item asks for came originally from the reporter here.

Third comment (2026-11-11 16:12): with the local capture fix, 0 arguments point outside recorded allocations on all four ranks; previously failing prompts serve; long-prefill throughput +18%/+26%. Fourth comment (2026-11-13 18:39, original-el8): prioritized 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 to #266; the lifetime half is #331 (merged 2026-11-20). Note the export-time half is explicitly a diagnostic, not the fix — the reporter's own script produced exactly 10 hits, whereas the author's export prints 175k/170k occurrences / ~2.6k distinct addresses, i.e. about three orders of magnitude more noise than #266's checker saw.

#4 [high] Related work: main has moved under this PR — #431 and #507 rewrote the same reachability.rs areas

Branch point of #332 is f9aec99 (2026-11-17). Four main-branch commits since then touch its files (per orientation packet, verified via search_history on main):

Other related: #314 (open, schopde-nvidia) touches capture.rs (+9) for diffusion tensor execution — no overlap with reachability reporting. #517 (open, jcartu) is a different Xid-31 class (_checkpoint_pages / continuation rows) and explicitly says "#266 concerns a cuBLAS workspace failure at first graph selection, unlike this delayed MMU fault"; it does not use this diagnostic. #395 (open, mark-yong) is the CUDAGraph.reset workspace-lifetime sibling issue; unrelated to export scanning but part of the same author's #266 follow-up series.

#5 [high] Change: description vs code — what the diff does that the text omits

Verified at head c3cc87e, PR description vs code:

Covered by the description: gap candidates, inactive-range candidates, non-retention, non-failure, per-rank occurrence/distinct counts, up to ten distinct addresses with first graph/node/symbol/module/argument/offset, omitted-occurrence count, one address→first-site/count map, symbol resolution from the recorded function index, numeric exclusions unchanged, allocation-content scans unchanged (contents()/opaque_contents() pass None for misses, reachability.rs:367-380).

Not stated in the description:

  1. No 8-byte alignment filter. scan enumerates every byte offset (for (offset, bytes) in data.windows(8).enumerate(), reachability.rs:259). Consequence: each stale pointer is counted at up to 8 window positions and unaligned straddling windows (parts of two adjacent parameters) are reported as candidates. The author's own first printed example is one: "argument 0, offset 4, 0x100000000800" (PR comment 2026-11-19 21:02) — offset 4 of an argument, which cannot be a pointer field.
  2. "Occurrences" means byte-window hits, not call sites: unresolved_count() sums per-address occurrences (reachability.rs:190-195), so 175,329 occurrences / 2,646 distinct on rank 0 is a byte-window count, which makes the headline number hard to map onto "10 stale arguments" from #266.
  3. Output is raw eprintln! to stderr, not the progress/status system (capture.rs:3137-3141). It prints on every rank (each rank prints its own line, since capture_rank runs per rank; progress output is rank-0-only at capture.rs:2774). It runs before module/global capture, so a later export error still leaves the report on stderr and a clean exit prints nothing at all.
  4. Scope limit: candidates are only recorded for kernel-argument blobs (blob()), never for allocation contents or module globals (scan(..., None)), so a stale address embedded in non-kernel storage is not reported. The description says this indirectly ("kernel-argument values") but the limitation is not spelled out.
  5. Excluded by construction: values outside [lowest allocation, highest allocation end) are not candidates at all (scan's floor/ceiling test), so a stale pointer above the top recorded allocation is silently dropped. The description says "values outside the recorded envelope ... are not detected" in Limitations — consistent.
  6. Nothing is written into the core, the index, or a log artifact; nothing an operator can inspect after the fact. There is no strict/fail mode (the reporter's original suggestion offered "or fail the export with a list"; validate_allocations remains the only failure path).

Said but not done in the description: nothing found. The description is careful to downgrade its claims ("non-blocking diagnostic ... not proof that every graph argument has a live owner"; "These are counts across the entire graph scan, not counts attributed to W4A8 kernels").

#6 [high] Claims and evidence: what is verified, what rests on the author alone

Claims in #332 and what backs them:

CLAIM 1: "cargo test --locked --manifest-path heliopause/Cargo.toml --lib: 205 passed, 4 ignored." Evidence: reviewer independently ran CPU-only cargo test --manifest-path heliopause/Cargo.toml --lib at 499710e9 and at that head merged into main d8fd1431: "206 passed, 4 ignored, both" (review 2026-11-19 15:56). Note the count differs by one (205 vs 206) — main gained a test in between; consistent with rebasing. 205/4 is also the number #431 reports for main (heliopause lib, CPU-only), so the counts are plausible and mutually consistent. No CI runs on the head commit (orientation packet: "no checks"), and heliopause has no CI job at all (grep of .github/workflows: heliopause is never built or tested in CI — native-serving.yml covers eos/selene/selene-manager/helios/flare-cli/flare only). So the heliopause test result rests entirely on the author's and the reviewer's local runs. Verified by me: the 10 new tests exist (reachability.rs:733, 751, 773, 793, 810, 845, 873, 879, 903, 919) plus one renamed (929). They cover: gap candidate with site context; cap of examples with occurrence counting; offset counted from the argument start; one example per address across two graphs; symbol/module lookup from the function index (with a decoy function at index 1); bounded examples + hidden count; empty report; boundary values; inactive ranges reported while numeric ranges stay lenient; allocation contents tolerating gap candidates without reporting; freed-interval boundaries reporting without retaining. They use only 8-byte-aligned test values and never exercise an unaligned/straddling window, so the reviewer's blocking item has no failing test.

CLAIM 2: the SM120 two-GPU export of local-inference-lab/DeepSeek-V4-Flash-Vision-Exp-lossless-CSF completed with the diagnostic enabled; ranks 0/1 reported 175,329 / 170,544 occurrences and 2,646 / 2,637 distinct addresses; all ten examples per rank were b12x mHC Cutlass kernels, starting MHCPostPrePartialKernel in prefill4096 node 34 twice (module-13 on rank 0, module-6 on rank 1), argument 0, offset 4, addresses 0x100000000800 and 0x100000000900. Evidence: author's comment 2026-11-19 21:02 and the PR description table. The reviewer accepted the numbers ("Thanks for the export numbers; they answer the first item of the last round", 2026-11-20). Nothing independent: not reproduced by the reviewer, not by any third party. The addresses 0x100000000800 / 0x100000000900 are unaligned-offset artifacts and sit at the very start of the recorded envelope — that is, they are examples of the scan's byte-window noise, which is why the reviewer asked for the offset-4 case to be filtered. Gap the description admits: it does not reproduce #266's four-GPU DeepSeek V4.1 failure, cannot (author has three RTX PRO 6000), and no W4A8 MoE kernel appears among the printed examples, so the "W4A8 constants are noise" premise on which the non-failing design rests remains unverified by this PR.

CLAIM 3: "The recipe configures its MXFP4 experts with A8 activations (load_mxfp4_experts)". Verified only from the description; not checkable from this repository (recipes live in local-inference-lab/hyperflare-recipes per #431's description).

CLAIM 4 (implicit): "It does not retain the inactive allocation or turn these candidates into export failures." Verified in code: candidate() returns early for inactive without reference() (reachability.rs:131-145); nothing returns Err for a candidate.

CLAIM 5 (implicit): "Numeric exclusions and allocation-content scanning retain their existing behavior." Verified: blob() still subtracts merged numeric ranges before scanning (reachability.rs:152-165); contents()/opaque_contents() pass None misses and so report nothing (reachability.rs:367-380). One behavior change: blobs moved from HashSet to HashMap and is now used to memoize misses; identical argument bytes in a later graph replay the cached misses and increment the same address's occurrence count (test shared_argument_bytes_record_one_example_per_address at :793). So occurrence counts include repeats across graphs, which is intended but means the number is not "distinct call sites".

#11 [high] Research summary

Case file for PR #332 is complete: every angle in the brief was looked into and recorded on the scratchpad (10 entries, 5 of them high importance).

What it is. A +434/−30, two-file Heliopause change (reachability.rs, capture.rs) that turns the export reachability scan's silent dropping of address-shaped kernel-argument values into a per-rank stderr diagnostic: total occurrences and distinct addresses, up to ten distinct addresses with first graph/node/recorded-kernel symbol/module/argument/byte offset, and a hidden-occurrence count. Nothing is retained, nothing fails; it is the detection half of the response to #266 (the lifetime half is #331, merged 2026-11-20 by the same author).

Highest-value findings for a reader.

No sign of prompt injection or attempted instruction in the PR, issue, or review text. The one process irregularity is minor and already raised by the reviewer: earlier heads lacked the DCO Signed-off-by CONTRIBUTING.md:7-11 requires (fixed by round two).

#15 [high] Amendments: #332 rebased to 1ac7073d (2026-11-28) — alignment filter, docs, TODO added; description stale; granule item declined

PR #332 head moved c3cc87e -> 1ac7073d ("fix: report aligned unresolved kernel argument addresses during export", 2026-11-26, posted 2026-11-28 19:09) rebased onto nvidia/main c9935887. Scope now +599/−37 in 4 files: heliopause/src/export/reachability.rs (+579/−34), capture.rs (+6/−1), docs/runtime-core-design.md (+8/−2), docs/TODO.txt (+6/−0).

IMPLEMENTED (verified in pr/332 files):

STILL OPEN / NEW FINDINGS:

#17 [high] Research summary

Amendments recorded as scratchpad entries #15 (new facts at head 1ac7073d) and #16 (which previous notes they supersede).

Substance: the PR moved for the first time since 2026-11-20 — rebased onto main c9935887 as commit 1ac7073d, now +599/−37 across 4 files (reachability.rs, capture.rs, docs/runtime-core-design.md, docs/TODO.txt). My previous report's central finding — the blocking alignment item is unimplemented, so the report counts straddling byte windows — is now obsolete: scan filters the reporting push with (base + offset).is_multiple_of(8) while retention still scans every byte, candidate() is now the single live/inactive/gap rule, a straddling-window regression test exists, the summary/omitted-count wording is fixed, and the diagnostic is documented in runtime-core-design.md with a matching docs/TODO.txt follow-up entry. The #431 execution() overlap is also integrated, so "cannot be green against main" no longer holds.

What remains and is new: the PR description was not updated despite the author claiming it was (it still shows 205 passed/4 ignored and the superseded unaligned 175,329/2,646 and 170,544/2,637 counts against the comment's 221/5 and 22,618/762, 19,417/832), and it still cites load_mxfp4_experts, which no longer exists in this repository. The granule-trimmed inactive-range blocker was explicitly declined with a written rationale rather than fixed, and no non-granule-aligned test was added. Alignment cut noise by ~8x but leaves 762/832 distinct addresses — 76–83× #266's ten — with all twenty printed examples still numeric-looking CUTLASS constants, so the signal-to-noise concern stands in weaker form. Validation is still author-only on a two-GPU export, in debug mode, on a host without CUDA; the new testing hierarchy in docs/design-review.md:180-184 now names heliopause and cargo test --locked --release as mandatory, and no workflow covers the crate. The head has no human re-review; yatesdr's 2026-11-20 CHANGES_REQUESTED is the latest verdict and predates it.

#18 [high] Amendment: disposition table for the 2026-11-26 autobot review at 1ac7073d

Disposition of every item in flare-autobot's 2026-11-26 00:06 review at new head 1ac7073d (verified in pr/332 files unless noted):

BLOCKERS

  1. "Report counts byte windows, not argument values" -> FIXED. reachability.rs:294-303 filters reporting on (base + offset).is_multiple_of(8); loop still data.windows(8).enumerate() for retention, as instructed. Rerun counts posted (below).
  2. "Inactive ranges are raw while live intervals are granule-trimmed" -> DECLINED, not fixed. capture.rs:3164 still Reachability::new(&allocations, &request.numeric, &request.inactive, &roots). Author's stated reason: trimming inactive inward to granule boundaries (live_pieces, capture.rs:1259-1303, granule = allocation.alignment, applied capture.rs:1473-1486) would let a pointer into a freed sub-granule block inside a retained segment retain the segment and vanish from the report; instead the summary wording now names "gap or inactive range" (reachability.rs:236-246). No non-granule-aligned test added; the inactive test uses a 256-byte-aligned (0x3000,0x3100) range.
  3. "No regression test for the straddling window" -> FIXED. unaligned_straddling_window_is_not_reported_while_aligned_stale_pointer_is, reachability.rs:1046-1069 (straddle 0x1000_0000_0800 suppressed, aligned stale 0x1800_0000_0000 at offset 16 reported).

SHOULD FIX 4. "State the inactive rule once" (single Retained/Inactive/Unallocated classifier) -> PARTIALLY fixed: in_free_block is gone and candidate() returns bool (reachability.rs:153-170), but it is still a bool rather than a three-way classifier; autobot's warning that deleting the second lookup alone would silently stop inactive reporting was heeded (inactive now returns Ok(false) from candidate, so scan's single lookup drives both). 5. "Fix the printed summary line and the hidden-count units" -> FIXED (wording at :236-246; hidden line only when >10 distinct at :264-279 with exact distinct-address and occurrence sums; four tests at :877-993). 6. "Scope the posted evidence, repair one sentence, reconcile the commit message" -> PARTIALLY: commit + 2026-11-28 comment are reconciled (aligned counts, no W4A8 claim); the PR DESCRIPTION is still the old text (read_item shows 205 passed/4 ignored, 175,329/2,646 and 170,544/2,637, and the "no W4A8 MoE kernel" sentence, which cites load_mxfp4_experts — no longer present in this repo; ignition/components/ has no match, recipes moved to local-inference-lab/hyperflare-recipes). 7. "Document the new per-rank stderr line + add pending 4-GPU/W4A8 verification to docs/TODO.txt" -> FIXED. docs/runtime-core-design.md:151-157 and :336-341; docs/TODO.txt:350-354. 8. "8 nits" -> not individually re-checked; the nit list itself was not enumerated in the review text, so no disposition can be given.

ALIGNED RERUN (author, 2026-11-28): rank 0 22,618 occurrences / 762 distinct (752 / 14,776 omitted); rank 1 19,417 / 832 (822 / 13,614). Was 175,329/2,646 and 170,544/2,637 unaligned. All 20 printed examples are b12x CUTLASS MHCFinalizeGramKernel / MHCPostPrePrefillGramKernel / DenseGemmKernel; values such as 0x7cb800000004 (1286x), 0xfff00000fff (1395x), 0x3fff000003ff (860x), 0x100000001000 (4x) are repeated-half numeric constants, not cuBLASLt splitKreduce addresses. Run: 2x RTX PRO 6000 Blackwell Max-Q, DeepSeek-V4-Flash-Vision-Exp-lossless-CSF 45fd9976, driver 615.71.09, torch 2.14.1+cu132, FlashInfer 0.7.3 5d2a7107, hyperflare-recipes d1376bb, --gpus 0,1 --max-concurrency 1 --image-concurrency 1 --no-mtp --prefill-chunk-size 4096 --autotune-effort off --compile-workers 4. Not TP4, not four GPUs, not the #266 recipe.

#7 [medium] People: mark-yong's #266 series; yatesdr the only reviewer; Luke Alonso / original-el8 own this file

mark-yong (GitHub association CONTRIBUTOR; Discord myong_acct, stated in #332's description and #395's). History (last 180 days per orientation packet: 9 merged, 18 closed, 3 open). Recent merged work: #331 "Isolate cuBLAS warmup workspaces from CUDA graph capture" (merged 2026-11-20, Refs #266, 9 files, +322/-8 in ignition/preparation/capture.py and tests) — the lifetime fix for the same issue #332 references; #185 (Ignore unreferenced Inductor kernels in static launcher bundles), #179, #170, #102, #94, #83, #67. Areas their merged PRs touched: helios/src (7), docs (5), tests/preparation (3), ignition/preparation (2), helios (1). Open: #395 (CUDAGraph.reset frees the shared workspace), #332 (this PR), and one more. Pattern: the author works the #266 family — #331 closes the capture-side cause, #395 records a residual lifetime constraint, #332 adds the export-side diagnostic. Across GitHub commits on main they are an infrequent committer (8 commits found by search_history text "Mark Yong", latest 9d1e0137 2026-11-11), i.e. essentially all of this author's recent code is the #266/#331/#332 series.

Who usually works in heliopause/src: per orientation packet, last 180 days commits — Luke Alonso (55), Martin Vit (10), Jason Cook (5). yatesdr is the reviewer here and also a main-branch committer (recently #504, plus many PR merges); yatesdr is not in the heliopause/src top-3 list but did the deep line-level review. Luke Alonso (lukealonso, COLLABORATOR) owns the export/reachability design (commits: "Move runtime package export and publication into Heliopause" 14a6a273, "Restore reachability pruning" etc.) and is the project owner named in AGENTS.md priority-contributor list. Jason Cook (original-el8) wrote #431 which added Reachability::execution to the same file.

Who has engaged on #332: only yatesdr (3 review rounds, all CHANGES_REQUESTED->now still CHANGES_REQUESTED) and the author. No other reviewer, no third-party validation, no reaction/emoji, and — unlike #314, #498, #526 where flare-autobot opens a case file and posts an Autobot review — no Autobot review or case file appears on #332 (its last update 2026-11-20 predates the autobot rollout visible on PRs from 2026-11-24/25). calvarado2004 (the reporter of #266 who requested this exact check) has not commented on #332.

#8 [medium] Process: ready-for-review but CHANGES_REQUESTED with 4 open items; no CI covers heliopause

Process facts:

#9 [medium] Project fit: charter demands evidence and TODO tracking; runtime-core-design.md documents the scan being added to

Charter (read_charter) relevant lines:

#10 [medium] Reach: export-time stderr only; no format/ABI/config/docs surface changes

Who/what is affected:

#12 [medium] Recent activity: heliopause/src moved four times under this PR, all after its last push

Branch point f9aec99 (2026-11-17, Luke Alonso "Keep one tuning compiler worker below estimated RAM allowance"). The author's last push (c3cc87e) is 2026-11-20; every main-branch commit that touched its files landed after that:

  1. 040f39ff 2026-11-24 PCCessna — #498 "Flush PCIe D2H tails before export completion in Heliopause" (+259/-16 in capture.rs). Rewrote the Downloader/module-global/weight download paths that begin at capture.rs:3142, immediately after #332's new print block (3137-3141). Line drift and a semantic neighbour (both add stderr/error detail to the same export phase), but no logical conflict.
  2. 052fbdf5 2026-11-24 Jason Cook (original-el8) — #431 "Heliopause and Ignition PersistentWorker export binding and reachability" (+113 reachability.rs, +1/-9 capture.rs). Adds Reachability::execution(), whose two tests sit in the same mod tests block #332 extends, and deletes the inline execution-buffer loop (#332 still has it at capture.rs:3075-3086). This is a real merge conflict plus a semantic one: #332's rewritten blob/scan/graph signatures must be reconciled with a fifth caller shape. Verified: pr/332 head has no execution method at all, so the branch cannot be green-shaped against current main.
  3. f646bebc 2026-11-24 Luke Alonso — #507 (+5 reachability.rs, worker.metrics retention).
  4. 716df00f 2026-11-25 yatesdr — #504 "selene, selene-manager, helios, ignition, heliopause: add pure-CUDA GPU and CPU lossless KV compression" (capture.rs touched). Direction of fit: #332 builds on the file's existing design (reachability pruning, typed numeric spans) and reverses nothing; it is additive reporting. The tension is sequencing, not intent: it was authored against a file that has since been refactored twice by original-el8 and lukealonso, and its reviewer's merge test predates those commits. Also relevant historically: 3919c1db (2026-11-11, Luke Alonso) "Retain CUDA graph resources throughout core export" and b455be5e/0f0b7626 (2026-11-09) restructured native export, i.e. lukealonso has repeatedly owned this exact code path — a reader should expect his review to matter here even though he has not commented on #332.

#13 [medium] Community: one reviewer, three rounds, no third-party interest on #332

Discussion on #332 has exactly four entries: three reviews by yatesdr (2026-11-18 22:40, 2026-11-19 15:56, 2026-11-20 04:34 — all CHANGES_REQUESTED) and one author reply (2026-11-19 21:02) carrying the export numbers. No approvals, no reactions, no inline comments shown as separate threads beyond the review bodies, no autobot case file or autobot review (unlike #314, #498, #524/#525/#526, where flare-autobot opened a case file and posted a review — those all date from 2026-11-24/25, after #332's last update). Notably silent: calvarado2004, the reporter of #266 who asked for exactly this export-time check and wrote their own scanner ("We can share the script if it is useful", #266 comment 2026-11-11 15:28) — they have not commented on #332, so the one person who could confirm the diagnostic catches the 10 known arguments has not. original-el8 prioritized #266 P1 and specified "export-time detection where pointer provenance can be established without misclassifying numeric kernel parameters" (2026-11-13) but has not reviewed. FujitsuPolycom, who independently validated #331 with a four-GB10 DeepSeek V4.1 export and its own pointer scan (86d679d5/#331 comment 2026-11-19 04:57: "864 unaligned byte-window matches and one aligned match per rank in a CUTLASS parameter of the vision1152 graph"), is the natural third-party validator for #332 and has not appeared here — that comment is the closest existing evidence about noise magnitudes on a real export other than the author's. Interest level: low-to-moderate. The sibling #331 drew 12 discussion entries, three reviewers and an independent GB10 validation; #332 drew 4 entries and one reviewer, and stalled 5 days after the last round.

#16 [medium] Amendment map: which previous notes are superseded

Checklist of prior notes now needing amendment (report of 2026-11-25, run 918, scratchpad #14):