Pre test report report · NVIDIA/hyperflare-inference #332

Raw Markdown for agents: https://autobot.eidonix.com/p/5ed28d21-fa97-442b-833d-2333f68c1b0d.md

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

Author: mark-yong (CONTRIBUTOR) · Branch: fix/reject-unrecorded-graph-args → main · Head: c3cc87e (unchanged since 2026-11-20) · Size: 2 files, +434/−30 (heliopause/src/export/reachability.rs +428/−29, heliopause/src/export/capture.rs +6/−1) · Refs: #266 (open), #331 (merged)

Recommendation: DO NOT REFER TO HARDWARE TEST

Send back to the author. Three pre-test blockers, none of which a test engineer can resolve, and every one of which invalidates the measurements a hardware run would produce:

  1. The maintainer's blocking item is unimplemented at head. yatesdr's 2026-11-20 review closed with "One change before this can merge": report only argument-relative offsets divisible by 8, then repost the counts from the same export. heliopause/src/export/reachability.rs:259 still reads for (offset, bytes) in data.windows(8).enumerate() with no % 8 filter anywhere in the file. The PR's own headline example (argument 0, offset 4: 0x100000000800) is exactly the straddling window the maintainer said cannot be a pointer. Status is still CHANGES_REQUESTED after three rounds.
  2. Two user-visible outputs are wrong and must be rewritten (details below): the summary line misstates which values it reports, and the "N more occurrences not shown" line prints a number that is not omitted occurrences.
  3. The branch will not merge cleanly, and the conflicts are in the code under test. main now has Reachability::execution() (main:heliopause/src/export/reachability.rs:87) and graph(&mut self, nodes, kernels); this branch has graph(&mut self, name, nodes, kernels) and still inlines the execution-buffer reference loop at capture.rs:3075-3086 where main calls reach.execution(&execution) (main:heliopause/src/export/capture.rs:3159). Merged #431/#507/#498 rewrote precisely these functions. Rebasing changes the exact lines any test would exercise.

Expected value of a hardware test right now: near zero. Even with the blockers fixed, hardware cannot settle the two questions this PR exists to answer (see "Why hardware cannot settle this" — the decisive measurement was already taken on GB10 hardware by a third party, and #266's reproducer is unrunnable on the available fleet).

Cost avoided: the author's export takes ~73 minutes (#266, 2026-11-11 comment) and produces ~170k-report-per-rank runs; re-running it twice (before/after an alignment fix that will land) is pure waste.


What the change does

A non-blocking, always-on diagnostic in the Heliopause export scan. pointer() becomes candidate() (reachability.rs:131-145) returning whether a value resolved to a live allocation; scan (:248-274) optionally collects address-shaped values that fall in gaps between recorded allocations or in inactive parts of recorded segments; blob (:147-188) charges each miss to an address→entry map keeping first site (graph, node, function index, argument, offset), an insertion order, and an occurrence count; unresolved_report (:205-246) renders a summary line, ≤10 examples, and a hidden-count line; capture_rank prints them per rank via eprintln! (capture.rs:3137-3141). No wire, core-format, CLI, env-var or recipe surface is added; nothing is persisted; retention behaviour is unchanged.

Verified sound — do not ask the author to change these

Blocking issues (must be fixed before any hardware time is spent)

B1. No 8-byte alignment filter — the report cannot pick out a stale pointer (reachability.rs:259)

scan slides an 8-byte window one byte at a time, so a value spanning two CUDA parameters is recorded as a candidate at a half-pointer offset. The measured consequence is in the PR itself: 175,329 occurrences / 2,646 distinct addresses on rank 0 and 170,544 / 2,637 on rank 1 on an export that completed normally, all ten printed examples per rank being b12x mHC Cutlass MHCPostPrePartialKernel at offset 4, with the author stating they "do not establish … whether the mHC values are constants or stale pointers."

Why this blocks testing rather than merely needing polish: with ~2.6k distinct candidates ahead of them in first-seen order, #266's real stale arguments (offset 256 of a 384-byte parameter; offset 0 of argument 1 — both aligned, so an alignment fix preserves them) would be buried in the … N more occurrences not shown line. The artifact that would merge is a permanent diagnostic whose only consumer is an operator reading rank-wide stderr; a diagnostic that trains operators to scroll past it is worse than none.

Fix: report only when (base + offset) % 8 == 0, leaving retention and the inactive/gap classification unchanged. Then rerun the export and post before/after distinct-address counts per rank. The maintainer also offered: if thousands remain, one example per kernel symbol.

B2. The summary line misstates what is reported (reachability.rs:211-214)

The shipped string says candidates "fall inside the recorded address envelope but outside every live recorded allocation". But scan:266 pushes when !self.candidate(pointer)? || in_free_block, so a value in the free block of a segment that is a recorded allocation is reported too — which is why the duplicate in_free_block term exists at all. The PR description states the correct rule ("gaps between recorded allocations and in inactive parts of recorded segments"); the string an operator actually reads does not. The UnresolvedCandidate doc comment (:45-46) has the same defect in miniature ("resolves to no live recorded allocation, including a value in an inactive range" — an inactive range is inside a recorded allocation).

B3. "… N more occurrences not shown" prints a number it does not compute (reachability.rs:238)

let hidden = occurrences - examples.len().min(UNRESOLVED_EXAMPLES);

occurrences is a sum of per-address occurrence counts; examples.len() is a count of distinct addresses. The subtraction mixes units. The PR's own test pins the wrong number: :869 asserts " … 14 more occurrences not shown" where each of the 10 printed examples has occurrences == 2, so 20 of 24 occurrences are shown and only 4 are unshown. At scale (2,646 distinct / 175,329 occurrences) the line reads "175,319 more occurrences not shown" when what is actually omitted is 2,636 distinct addresses. Fix: sum the occurrences of examples actually printed, or print omitted distinct addresses and say so.

B4. A second, independent false-positive source: raw inactive ranges vs granule-trimmed live intervals (correctness, verified)

Reachability::new takes raw request.inactive (capture.rs:3074, stored at reachability.rs:107), but allocations were already rebuilt by live_pieces (capture.rs:1410-1423), which rounds each hole inward to allocation.alignment (capture.rs:1211-1212). The retained live piece therefore still covers [raw_start, aligned_start) and [aligned_stop, raw_stop). A kernel-argument value sitting in that edge is inside a live recorded allocation, but candidate checks the raw inactive list first (:131-135) and returns early, and scan recomputes in_free_block from the same raw list (:262-265), so it is reported with the false claim that no live allocation covers it. Granule is MiB-class (cuMemGetAllocationGranularity), so each hole can contribute up to a granule of live-but-reported addresses per side, for every graph argument.

No existing test reaches this: every test uses granule-aligned holes — :908 (hole 0x3000..0x3100), :943 (hole 1024..3072 in a 4096-byte allocation), and capture.rs:4545 (holes 0x1080/0x1380 with granule 0x100). A non-granule-aligned hole test is missing.

B5. The duplicated lifetime rule (reachability.rs:131-135 vs :262-266) — the maintainer's open item 2

candidate already treats an inactive range as a hit, and scan repeats the identical partition_point as in_free_block. Since candidate cannot mutate inactive, !candidate(pointer)? || in_free_block always equals !candidate(pointer)? — the second copy changes no result, yet it is paid on every 8-byte window of every argument and every byte of every scanned allocation segment (the misses: None path at :370-378 pays it too, because the predicate is evaluated before the && let short-circuit). It is also the mechanism that produced B4: two copies of one lifetime rule that already disagree.

Caution for whoever fixes it: deleting in_free_block alone and keeping !self.candidate(...) would silently stop reporting inactive-range values, because candidate returns true for them and does not record them. The fix must return a classification (Live/Inactive/Gap), and B4 should be fixed in the same edit by deriving candidacy from the same geometry as self.intervals. Test :902-916 pins the reporting half and must keep passing.

B6. Missing tests the maintainer asked for (reachability.rs:248-274, capture.rs:3137-3141)

Should-fix and nits (not test gates, but they will move the output)

Semantic caution for any future test: "occurrences" is not a severity figure

blob caches the miss list keyed by (data, numeric) and replays it for every site sharing those bytes (:147-188). So an "occurrence" is (misses in one unique blob) × (number of nodes/arguments with identical bytes) — rank 0's 175,329 occurrences over 2,646 addresses is ~66 replays per distinct address. Anyone reading the counts as "how many bad arguments" would be misled by an order of magnitude. Any future test must assert distinct-address counts, never occurrence counts. Similarly, examples are chosen in first-seen order with no ranking by rarity, so a rare true positive is structurally invisible behind thousands of benign constants; a regression test should assert a rare candidate is reachable in the output (e.g. per-symbol grouping), not merely that ten lines print.

Why hardware cannot settle this PR's questions — and what is already measured

Question Can our hardware answer it? Status
Do aligned-only candidates separate signal from noise? No Already answered on GB10 hardware. FujitsuPolycom's independent 4×GB10 TP4 export posted in #331 (2026-11-19 04:57): "864 unaligned byte-window matches and one aligned match per rank." ~863 of 864 candidates are the exact artifact B1 removes. That is the before/after the maintainer wanted, from a third party, on hardware equivalent to ours.
Does the diagnostic catch #266's real stale pointers? No #266's reproducer is deepseek-ai/DeepSeek-V4.1-Flash-1017 at TP4 on 4× GB10. cn7 has 1× GB10 — cannot form TP4. cn5 has 4× RTX PRO 6000 but none of its models is DeepSeek-V4.1, and no archived known-bad package exists.
False-positive volume on a 4×RTX PRO 6000 export Technically yes (GLM-5.3 or Qwen3.8 export on cn5) Not comparable to the author's Vision-Exp numbers, so it would not answer the maintainer's "post the counts from the same export again."
Does an export still complete with the diagnostic enabled? Yes, but pointless The author already ran a full SM120 two-GPU export that completed. The code path will change again (B1/B4/B5).

Two further resource facts: an export runs ~73 minutes (#266) and a job on cn5 gets only 16 GiB scratch — GLM-5.3-Flash NVFP4/DeepSeek-class exports are large. Spending that on a branch that will be rewritten is a poor trade.

Testability note: the PR is CPU-testable today. Everything except the capture.rs:3137-3141 print site runs without a GPU or a model (cargo test --manifest-path heliopause/Cargo.toml (not opened) --lib, which the author reports as 205 passed / 4 ignored, and the maintainer independently reproduced at an earlier head as 206 passed / 4 ignored). Note heliopause is not in CI at all — .github/workflows/native-serving.yml (not opened) covers eos, selene, selene-manager, helios, flare-cli and flare only — so the suite is author/maintainer-run by hand. That is a real gap, but it argues for adding heliopause to CI, not for buying a GPU.

What to tell the author (minimal path back to a test)

  1. Filter reporting to (base + offset) % 8 == 0; keep retention and the gap/inactive classification untouched (B1).
  2. Fix the summary string and the UnresolvedCandidate doc to name both conditions — gap between live allocations, or inactive range inside a recorded segment (B2).
  3. Fix the hidden-count line to subtract printed occurrences, or print omitted distinct addresses (B3).
  4. Replace the duplicated inactive lookup with one classifier (Live/Inactive/Gap), and derive candidacy from the same granule-trimmed geometry as self.intervals, so the granule-edge false positives go away with the same edit (B4+B5). Add the unaligned-hole boundary test.
  5. Add the straddling-window test the maintainer specified, fixing the existing :783-799 expectation that encodes unaligned reporting (B6); add a two-kernel symbol-mapping test for the print path.
  6. Rebase onto main (#431/#507/#498) and show the branch builds and the heliopause suite passes — including a conflict-free capture.rs around reach.execution().
  7. Rerun the same Vision-Exp export and post before/after distinct-address counts per rank, plus (if thousands remain) one example per kernel symbol — the maintainer's own fallback offer.
  8. Add the docs/runtime-core-design.md:310-313 sentence and the docs/TODO.txt entry for the unrun four-GPU/W4A8 verification.

Deferred test plan — for the next round only, NOT authorized now

If the above lands and the maintainer lifts CHANGES_REQUESTED, a single-purpose test should validate the diagnostic's specificity, since that is the only thing hardware adds. I would keep it to one job:

That is at most one cn5 job (~2 GPU-hours) and it should only be authorized after the code stops moving.

Security / integrity check

I read the PR description, all five discussion entries, and #266 in full. Nothing instruction-shaped: no prompt injection, no requests to alter tooling/CI/review process, no data-exfiltration instructions. #266 contains a genuine torch._C._cuda_clearCublasWorkspaces() suggestion aimed at the capture path (fixed by #331), and an offer to "share the script" — informational only. Discord: myong_acct is ordinary author attribution. This matches the intake screen's all-clear. The author's Limitations section is candid about what was not run, which is to their credit and is reflected above rather than treated as a defect.