#1 [high] PR #576 verified diff facts
PR #576 "Pin Helios execution and RoCE proxy threads to high-capacity CPUs on asymmetric Linux topologies", author fordbmorris (association NONE, first-time contributor), head 3363573 (reviews also cite 4b41ddc). Files (pr_files): eos/src/unix.rs +145, eos/src/windows.rs +3, helios/native/roce_proxy.c +71, helios/src/execution/parallel.rs +1, helios/src/execution/worker.rs +1, helios/src/replay.rs +4/-1, helios/src/server/runtime.rs +1.
Mechanism (verified in diff):
- eos/src/unix.rs:172-210
select_high_capacity_cpuspure selector; keeps CPUs with cap10 >= max9 (unix.rs:192); fallback cap*2 > min+max at :198-203; final gateselected.len() >= 2 && < allowed.len()at :205. - eos/src/unix.rs:215-245
prefer_high_capacity_cpus: sched_getaffinity -> read /sys/devices/system/cpu/cpuN/cpu_capacity per allowed CPU -> earlyreturnon the first unreadable/unparsable file (:228-233) -> sched_setaffinity with result discardedlet _ =(:244). - eos/src/windows.rs:220 empty stub; eos/src/unix.rs:247-248 another empty
#[cfg(not(target_os="linux"))]stub. - helios/native/roce_proxy.c:1505-1570
#ifdef __linux__C copy of the same policy (same thresholds, same early returns,(void)sched_setaffinityat :1567); :1575pthread_setname_np(pthread_self(),"flare-roce"); :1576 call at top of proxy_main. - Four one-line Rust call sites: parallel.rs:539 (first statement of serve_rank), worker.rs:71 ("flare-execution"), replay.rs:174 ("flare-cuda"), runtime.rs:568 ("flare-model").
- Tests: eos/src/unix.rs:254-314 only exercise the pure selector (GB10 2-tier split, homogeneous/efficiency-only/performance-only, single CPU, zero capacity, 3-tier midpoint fallback). No test for the sysfs/sched_setaffinity half, none for the C copy.
- No env var, no flag, no config field, no CLI option anywhere in the diff: the policy is default-on and not disableable.
CI: .github/workflows/native-serving.yml:47 already runs cargo test eos, so the selector tests run in CI — hardware testing of the selector is unnecessary.
#2 [high] Verified: affinity mask leaks onto offload/image/disk threads
Independently verified (not in most lenses): the flare_eos::prefer_high_capacity_cpus() call at helios/src/server/runtime.rs:568 is the FIRST statement of the "flare-model" thread closure, and the same thread then spawns long-lived I/O workers, which on Linux inherit the creator's sched_setaffinity mask:
- helios/src/server/runtime.rs:698 -> crate::offload::open (helios/src/offload/mod.rs:105) -> flare_selene::offload::open (selene/src/offload.rs:624) -> factory.mapped +
disk::DiskThread::start("flare-offload-disk")(selene/src/offload.rs:653,676) and rank transfer threads helios/src/offload/transfer.rs:509-511std::thread::Builder::new().name("flare-offload-{rank}").spawn(...). - selene/src/disk.rs:358-360
std::thread::Builder::new().name(name).spawn(...)for the disk thread. - helios/src/server/runtime.rs:721
ImagePreparation::new(...)-> runtime.rs:1011thread::spawn(...)image-preparation thread. So all of those land on the 10 high-capacity cores instead of the full mask. transfer.rs:531 and disk.rs:470 then call lower_priority() (SCHED_BATCH + nice) on those threads — which only helps if they are NOT co-scheduled with the model thread's cores.
This directly contradicts the documented policy: docs/prefix-cache-offload.md:863-867 — "transfer threads ... and the disk thread ... Both use SCHED_BATCH with a positive nice value to reduce contention with the model worker, HTTP runtime, and frontend workers. Adding CPU affinity requires a serving-latency measurement that shows a benefit." The PR neither updates that paragraph nor measures the offload path. No lens's blocker list except the Value Proposition lens surfaced this leak; architecture/conventions/simplicity/correctness missed it.
Also verified: the same-process TP rank threads flare-rank-{n} (helios/src/execution/threaded.rs:652-654) get no explicit call; they only inherit. Thread names available for observation: flare-model, flare-execution, flare-cuda, flare-roce, flare-offload-{N}, flare-rank-{N}.
#3 [high] Verified repo rules and vendored-file contract
Verified quotes and line numbers:
- helios/native/roce_proxy.c:6-8 — "Vendored from FlashInfer's pinned preparation dependency (flashinfer/experimental/b12x/comm/roce/_roce_proxy.c, proxy ABI 14). Keep the source below identical so preparation and serving share the transport ABI." This PR adds +71 lines of Flare-only code to that file (the #ifdef block plus the thread name) and updates neither this header, NOTICE, THIRD_PARTY_NOTICES.md, docs/roce-ring.md, nor the FlashInfer pin.
- NOTICE:16-19 — "helios/native/roce_proxy.c was contributed by its original author from: .../f5f5341d.../_roce_proxy.c ... Its implementation is unchanged from that revision; Flare adds a license and provenance preamble." After this PR this sentence is false.
- docs/roce-ring.md:355-364 — "... When changing the protocol, keep the vendored source identical to the dependency after its provenance header and verify their ABI and collective-region layouts together."
- docs/TODO.txt:80-86 already carries open preparation/serving RoCE proxy parity debt (per explore lens).
- Charter ("Be explicit and pin everything. No magic defaults, and pin dependencies to exact versions or commits") and "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over
mainon a served workload (#210)." - AGENTS.md:449-457 — no env-var configuration; "A setting has one of three homes: the recipe declaration, the configuration file, or a command-line flag" (AGENTS.md:453). The new policy has none of the three and cannot be disabled.
- AGENTS.md:182-186 "Reject weakened guarantees ... Do not remove validation, suppress errors, silently substitute execution paths..."; AGENTS.md:188-193 "Reject unsupported abstractions and churn ... fallback layers ..."; AGENTS.md:194-199 "Tests must exercise the affected behavior or contract".
- AGENTS.md:165-169 — every contribution must address a maintainer request, demonstrated defect, measured problem, or bad docs.
- docs/design-review.md:106-114 (principle 12) — performance claims need equivalent baselines and actual Helios service measurements; docs/design-review.md:112 "
ignition debug-servetimings are diagnostic only." - docs/performance-work.md:9-13 — use
ignition export+flare run COREfor performance comparisons. - Upstream coupling: PR description pairs with local-inference-lab/flashinfer#156 and claims either PR may merge in any order; the repo has already been burned by ABI drift (#279 resync, docs/TODO.txt:80-86).
Ease of the fix (verified): the proxy pthread is created by roce_start, whose only caller is RoceTransport::connect at helios/src/execution/roce.rs:295; a new pthread inherits the creator's mask, so one call before roce_start deletes the whole ~66-line C copy. Also verified: the vendored-identical rule is arguably already only "protocol"-scoped (docs/roce-ring.md says "When changing the protocol..."), so a non-protocol addition like affinity may be defensible if declared — but the NOTICE sentence "implementation is unchanged" is unambiguously false and must change regardless.
#4 [high] Hardware capability vs PR claims
Hardware: cn5 = 4× RTX PRO 6000 Blackwell Max-Q (SM120), amd64, 48 CPUs, 4 GPUs on one host. cn7 = 1× NVIDIA GB10 (SM121), arm64, 10 CPUs, 60 GiB RAM.
Consequences for testing PR #576:
- cn7 is the only asymmetric SoC (Grace 20-core on a full DGX Spark; the job is given 10 CPUs, so the visible cpuset may already be narrow). It is a SINGLE GB10, while the PR's headline evidence is 4× DGX Spark TP4 over
--roce-ringwith ConnectX-7. RoCE ring requires 2..16 ranks over multiple hosts (docs/roce-ring.md:3,19,404; helios/src/execution/roce.rs:151). With one GB10 we cannot reproduce the RoCE proxy claim (helios/native/roce_proxy.c, the untested C helper, theflare-rocethread) at all — that needs ≥2 GB10 hosts with ConnectX-7 and therocefeature build. - cn5 is x86_64: the code path is a guaranteed no-op there (no /sys/devices/system/cpu/cpuN/cpu_capacity). cn5 can therefore only confirm the no-op/regression claim (and would confirm nothing about placement). It is useful for cheap regression sanity, not for validating the feature.
- cn5 has 4 GPUs on one host, which DOES exercise the same-process TP path (RankPeers::Threads -> threaded.rs:652
flare-rank-{n}) and theflare-model/flare-executionthreads — i.e. the mask-leak question and the no-op claim. It cannot test the RoCE proxy. - The models on the hosts (dinov2-base, GLM-5.3-Flash-NVFP4, Qwen3.8-27B-NVFP4/DFlash2, etc.) are NOT the recipe the PR measured ("Inkling 2 Small NVFP4", from local-inference-lab/hyperflare-recipes per AGENTS.md:9-16). So no main-vs-head A/B reproduction of the +17.2% / CV figures is possible on either host without new export work.
- Thread placement is directly observable with
ps -L -o comm,psr/taskset -cpfiltering the new names flare-model, flare-roce, flare-execution, flare-offload-N — a cheap, high-value check that does not need benchmark runs. - The pure selector already runs in CI (native-serving.yml:47
cargo test eos), so unit-test re-runs on hardware add nothing.