Final review report · NVIDIA/hyperflare-inference #332

Raw Markdown for agents: https://autobot.eidonix.com/p/1b9e2fdb-0119-4498-a206-581487a7ca71.md

Recommendation: Changes Requested

The core implementation at 1ac7073d is sound—retention semantics are preserved, inactive ranges and gaps share one clean predicate in Reachability::candidate, and the 8-byte argument-relative alignment filter cuts the 2-GPU export diagnostic noise by ~8× without missing #266's aligned split-K arguments. However, the GitHub PR description still presents the superseded pre-alignment c3cc87ea numbers and an example the shipped code can no longer emit, and two small targeted improvements (per-kernel example grouping and a non-8-byte-aligned base test) should land before merge.


Blockers

  1. PR description posts superseded c3cc87ea measurements and omits the alignment restriction.
    • Evidence: The current PR body still reports the pre-alignment run from c3cc87ea: rank 0 175,329 / 2,646, rank 1 170,544 / 2,637, first example MHCPostPrePartialKernel in prefill4096 node 34 (which was an offset-4 straddling window, 0x100000000800), and cargo test ...: 205 passed, 4 ignored. At head 1ac7073d, heliopause/src/export/reachability.rs:300 filters reporting with (base + offset).is_multiple_of(8), which cannot emit an offset-4 window and produced the aligned rerun posted in the 2026-11-28 comment (22,618 / 762 on rank 0, 19,417 / 832 on rank 1, starting at node 35; 221 passed, 0 failed, 5 CUDA tests ignored).
    • Additionally, ## Change omits the argument-relative 8-byte alignment filter (documented in docs/runtime-core-design.md:154-157) and still describes the old omitted-occurrences-only trailing line instead of omitted distinct addresses plus omitted occurrences, and ## Limitations does not mention that unaligned unresolved values are not reported.
    • Comment item 7 on 2026-11-28 notes that the description was reconciled to 1ac7073d, so the edit to the GitHub PR body appears not to have been applied. Update the PR description to match 1ac7073d per AGENTS.md:88-112 and the charter's PR description standard.

Should Fix

  1. Deduplicate printed examples by kernel symbol so repeat constants from early kernels do not fill all ten slots (heliopause/src/export/reachability.rs:247-263).

    • unresolved_report currently sorts by entry.order and takes the first UNRESOLVED_EXAMPLES (10) distinct addresses across all kernels.
    • In the 2026-11-28 verbatim stderr output, 7 of the 10 printed lines on rank 1 come from just two DenseGemmKernel symbols at nodes 40 and 44 (3 from node 40, 4 from node 44), and all 10 slots on both ranks come from 5 symbols in nodes 35–74, hiding 752–822 distinct addresses (13,614–14,776 occurrences).
    • Because entry.first.function and functions are already available in unresolved_report, taking at most one example per kernel symbol (as offered in the 2026-11-28 comment) is a local change that doubles symbol visibility without altering retention or counts.
  2. Test (base + offset).is_multiple_of(8) with a non-8-byte-aligned base (heliopause/src/export/reachability.rs:184-189, :300).

    • Every existing test with a scanned span after numeric exclusion has base % 8 == 0: unaligned_straddling_window_is_not_reported_while_aligned_stale_pointer_is (:1046-1069) uses numeric = vec![] (base = 0), and kernel_argument_candidate_offset_counts_from_the_argument_start (:805-822) uses numeric = vec![(0, 8)] (base = 8).
    • Replacing (base + offset).is_multiple_of(8) at :300 with offset.is_multiple_of(8) still passes all 26 tests, even though a 4-byte numeric prefix (0, 4) shifts slice offsets by 4 bytes relative to the argument start.
    • Add one CPU test with a 4-byte numeric span (0, 4), 4 bytes of padding forming a straddling address-shaped window at argument offset 4 (slice offset 0), and a stale pointer at argument offset 8 (slice offset 4), asserting that offset 4 is excluded and offset 8 is reported with offset == 8.

Subtract / Simplify

  1. Eliminate both misses.clone() allocations in Reachability::blob (heliopause/src/export/reachability.rs:172-212).
    • blob() clones the cached Vec<(usize, u64)> on every cache hit (:175) and clones it again when inserting on a miss (:191) solely to avoid holding an immutable borrow on self.blobs while mutating self.unresolved.
    • Splitting the borrow via a small helper (e.g., record_unresolved(&mut self.unresolved, misses, site)) lets the hit path borrow &misses directly and the miss path move misses into self.blobs.insert(key, misses) with zero vector clones on the repeated-argument hot path.

Nits

  1. Redundant emptiness guard in heliopause/src/export/capture.rs:3219-3223: reach.unresolved_report(...) already returns an empty Vec when self.unresolved_count() == 0 (reachability.rs:232-235), so the if reach.unresolved_count() > 0 wrapper can be dropped.
  2. Stale test name in heliopause/src/export/reachability.rs:782-802: unresolved_examples_are_capped_while_occurrences_are_counted inserts 12 distinct addresses and checks self.unresolved entries/order without ever calling unresolved_report (capping is tested by unresolved_report_bounds_examples_and_counts_hidden_occurrences at :877-905). Rename it to match what it verifies.

Verified passes


Dropped on verification