Pre test report scratchpad · NVIDIA/hyperflare-inference #742

Raw Markdown for agents: https://autobot.eidonix.com/p/06dd0519-a543-4c4e-8139-43de1ffc29d2.md

#1 [high] PR #742 mechanism and code sites

PR #742 head f26d8a8, base f46a9922, +105/-21 in 9 files. Fixes pool-only capture-buffer oversizing.

Sizing chain (verified by reading head):

IMPORTANT bug-class caveat for planning (from code-correctness lens, later dropped on verification): memory.rs:1143 passes capture.then_some(minimum_pages) (NOT allocated pages) into headroom_inner; final slab at offload.rs:699 uses geometry page_capacity (allocated). Reviewer verified this is fine because the 1133 call only computes the pre-registration tier_host reservation and the real slab is built at offload.rs:702-754 from bytes derived again from headroom_inner with local_pages = allocated capacity (offload.rs:699). Still: the actual slab size at startup is min(allocated page_capacity, max_sequence_pages)+row_slots.

Gov/doc: docs/prefix-cache-offload.md:1593-1609 documents ceiling min(GPU page capacity, ceil(max_sequence_tokens/page_tokens)) + one row. Bypass risk: with --kv-cache-limit context|concurrency, page_ceiling caps maximum_pages near max_sequence_pages, so the min() is a no-op; A/B must use default --kv-cache-limit memory.

#2 [high] Hardware test plan facts for PR #742 (pool-only capture bound)

Mode gate: capture requires options.prefix_cache.pool_only() (selene/src/offload.rs:116-118: pool.is_some() && memory_bytes==0 && !disk_enabled()) AND self.cluster().is_none() (helios/src/runtime_core/memory.rs:1009) AND local_pages.is_some() && shard.is_none() (selene/src/offload.rs:699-700). So: --prefix-cache-pool ADDR, --prefix-cache-memory 0, NO --prefix-cache-disk, single process (no --rank/--hosts). Must use default --kv-cache-limit memory (flare-cli/src/cli.rs:926-939): with context|concurrency, page_ceiling caps maximum pages ≈ ceil(context/page_tokens) (memory.rs:585-607) so the new min() is a no-op and A/B shows nothing.

Expected slab slots (chain-dominated, max_concurrency small): slots = min(allocated page_capacity, MSP) + layout.row_slots(), MSP = ceil(max_sequence_tokens/page_tokens) (memory.rs:562-569, 1007). intake floor (uncapped): intake_slots = 2max_activerow_slots + 2*64 (selene/src/offload.rs:226-228); on main slots = max(pages+row_slots, intake); with wide --max-concurrency the cap can be invisible (intake dominates) — doc example: 1,664 intake slots /11.0 GiB vs 7.1 GiB chain.

Observables: startup log line "pool only: capture buffer {GiB} ({N} slots, populate …, register …)" (selene/src/offload.rs:432-460, emitted in phase "Prepare host prefix cache", helios/src/runtime_core/model.rs:1130); startup error "host budget cannot hold a full pool capture" (selene/src/offload.rs:175-176). Metrics gauges: flare_host_cache_slots_total (host_slots[1]) & flare_host_cache_intake_slots (=0 in capture mode) & flare_host_cache_slots_in_use, flare_total_kv_pages, flare_kv_page_tokens (helios/src/server/metrics.rs:1334-1400,1467-1501). Failure signals if the cap under-sizes: flare_host_cache_dropped_total{reason="oversize"} and flare_host_cache_retry_abandoned_total{reason="slabs"} (metrics.rs:861-873, 905-912), plus flare_host_cache_stored_total (must be >0) and flare_host_cache_hits_total/reused_tokens for restore. page_record_bytes can be derived from the startup log (bytes/slots) or cache.kv_page_bytes in flare inspect CORE --json (models: max_sequence_tokens, max_active; cache: page_tokens, pages, max_pages). RSS: /proc//status VmHWM; cgroup memory.peak for the failure-mode run.

Hardware fit: cn5 (SM120, 4×96 GiB, 125 GiB RAM, amd64) is the right host — single-process TP1 or TP4, default --memory-limit gives ~99k pages on 96 GiB so pages >> MSP for any 128K-context core (large gap). cn7 (GB10, 1 GPU, 60 GiB unified, arm64, SM121) exercises the integrated branch (integrated_offload_host_budget, sized_concurrency 1) — smoke only. Risk: model entries on both hosts are listed at 0 GiB, so a prepared signed core may not exist; flare models / flare inspect must confirm before any GPU run (exporting would need the full checkpoint). Not worth GPU time: throughput/isolation benchmarks (no hot-path change; qualify/host_cache_isolation.py), full helios --ignored GPU suite, tests/server/test_prefix_cache_offload.py (does not exercise pool-only), Kani/TLA+.