Explore scratchpad · NVIDIA/hyperflare-inference #674

Raw Markdown for agents: https://autobot.eidonix.com/p/8705daa7-ce55-4f18-a3fe-dd0dfb54c541.md

#1 [high] Related work: #451 (open issue) is the direct antecedent, and the PR partly reverses the author's earlier reply

#451 "Snapshot aliasing admits only the largest cache plane, so a snapshot excludes ~3.16x its own page cost", opened by shieldstar 2026-11-21 18:38, open, labels area:caching, area:memory, updated 2026-11-21 18:54.

#2 [high] The change: scale, file map, and the GPU snapshot-alias (helios runtime_core) rewrite

File-level facts for PR #674 (head 7d7dcdc, base main, opened & last updated 2026-12-02, 40 files +11210/-704, no labels, no reviews, CI passed, no comments at all as of my read).

Biggest files:

Verified behaviours from the diffs (declared in docs too):

  1. selene/src/runtime_core? no — helios/src/runtime_core/cache_memory.rs: alias_plane gains largest_count param and a third admission arm largest == 2*unit && row.div_ceil(largest_count*alignment) >= 2 (half-width planes). Layout::new now orders eligible chunks by descending logical-page interval midpoint (planned.sort_unstable_by_key on Reverse(midpoint), Reverse(page_end), Reverse(unit_bytes), plane, Reverse(offset)) instead of the old for group_id ... for plane nested loop. New #[cfg(test)] helpers row_conflicts and verify_physical_invariants.
  2. plan_mapping_handles rewritten: prefix packing per rank first (early return when under limit), then a symmetric exponential probe (hi *= 2) + binary search over the granule multiple so all ranks use the same granule count (previously the loop stopped mid-rank and could leave asymmetric layouts). Now returns Ok(total) early when total < limit. Uses Layout::clone (Layout derives Clone now).
  3. helios/src/scheduler/cache_memory.rs: new unique_snapshot_backing_pages, victim_released_pages, page_pressure_victim_priority (tuple (released == 0, use_epoch, !role_preserving_compaction)) and evict_for_pressure(need_pages, need_snapshots, backing_pressure); ensure_resources/allocate paths choose pressure-aware victim selection only when page_pressure; fall back to eviction_candidate_within_budget otherwise. Uses eviction_candidate_with_priority (new in helios/src/cache.rs).
  4. docs/runtime-core-design.md documents the new plane eligibility/midpoint ordering and the pressure-aware victim ordering (releases >=1 page > overlapping rows that release none; completion recency; role-preserving compactions with all KV retained in heir).

Citation: pr_files / pr_diff outputs; docs/runtime-core-design.md diff hunk at ~line 845.

#3 [high] Related work: #665 (open) conflicts with #674 on helios/src/cache.rs victim ordering

#665 (open PR, FujitsuPolycom, opened 2026-12-01, head c5b39236 rebased onto main 1fbcc3c9, +889/-60) "helios: add scan-resistant dual-turnover prefix cache eviction". Files: helios/src/cache.rs (+138/-22), helios/src/cache/tests.rs (+319), helios/src/cache/lifecycle_tests.rs, helios/src/scheduler.rs (+32/-13), helios/src/scheduler/{tests,policy_tests}.rs, docs/core-design.md, docs/scheduling-runtime-design.md, docs/prefix-cache-offload.md, helios/README.md.

Overlap with #674 (both rebased on 1fbcc3c9, both open, same author area):

Relevance: two independent, concurrent efforts to change Helios eviction victim ordering, both landing on the same code; the reviewer must decide ordering/merge sequence. Neither references the other.

#4 [high] Related work: file-level neighbours of the rewritten helios/selene files

From items_touching on the two most contended files:

helios/src/runtime_core/cache_memory.rs (the file #674 rewrites alias_plane, Layout::new, plan_mapping_handles in):

selene/src/disk_store.rs: #674 is the newest; recent merged predecessors by the same author: #609, #610, #429, #415, #413, #337, #358, #355, #343, #336, #168, #142, #141, #155, #92; plus #496 and #497 and #523/#524 (FujitsuPolycom and yatesdr). So #674 continues an unbroken single-author line of selene disk-store work, overlapping #496/#497's direct-I/O and record-open changes.

Cite: items_touching(helios/src/runtime_core/cache_memory.rs) and items_touching(selene/src/disk_store.rs).

#5 [high] The change: things the diff does that the description does not say

Things the diff does that the PR description does NOT mention (verified in the diffs):

  1. Stale pool-lookup ticket refresh, once per admission episode (helios/src/server/runtime.rs: new Incoming::pool_lookup_reissued, begin_pool_lookup returns bool plan_refreshed, drops and re-issues the ticket when ticket_resident > plan.resident_tokens(), and resets pool_lookup_started/pool_lookup_reissued on readmission/eviction/rejection paths). Documented in docs/prefix-cache-offload.md ("cancels the stale ticket and refreshes it at most once per admission episode (falling back to local lookup on a further shrink)") but absent from the PR description's "What".
  2. Prefill-rate EMA measurement changed, not only bypassed (helios/src/server/runtime.rs:2790-2800 and observe_prefill_rate): prefill start tracking is now restricted to step.kind.is_prefill() && lanes.len() == 1 && tokens*2 >= capacity, and the elapsed time prefers scheduler::observed_duration_ns(timing) (execution timing) over wall clock. The description says restores are priced "instead of wall-clock prefill EMA"; in fact the EMA is retained as the cold fallback (estimated_prefill_saved_seconds falls back to gained / fallback_prefill_rate only when graph costs are unmeasured) and its measurement changed.
  3. AdmissionPlan is now Clone and gets refresh_admission_plan_in_place (helios/src/scheduler.rs, helios/src/server/runtime.rs): admit_with_host_store gains plan_refreshed so the queued plan is reused instead of cloned+re-planned. Efficiency change, undeclared.
  4. ensure_resources gains backing_conflict (helios/src/scheduler.rs:1258-1281): backing_conflict = snapshot_unavailable && !free_snapshots.is_empty(), passed as backing_pressure to evict_for_pressure. Undeclared in the description.
  5. New store-outcome semantics in selene/src/composite.rs: store() now turns reserve_capture(...) == Ok(None) into an error ("host record cannot be indexed while reclamation or another write is pending"), adds disk.has_pending_reclaim(key) to the spill gate, and adds a new Retry(StoreReason::Slabs) path when !covered && needed > 0 && short > 0; start_read now pre-checks fits/shortfall and spills parked records instead of evicting durable clean L1 records. Not described.
  6. New startup failure mode (selene/src/offload.rs:708-716): when the warm memory budget rounds to a zero-byte slab (bytes == 0) startup now errors with "prefix cache memory of N bytes is smaller than one P-page record"; docs mention it, description does not.
  7. Internal rank-protocol extension: selene/src/shard.rs adds Kind::StoreInvalidated = 4 to the rank↔rank TCP event enum and coalesces it onto the pending Stored job (invalidated flag). Not Protobuf, but it is an on-the-wire enum value, so mixed-version rank processes would not interoperate (Kind::decode errors on unknown codes).
  8. A new CPU-only fixture test module helios/src/runtime_core/memory/codec_layout_tests.rs (+338, new file) loads the repo's existing tests/fixtures/codec_geometry/*.pb exports (glm53-tp4-mtp5, deepseek41, qwen38-tp1/tp2) and pins per-geometry expectations, e.g. deepseek41 @2 MiB: expected_eligible: 4 planes (vs 1 before), expected_slots: 4_753, max alias span 172, post-plan handles < RM_HANDLE_RANGE, and a dense-production assertion "old 1-plane layout excluded 131,413 pages; midpoint-aligned 4-plane layout excludes <= 53,000 pages" (codec_layout_tests.rs:190-465). This is the CPU-side evidence behind the GPU capacity claim and is not mentioned in the description.
  9. selene-manager/tests/client.rs (+160/-22) rewrites several integration tests to assert retirement_paths >= 1 + memory_records == 3 instead of memory_records == 0, and adds pass_through_instance() for pool-only capture — i.e. existing test expectations had to change because L1 now retains clean records. Undeclared but a direct consequence of the L1-retention change.

Citations: pr_diff outputs for helios/src/server/runtime.rs, helios/src/scheduler.rs, selene/src/composite.rs, selene/src/offload.rs, selene/src/shard.rs, helios/src/runtime_core/memory/codec_layout_tests.rs, selene-manager/tests/client.rs; docs/prefix-cache-offload.md diff.

#6 [high] Claims and evidence: benchmarks are against 5d53040e while the base is 1fbcc3c9; unit-test anchors exist for the packing change

Claims in the PR body vs what backs them.

Backed by artefacts in the diff:

Not backed in-repo (live-run numbers only): every A/B table (A–F), throughput (370.5 → 1,054.8 MB/s), post-restart hit tokens 66.56% → 83.23%, latency deltas, the 284-request fault-injection matrix, the cross-node aarch64 TCP run, and the "5.1× faster than cold prefill" O_DIRECT read. No logs, scripts, or CI job are referenced; the numbers rest on the author's own runs on SM120 4× RTX PRO 6000 and cn8.

Evidence caveats that matter to a reviewer:

  1. Baseline is not the base. Every A/B is against 5d53040e, but the PR's base is main at 1fbcc3c9 (after #628, #663, #656, #638, #666, #657, #667). The description says the branch was "re-verified on rebased HEAD 7d7dcdcb atop 1fbcc3c9", i.e. only compile/tests were re-verified after rebase, not the benchmarks. Main-branch commits inside the gap include helios peer-copy/offload work (#628) and Orbit/multi-host peer exports (#667), both in the surface this PR benchmarks.
  2. Charter (#210) wants an actual speedup over main on a served workload. The A/B is over 5d53040e, not over main's tip.
  3. Hardware scope: all measurements are SM120 (RTX PRO 6000) with one aarch64 manager; no SM103/SM121/GB10 numbers, although the charter's stated targets are SM103/SM120/SM121 and helios neighbours (#497) measured on GB10/SM121. #674's description does not claim SM121.
  4. Test counts (selene 586, selene-manager 205 lib + 131 integration, helios runtime_core 191 / cache 44 / scheduler 419 / server 340, flare 246, check.py --mutations 8/8) are plausible given the new test count, but the diff adds a whole new phase_tests/codec_layout_tests body, and the author ran them on Linux only.

Citation: PR body; helios/src/runtime_core/memory/codec_layout_tests.rs:190-465; selene-manager/tests/client.rs diff; selene/src/disk.rs diff; orientation packet (base 1fbcc3c9, head 7d7dcdc, CI passed).

#7 [high] Related work: the merged line this PR builds on and partly reverses (#455, #497, #496, #429/#415/#413, #504)

Direct predecessors this PR modifies or supersedes (all merged, all by the same author unless noted):

Citations: read_item(#455), read_item(#497), search_items results, items_touching(selene/src/disk_store.rs).

#8 [high] Recent activity: built directly on the 2026-11-29/12-01 main commits; its own baseline lags the base by several main commits

Recent activity in the touched areas, and whether #674 builds on, conflicts with, or reverses it.

Main commits within days of the PR (base 1fbcc3c9, 2026-12-01):

Verdict per area:

Sources: orientation packet "Recent activity", search_history on selene-manager/src/store.rs and selene/src/memory.rs, items_touching(selene/src/disk_store.rs).

#9 [high] People, community, process, and project fit

People and process facts (the report is written from these notes).

Author. yatesdr, GitHub association COLLABORATOR. In the last 180 days: 82 merged PRs, 11 closed, 4 open. Merged-PR file counts: helios/src 36, docs 35, selene/src 32, selene-manager/src 25, selene-manager/tests 20. Recent merged: #663 (scheduler first-output waiting age, 2026-12-01), #628 (offload Copy Engine gating, 2026-11-30), #612/#611/#610/#609 (selene-manager and selene hardening, 2026-11-29), #527 (Latent576 page-split KV codec), #526, #504 (lossless KV compression). Open: #655 (own), #347/#348/#349 issues (own; production qualification of GLM-5.3-Flash — #665 and #674 both measure GLM-5.3-Flash TP2, so these issues are the workload origin). Commits on main in the touched areas over 180 days: selene/src yatesdr 36, Luke Alonso 6, Martin Vit 2; selene-manager/src yatesdr 30, Luke Alonso 3; helios/src Luke Alonso 236, Martin Vit 52, yatesdr 49; selene-manager/tests yatesdr 20. So: yatesdr effectively owns selene + selene-manager; helios is Luke Alonso's area (236 commits) and this is the largest helios change by yatesdr.

Who else works here. FujitsuPolycom (CONTRIBUTOR) owns the recent selene disk/offload performance work (#496, #497) and — critically — #665, the competing eviction-policy PR in helios/src/cache.rs. original-el8 and voipmonitor are the other merged contributors to helios/src/runtime_core/cache_memory.rs (#473, #391, #286). PCCessna and Martin Vit (#302, #264) also appear in selene/src.

Engagement on #674 so far: none. Zero comments, zero reviews, no labels, no linked reviewers; opened and last updated the same day (2026-12-02). Compare #665, opened a day earlier: 5 discussion entries and two Autobot reviews; #655: 6 entries plus a community confirmation from nepenth on 2× GB10 (SM121) TP2. #674 has drawn no attention yet.

Process state. Not a draft — "open, ready for review". CI on head 7d7dcdc: passed. Base main; 40 files, +11,210/−704; a single squashed commit ("selene,selene-manager,helios: improve prefix-cache hit rate, L1 retention, NVMe throughput, and GPU snapshot packing"). Age <1 day at the time of this case file. Description follows the charter's four-part shape (Why / What / Compatibility and Limitations / Measured Results / Verification) and ends with Discord: D-Rock.

Charter fit, as facts. Aligns: goal "Store prefix-cache checkpoints in host memory and share them across Flare instances via Selene" is exactly this area. Tension: "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over main on a served workload (#210)" — benchmarks exist but are against 5d53040e, two main commits behind the PR's own base 1fbcc3c9. Tension: "Check interactions across every supported model, cache scheme, parallel layout, multi-host setup, and hardware target named in the docs" — the PR explicitly scopes out multi-process packed puts and memory-limited GPUs and reports no SM121/GB10 numbers, although SM121 and DGX Spark are named targets (its neighbour #497 measured GB10/SM121). Satisfied: "PR descriptions: Expect four parts". No per-model branches or new flags in the code; specific models appear as measurement scope, not code paths. No non-goal is crossed.

Sources: orientation packet (author, areas, people, state); read_charter; read_item #655, #665; scratchpad entries 1-8.