#1 [high] PR #655 summary and current head
PR #655 (NVIDIA/hyperflare-inference), head f7f4d25 ("Ready To Merge" per final review). Title: helios scheduler — retain measured snapshot cost + one cold discovery capture.
Changed (7 files, +348/−63):
- helios/src/scheduler/cost.rs:
ActionCosts::fresh_durationREPLACED bymeasured_duration(kind, tokens)(cost.rs:783-790): scansself.batches(kind)ascending, returns first batch whose estimatenanos != 0, NO TTL expiry (prefill cost retention parity with #285).observe()still resets rolling window on next execution after TTL. - helios/src/scheduler/checkpoints.rs: three gates switched fresh->measured:
checkpoint_selection_uncached(:624),:965),checkpoint_copy_allowed(allocate_terminal_capture(~:1039). Newsnapshot_discovery_in_flight()(:1018-1023) + one zero-priced "discovery" terminal capture when snapshot cost never measured,checkpoint_extra_work_fraction > 0.0, and no discovery in flight; claimed only after a row is obtained (:1067-1072). - helios/src/scheduler.rs: new field
snapshot_discovery: Option<RequestHandle>(:661, init :756); cleared in complete_inner (:2690-2692, :2700-2702) and retire (:3067-3069). - Docs synced: docs/scheduling-runtime-design.md, docs/core-design.md, docs/cli-design.md, helios/README.md.
- PR body changed "Fixes #534" -> "Related to #534".
Claimed effect: host/disk/Selene prefix-cache checkpoints stop being refused when Snapshot copy cost is stale (>30 s) or unmeasured (warm restart). NOT a throughput speedup per se — it is checkpoint-retention + bounded extra copy work (<=1 discovery copy while unmeasured; retained cost gating afterwards).
Verification already done upstream: SM120 live A/B on main 3801ff1d vs 2d9454fe across 3 scenarios (>30s decode, >33s idle), 4-scenario validation at f7f4d25, green CI incl. helios-lifecycle TLA+ + Kani, 6 new/updated CPU tests incl. end-to-end plan->commit->complete.
Residual risks flagged by review to probe on hardware:
- Zero-priced discovery copy can never be refused by work budget;
flare_checkpoint_extra_work_nanoseconds_totalunder-reports by one copy per discovery event (docs/api.md:355-356 promises charged predicted work). - Do-3 twice-cleared snapshot_discovery slot; docs still say "no concurrency-based snapshot share" next to "at most one in-flight discovery capture".
- No human maintainer review yet.
- Only one GPU/model/TP1 live evidence cited; no served-workload A/B against main.
#2 [high] Hardware/test harness facts for PR #655 plan
Test harness available in repo (verified by reading):
- scripts/benchmark_scheduler.py: closed-loop HTTP load generator using SSE token timing. Flags: --base-url, --model, --concurrency list (default 1,2,4,8,16,32), --prompt-tokens, --output-tokens, --seconds, --warmup-seconds, --trials, --expected-cached-prompt-tokens, --pair-index, --variant baseline|candidate, --pair-order, --output (JSONL), --reuse-requests (replay identical request bodies from a previous JSONL). Each trial row records ttft_median/p99, burst gaps, tokens_per_second, prompt_token_counts, cached_prompt_token_counts, cache_condition_valid, and full
metrics_before/metrics_afterstrings from /metrics (lines 128-173, 207-222). => checkpoint counters (flare_checkpoint_skips_total{reason="unknown_cost"}, flare_checkpoint_captures_total{role}, flare_checkpoint_extra_work_nanoseconds_total, flare_host_cache_*) can be differenced per trial straight from the JSONL. - scripts/check_response_completion.py: two-request concurrency check (long 8192-token request + short 16-token); "Prime terminal-snapshot costs before requests compete for scheduling" (line 79) — the codebase itself relies on a warm-up request to prime Snapshot cost. Requires throughput scheduling and >=2 slots.
- tests/server/test_prefix_cache_offload.py: native Qwen TP1 cache-persistence test; class Service with metrics()/settled()/ask(); server() context manager builds
flare run CORE --gpus ... --mtp-draft-tokens N [flags], waits /health up to 150 s, SIGTERM shutdown, asserts returncode 0. Lines 138+ show a restart-with-records flow (--prefix-cache-disk DIR --prefix-cache-disk-limit 8G) that is the closest existing recipe for the warm-restart discovery scenario. Gated on FLARE_RUN_CUDA_TESTS=1, FLARE_OFFLOAD_TEST_CORE, CUDA_VISIBLE_DEVICES. - Docs: docs/design-review.md:200-240 (timing-estimation changes require scheduling_sim learning.py catalog; simulator results do not establish GPU behavior); docs/verification.md:13-15 (latency/throughput claims need target benchmark or live trace; real execution on assigned GPUs for CUDA behavior); docs/performance-work.md:9-13 (use ignition export +
flare run CORE; ignition debug-serve and --direct/--eager timings are NOT apples-to-apples). - Retention config (docs/cli-design.md:754-759): --prefix-cache-memory SIZE (default 0), --prefix-cache-disk DIR, --prefix-cache-disk-limit SIZE, --prefix-cache-pool ADDR. docs/prefix-cache-offload.md:140-159 behaviour matrix; :190-197 on integrated memory (DGX Spark GB10) warm memory duplicates bytes in the same pool => disk-only retention recommended there.
- checkpoints gate: --scheduler-checkpoint-extra-work-fraction (default 0.05, finite, [0,1]) docs/cli-design.md:696-711 (doc already updated by PR at 707-709).
- estimate_ttl_ns default 30 s: helios/src/scheduler/policy.rs:23,39. There is NO CLI flag for estimate_ttl_ns (grep of flare-cli finds none) => the 30 s idle/decode scenario must be produced with real wall-clock idle, not a flag.
- Arch: cn5 RTX PRO 6000 Blackwell Max-Q = GB202 => SM120 platform tag
gb202(helios/src/core/naming.rs:83-87). cn7 GB10 = SM121 platform taggb10(naming.rs:63-64, docs/model-preparation.md:477-479: an SM120 core does NOT satisfy the GB10 arch check). Docs/cli-design.md:902-930: HF repos hold per-platform revisions named by platform id;flare download ORG/MODEL --revision gb10; automatic selection by PCI id; explicit --revision overrides. - Serving of an already-exported core needs no re-export for this change (docs/model-preparation.md:520-523; PR body: "requires no core re-export" per cli-design.md:711).
#3 [high] Hardware test plan (draft) - arms, scenarios, assertions, budget
Plan skeleton (all details verified from repo docs/code): Builds: baseline = origin/main at test start (or merge-base with f7f4d25), candidate = PR head f7f4d25. Only flare-cli/helios rebuilt; ONE already-exported/downloaded core serves BOTH builds (no re-export: docs/model-preparation.md:520-523, docs/cli-design.md:711).
Machine roles:
- cn5 (4x RTX PRO 6000 Blackwell Max-Q 96 GiB, GB202 = SM120, amd64): primary arm, TP1 if it fits else TP4. Models present: nvidia/GLM-5.3-Flash-NVFP4, local-inference-lab/GLM-5.3-Flash-NVFP4.
- cn7 (1x GB10 = SM121, arm64, 60 GiB RAM, 16 GiB scratch): arch-coverage arm with the smallest model present (google/gemma-4-E4B-it) and disk-only host retention (docs/prefix-cache-offload.md:190-197). Requires a
gb10-revision core; an SM120 core is rejected (docs/model-preparation.md:477-479).
Scenarios (all with --prefix-cache-memory 4G --prefix-cache-disk DIR on cn5; --prefix-cache-memory 0 --prefix-cache-disk DIR --prefix-cache-disk-limit 8G on cn7): S1 long decode (>35 s, choose max_tokens from measured single-stream rate) then same-prefix follow-up. S2 33 s idle then same-prefix request. S3 multi-message prompt (prefill Message extras). S4 warm restart against the same disk dir (Snapshot unmeasured) + cached-anchor request -> single zero-priced discovery, then multi-message follow-up. S5 control: --scheduler-checkpoint-extra-work-fraction 0 (byte-identical behaviour, no captures). S6 coalescing/cancel stress at concurrency 2-4 from a cold-discovery state (review should-fix #3).
Pass/fail counters (from GET /metrics): candidate: unknown_cost delta 0 after first measurement; endpoint captures +1..+2 per scenario; S4 extra_work delta 0 for the discovery copy while endpoint +1 (documents the zero-pricing nit); message captures >0 in S3/S4 follow-up. baseline: unknown_cost +>=1 per post-TTL request; endpoint captures 0; message captures stay 0. both: requests_failed_total 0; no panic string "requested lifecycle operation must be feasible" in the log; host_cache drops/deferrals flat; cached_kv_pages bounded.
Budget: cn5 ~50-60 min GPU (2 builds x ~20 min run + ~10 min restarts/loads); cn7 ~15 min GPU + build/test wall time (arm64 release build on 10 CPUs is the long pole: start it first, run CPU tests meanwhile).
Not to run: ignition export / re-export, ignition debug-serve (--direct/--eager), selene-manager pool (--prefix-cache-pool), --lossless-kv-compression, concurrency 32 sweeps.