Explore report · NVIDIA/hyperflare-inference #709

Raw Markdown for agents: https://autobot.eidonix.com/p/211eba5b-7c0e-453c-9e04-0e8c21ff7192.md

Case file — PR #709 "Unblock lossless KV compression across Ignition, selene-manager, and Helios Green Contexts"

https://github.com/NVIDIA/hyperflare-inference/pull/709 · open, ready for review · head eb6c1e1, base main (cc0a49d) · 19 files, +2032/−137 · opened and last updated 2026-12-03 · CI passed on head · no reviews, no comments, no labels.

Key findings

  1. The headline diff is roughly twice the authored change. About half of +2032/−137 is already-merged main content that the branch's base predates: the preserve_message_anchor plumbing (= PR #697, merged 2026-12-03 01:18) appearing in helios/src/scheduler.rs, helios/src/server/runtime.rs, event_tests.rs (not opened) and most of helios/src/server/runtime/phase_tests.rs, plus http_preparation_failures_preserve_typed_error_codes_and_protocol_envelopes (= PR #689, merged 01:22). Only early_startup_close_store_preserves_drain_and_slab_retention_contract (+63 in phase_tests.rs) is authored. Authored content is ≈+1,030 lines. (Inferred from content identity; search_history is broken in this checkout — "Could not read c513e46…" for every ref — so the merge commit could not be listed.)
  2. #698 is duplicated, not just referenced. #698 (ebfio, open, bug/triage:review) is the standalone fix for the same helios/src/server/runtime.rs startup ordering, and its Autobot review (2026-12-03 00:38, Changes Requested, 2 blockers) demanded exactly what #709 adds: fn close_store (helios/src/server/runtime.rs:1172, method at :1357) restoring HostStore::close ownership (ManuallyDrop retention, close errors into shutdown.error) plus a test. #709 thus supersedes #698 in substance while #698 stays open and the two will textually conflict.
  3. The selene-manager change relaxes a guard PR #612 introduced on purpose. #612 (yatesdr, merged 2026-11-29) added "Reject multi-process (world >= 2) packed PutBegin and PinAck grants" citing per-rank arena sizing / concurrent rank writers. #709 redefines "multi-process" from descriptor.ranks.len() >= 2 to session/layout identity and adds 645 lines of TP≥2 tests as counter-evidence. I verified the new predicates are exactly equivalent to "multi-process session" (see Change).
  4. Two behavior changes the description does not state. (a) NativeResources::offload_context() (helios/src/runtime_core/mod.rs:1416-1421) returns codec_context if present else the rank base context — so offload/pool registration moved off execution_context() for every persistent-worker core, cpu mode included (memory.rs:1010); the description only discusses the GPU case. (b) reserve_codec_partition is keyed on options.prefix_cache.enabled() && !model.gpu_codec_cubins.is_empty() (helios/src/runtime_core/model.rs:820-821), i.e. on cubin presence, not on --lossless-kv-compression gpu — a cpu-mode core that embeds GPU codec cubins would also reserve the third SM partition.
  5. The P1 claim is not demonstrated end-to-end. #701's symptoms (GKV1 encode 6.9–12.4 MB/s, decode 67.12 → 0.34–0.61 tok/s, B≥2 permanent hang) were measured on SM103/GB300; #709's evidence is an #[ignore]d component test on SM120 (RTX PRO 6000 Blackwell, 188 SMs, worker=8/codec=8/compute=172: 135,922.6 steps/s cooperative compute, 251 bit-exact GKV1 round-trips, 266.4 MiB/s, 5.98×). The author states SM103 end-to-end and flare run --lossless-kv-compression gpu at B≥2 were not run.
  6. New hard startup failure mode on small-SM devices. Cores that cannot fit worker+codec+compute partitions now fail startup with an error recommending --lossless-kv-compression cpu (persistent_worker.rs error path; test asserts on a 16-SM device). For off/cpu the 2-way split is unchanged — the "zero SMs lost" claim applies only there.
  7. Zero engagement so far, despite the author being a charter-named priority contributor with priors in this exact area (#607 fixed "multi-process put corruption"), and despite both linked reports (#698, #701) being filed by a different contributor (ebfio) who has not been asked to review.

The change

Three independent changes bundled in one PR.

1. Ignition authoring (ignition/preparation/contract.py +140/−7, tests/preparation/test_codec_layout.py (not opened) +150). New CodecEncoding(IntEnum) (contract.py:16) mirroring all 11 Selene IDs in selene/src/shared/codec_layout.rs (not opened), with block-byte and alignment tables; _validate_codec_encoding (:208) rejecting bools/non-ints/unknown IDs/lengths not divisible by block_bytes/misaligned FLOAT32_MATRIX_128 offsets; default_field_encoding(name, dtype, shape) (:232) conservatively classifying FP32 *.recurrent (…,128,128), BF16 *.convolution/*_convolution (…,10|16), other BF16 → BFLOAT16, rest → BYTES. codec_layout(pool, regions, buffers, *, field_encoding=None, state_buffer=None) (:249) now skips CONTINUATION_STATE entries in regions (:264), resolves the row buffer from CONTINUATION_STATE/explicit state_buffer (:276-280) instead of the hardcoded "state_pool", rejects conflicting buffers, and sorts/bounds-checks pool.layout.regions. field_encoding=None still returns None — backward compatible.

2. selene-manager pooled compression policy (selene-manager/src/pool/*.rs +40/−12, tests/packed.rs +645, tests/support/pool.rs (not opened) +3).

3. Helios GPU codec Green Context (helios/src/runtime_core/{persistent_worker,mod,model,memory}.rs, helios/src/server/runtime.rs, phase_tests.rs, docs/prefix-cache-offload.md).

Description vs. change. Everything the description claims is present, with two omissions it does not mention (findings 4a and 4b) and one thing it does not do: no update to selene-manager/PROTOCOL.md (not opened) or docs/same-process-tp.md (not opened) for the TP≥2 packaged-record policy; only docs/prefix-cache-offload.md (+15/−9) changed.

The why

Recent activity

search_history returned errors for every ref, so no commit-level timeline exists. Reconstructed from item metadata: main took #697 (2026-12-03 01:18) and #689 (01:22) after #709's base cc0a49d; #709 opened later the same day (18:08). No commits on main since the branch point touch #709's files other than those inherited merges. Nothing recent was reverted or undone by #709 other than #612's refusal condition. (docs/: #497 etc. merged; helios/src, selene-manager/src, ignition/preparation all have recent merged activity from the author himself — #707, #708, #683, #695 the same week.)

People

Project fit (charter)

Lines up: "solve the right problem in the right place" (a root-cause fix per layer, no per-model branches); "bring real evidence" (the description carries why / what changed / result / evidence plus an explicit limitations section, unusual for this repo); "supported matrix & compatibility — check parallel layouts, multi-host, hardware targets, and that existing data still loads" (the PR explicitly separates single-host TP≥2 from multi-process and keeps raw v3 readable; no wire-format or ABI change — packed v4 bytes are untouched, only who may use them). Tension: the charter asks performance PRs to show benchmarks "over main on a served workload"; the headline number here is a component CUDA microbenchmark, and the served-workload claim (SM103, B≥2) is unrun. "Keep the runtime small" is also mildly strained by +868 in persistent_worker.rs — though ~650 of those lines are a #[ignore]d test, so production helios growth is ~+110.

Claims and evidence

Verified by reading code at eb6c1e1: the CodecEncoding enum, validation, CONTINUATION_STATE skipping and state_buffer resolution in contract.py; the field_encoding=None → None early return; the selene-manager predicate rewrites and that None caps exclude literal-only v4 while keeping raw v3; the 3-way split, codec_index, alignment/fallback logic and too-few-SM error; offload_context(); offload::open before RankExecutor::new; close_store on all three early-error paths with get_or_insert; the docs update (third partition, pre-worker cuModuleLoadData, single-host TP≥2 vs multi-process). Claimed, backed only by author-local runs (nothing reproducible in CI): SM120 numbers (135,922.6 steps/s, 251 rounds, 266.4 MiB/s, 5.98×); suite counts eos 12, selene 553, selene-manager 408 with 12/12 in packed.rs, helios lib 1,835 passed/48 ignored, flare 255, flare-cli 246, pytest 163/0 skipped, TLA+ 8 models. Claimed without evidence: "eliminates … the multi-request cooperative decode collapse/hang (#701) on persistent-worker SM103 cores" — explicitly "pending live SM103 serving verification", with no SM103 GPU, no exported checkpoints, and flare run --lossless-kv-compression gpu at B≥2 not run. The recipe-side benefit ("companion recipe PRs can now declare validated codec_layout") has no linked companion PR and lives outside this repo. Disclosed limitations: 6 chat-template tests failed only because FLARE_TEST_TEMPLATE_DIR was unset; pre-existing persistent_worker::tests::cuda_* tests hardcode device VA 0x800_0000_0000, collide with CUDA UVA on the 16-GPU host, and were left untouched (so effectively unrun).

Reach

Process

Ready for review (not draft), opened and last updated 2026-12-03, CI green on eb6c1e1, 0 reviews, 0 comments, no labels, no maintainer request cited. Description carries all four charter-required parts plus a limitations section.

Points a reviewer will want to settle: (1) three unrelated fixes in one PR — splitting would decouple a Python authoring tool, a protocol-policy change and a CUDA scheduling change; (2) rebasing onto current main would halve the visible diff by dropping the inherited #697/#689 content; (3) the #698 duplication needs an explicit decision (close as superseded, or land #698 first); (4) the gpu_codec_cubins vs compression-mode gating and the rank-base-context offload switch are undeclared behavior changes; (5) #701's P1 symptom is not demonstrated fixed at the level it was reported; (6) the missing protocol doc update.

File map (PR head eb6c1e1)

File Δ Content
ignition/preparation/contract.py +140/−7 CodecEncoding :16, _validate_codec_encoding :208, default_field_encoding :232, codec_layout(..., state_buffer=None) :249, CONTINUATION_STATE skip :264, row-buffer resolution :276-280
tests/preparation/test_codec_layout.py (not opened) +150 new tests (count not verified test-by-test)
selene-manager/src/pool/store_bridge.rs +1/−1 packed refusal on ranks.is_some() :412, message :417
selene-manager/src/pool/claims.rs +16/−6 claim_begin caps :637-642, get_answer caps :922-929, PinAck gate :1181
selene-manager/src/pool/core.rs +10/−4 codec = None when multi-process :645-649, offered_codec retained :293, :617
selene-manager/src/pool/lookup.rs +13/−1 packed_caps gating :226
selene-manager/tests/packed.rs +645 single_host_tp2_packed_put_stores_and_serves_over_shm_and_tcp, single_host_tp2_peer_dram_packed_export_succeeds_over_shm_and_tcp, multi_process_tp2_stays_raw_only_and_excludes_packed_records
selene-manager/tests/support/pool.rs (not opened) +3 helper
helios/src/runtime_core/persistent_worker.rs +868/−45 plan_sm_split/SmSplitPlan/split_sm_groups/GreenContextPartition :34-470, unit tests :997-1135, #[ignore]d CUDA test ~:2590-3240 (:3004 asserts offload_context() == codec_context, :3008 cites #698)
helios/src/runtime_core/mod.rs +20/−2 prepare_kernels param :761/:778, offload_context :1416-1421, teardown :1641
helios/src/runtime_core/model.rs +10/−2 reserve_codec_partition :820-821, prepare_offload contexts ~:966-970
helios/src/runtime_core/memory.rs +1/−1 registration_context = ranks[0].context :1010
helios/src/server/runtime.rs +69/−57 ordering :661-683 vs :699, close_store fn :1172, method :1357
helios/src/server/runtime/phase_tests.rs +63 authored (rest inherited) early_startup_close_store_preserves_drain_and_slab_retention_contract
helios/src/offload/{mod.rs,transfer.rs,transfer/gpu_codec.rs} +5/−1 test-only re-exports and visibility
docs/prefix-cache-offload.md +15/−9 third partition, startup ordering, TP≥2 vs multi-process rules
helios/src/scheduler.rs, event_tests.rs (not opened), phase_tests bulk inherited #697 preserve_message_anchor / #689 typed-error test — not authored here

Open questions / not found