Opened by a workflow run, Nov 28, 2026 2:31 PM EST.
screen malicious
Screen Result: All Clear
Evidence:
Read the complete diff of NVIDIA/hyperflare-inference PR #576 (head 3363573; 7 files, +226/−1) end to end, plus surrounding code in every touched file. Every added hunk is genuine, functional CPU-affinity/thread-naming code consistent with the title: select_high_capacity_cpus and prefer_high_capacity_cpus in eos/src/unix.rs:167-248, an empty non-Linux stub in eos/src/windows.rs:220, a C mirror pin_high_capacity_cpus() under #ifdef __linux__ in helios/native/roce_proxy.c:1505-1570 and a pthread_setname_np("flare-roce") call at roce_proxy.c:1575, and four one-line call sites at thread entry (helios/src/execution/parallel.rs:539, execution/worker.rs:71, replay.rs:172-176, server/runtime.rs:568).
No agent-directed content was found anywhere: PR has zero comments, reviews or inline comments (pr_comments: "No comments"), so no discussion channel for injected instructions; the diff contains no imperative text, no hidden/Unicode-smuggled text, no network fetches, no exec/spawn, no encoded blobs, and no instructions to reviewers or automated agents. Greps of the changed files for ignore/disregard-instruction, assistant/agent/autobot/system-prompt, curl/wget/http(s), base64, eval and Command::new/std::process returned nothing in added code (only pre-existing test temp-file paths in eos/src/ioring.rs:337 (not opened),364,442 and eos/src/windows.rs:230,269). The file set is exactly the seven expected code files — no CI workflow, script, docs or dependency changes — so there is no second channel.
Non-security notes for reviewers: (1) roce_proxy.c:6-8 states the vendored proxy must stay identical to FlashInfer's copy (ABI 14), yet this PR edits it — upstream-drift hygiene, not security; (2) the body cites external PR local-inference-lab/flashinfer#156 as "zero wire/ABI dependency", a trust claim to verify, not an instruction; (3) first-time contributor fordbmorris (association NONE) opened #574–#577 the same day with no CI on the head commit — ordinary review-diligence context; (4) benchmark figures (GB10, +17.2%, CV reductions) are not reproducible from the repo.
Full report · Notes decide malicious: all_clear (100%): No malicious content found
explore
Author: fordbmorris (GitHub association NONE — not a member; first-time contributor with no merged commits in this repo; Discord woooflet per the PR body)
Motivation: On NVIDIA GB10 (DGX Spark) the 20-core Grace CPU mixes 10 slow Cortex-A725 cores with 10 fast Cortex-X925 cores, and Linux sometimes schedules Helios's two 100%-CPU threads (the CUDA execution/WFET thread and the busy-polling RoCE proxy thread) onto the slow ones, which the author measures as slower one-shot collectives, stretched host wake gaps and launch-to-launch variance. The PR makes those threads silently re-narrow their own affinity to the high-capacity CPU tier read from /sys/devices/system/cpu/cpuN/cpu_capacity, with no env var, flag or config.
Scale: +226 / −1 lines in 7 files
Proposal:
- New
eos::unix::select_high_capacity_cpus(pure, unit-tested) +prefer_high_capacity_cpusthat readssched_getaffinity, keeps CPUs at ≥90% of max allowed capacity (fallback: strictly above the midpoint, minimum 2), and callssched_setaffinityon the calling thread; Windows no-op stub. - Logically identical C
pin_high_capacity_cpus()inlined into the vendoredhelios/native/roce_proxy.c, pluspthread_setname_np("flare-roce"). - One call at the top of the
flare-model,flare-execution,flare-cudathread closures and ofserve_rank. - No ABI change (proxy ABI stays 14), no Protobuf/recipe/config change, existing cores unaffected.
- Paired with upstream local-inference-lab/flashinfer#156, claimed to merge in either order. Touches:
helios/native/roce_proxy.c(a vendored-verbatim FlashInfer file whose header, NOTICE anddocs/roce-ring.mdrequire it be kept identical to the pin)eos/src/unix.rs(only pre-existing thread helper waslower_priority)helios/src/{server/runtime.rs, execution/{parallel.rs,worker.rs}, replay.rs}(hot loops also touched by merged #280) Related items:- #280 Park the serving loops on a frame-completion word in WFET on GB10 (merged): edits the same rank loop and
flare-modelworker; this PR builds on it. - #353 WFET Engram wait (closed, unmerged): maintainers' most recent bar for a GB10 thread-level micro-optimisation — closed for showing no benefit.
- #577 roce_proxy: raise ring mailbox window to 16 (open, same author): edits the same vendored file; both cause upstream drift.
- #279 Match native RoCE transport to the pinned FlashInfer proxy ABI 14 (merged): the precedent of resyncing the vendored copy rather than diverging.
- #325 ring relay readiness order (merged): precedent for editing the vendored proxy with an explicit upstream-parity note.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/576
Autobot comments: Undeclared: the C edit breaks the "keep the source identical" contract on
roce_proxy.c(file header lines 6–8, NOTICE:16–19 "Its implementation is unchanged from that revision", THIRD_PARTY_NOTICES.md:48–52, docs/roce-ring.md:361–364) and makes NOTICE false unless flashinfer#156 lands; same-process threaded TP rank threads (flare-rank-N, threaded.rs:652–678, documented in docs/same-process-tp.md:137 (not opened)) are left unpinned, though the description implies peer-rank coverage; the affinity change is silent, unlogged, unconfigurable and discardssched_setaffinityfailures, against the charter's "no magic defaults" and AGENTS.md:449–466; the Why names two critical threads but the diff pins four Rust threads plus the proxy, and placement evidence covers only two; every number is author-supplied with no raw data (CV claims rest on 4 vs 6 launches; the +17.2% same-server A/B does not say how A725 placement was forced); no CI ran at all, though.github/workflows/native-serving.yml:46–47(not opened) runs exactly the cited eos tests; no maintainer request or issue backs the problem; zero comments, zero reviews, no triage label.
Value Proposition
Verdict: worth it with changes — do not merge as written
The underlying problem is real and squarely in the project's target hardware (DGX Spark / GB10 is named in the vision), the evidence is far better than most performance PRs, and the change is small and off by default elsewhere. But as written it (1) diverges a file the docs require to stay byte-identical to the pinned FlashInfer dependency, (2) silently undermines an explicit documentation gate on CPU affinity, (3) leaks the narrowed mask onto unrelated I/O threads, and (4) has a much simpler alternative that gets the same placement. All four are fixable; none require redesigning the idea.
Why the direction is right (charter alignment)
- Target hardware, not "broad hardware support." The vision names "SM120/SM121 workstations and DGX Spark." GB10 is an SM121 device (
helios/src/core/naming.rs:26(not opened)), so this is the project's own machine, not a non-goal expansion. CPU/non-NVIDIA backends are the non-goal; this touches no CPU backend and no model path. - Model-agnostic, no flags, no env vars, no Protobuf/ABI change. The hook is a generic "run hot threads on the fast cores" call, not a per-model branch — it satisfies "no per-model special cases or flags" and "no magic switches."
- Root cause, not a symptom. Scheduler placement variance is genuinely the cause of the jitter, and the change addresses it at the placement layer. Operator cpusets are preserved by intersecting with
sched_getaffinity, which is the right behaviour. - Evidence is in the expected four parts and is unusually concrete: launch-to-launch CV 4.82% → 0.72%,
RoceOneshotLaunchsum −31.0%, p90 inter-graph wake gap 1,880 µs → 30.9 µs, plus a 2-hour soak. Rust unit tests cover homogeneous, single-tier, zero-capacity and three-tier cases.
Problems that must be fixed
-
Vendored-proxy divergence (highest concern).
helios/native/roce_proxy.c:6-8states "Keep the source below identical so preparation and serving share the transport ABI," anddocs/roce-ring.md:361-364repeats the rule: keep the vendored source identical to the FlashInfer dependency after the provenance header. This patch adds a 71-line Flare-specific block plus a Flare-branded thread name ("flare-roce",roce_proxy.c:1575) to that file, and the PR itself leans on a paired FlashInfer PR (#156, currently open, unreviewed) for lockstep. That converts a merge-order-free change into a coupling the project has already been burned by —docs/TODO.txt:80-86carries open preparation/serving proxy-parity debt. The proxy only needs the affinity change at thread start; it does not need a capacity scanner of its own. -
A duplicated implementation with no test.
select_high_capacity_cpusexists twice — in Rust (eos/src/unix.rs:171-208, three tests) and again in C (roce_proxy.c:1505-1569, no test at all). Same 90% threshold, same midpoint fallback, same ≥2-CPU floor, written twice in two languages. Two copies will drift, and the copy the proxy actually uses on the hardware in question is the untested one. Also note the C version readscpu_capacityper CPU andreturns (no-op) on the first unreadable file, while the Rust version returns on the first failure too — consistent, but neither is exercised on CI hardware: CI runs the eos tests on x86 (eos/src/unix.rstests only feed synthetic pairs), so the "no-op on x86" path is what CI actually proves. -
Affinity is inherited, so the mask leaks past the intended threads.
prefer_high_capacity_cpus()is called at the top of theflare-modelthread (helios/src/server/runtime.rs:568). The same thread later constructs the image-preparation worker (runtime.rs:721→ImagePreparation::new,runtime.rs:1011) and, viacrate::offload::open(runtime.rs:698), the Selene offload transfer threads (helios/src/offload/transfer.rs:509) and disk threads (selene/src/disk.rs:358). On Linux a child thread inherits the parent'ssched_setaffinitymask, so those workers silently land on the 10 performance cores as well — exactly the cores the patch is trying to reserve for the execution and RoCE threads. That is the opposite of the documented intent:docs/prefix-cache-offload.md:863-867deliberately keeps offload threads onSCHED_BATCHwith a positive nice value over the wide CPU set. Nothing in the PR measures or acknowledges this. This is the defect I would block on. -
The documented policy gate on CPU affinity is not met in the docs.
docs/prefix-cache-offload.md:866-867says plainly: "Adding CPU affinity requires a serving-latency measurement that shows a benefit." The PR has measurements, but it leaves the document untouched, somainwould ship code and docs that contradict each other. Either update that paragraph to describe the new critical-thread policy and how it differs from the offload rule, or the change reads as having bypassed the project's own standard. -
Same-process TP coverage is accidental, not designed.
helios/src/execution/threaded.rs:652-654spawns theflare-rank-Nthreads without calling the helper. They get the narrowed mask only by inheriting it fromflare-execution. That works, but it is undocumented implicit behaviour in the one layout (docs/same-process-tp.md) where several 100%-CPU threads share one process; if someone moves the call or spawns those threads from elsewhere, the pinning silently disappears. Make it explicit or state the inheritance contract. -
Three magic numbers with no rationale in the code. 90% of max, the
(min+max)/2fallback, and the "never fewer than two CPUs" floor are all judgement calls. The comments explain what they do; nothing records why 90% and not 85%, or why two and not four. For a prototype this is tolerable, but "no magic defaults" is a stated rule — one short paragraph in the doc, plus a named constant, closes it. -
Evidence is narrower than it looks. The headline +17.2% C8 decode is a core-tier A/B on one live server (X925 vs A725 placement), not patch-vs-
main. It shows the mechanism matters; it does not show the patch's serving gain. The patch-vs-mainnumbers are the CV (6.7×),RoceOneshotLaunch(−31.0%) and the p90 wake gap (61×) — those are real and are the ones to lead with. All of it is one SoC family, one model (Inkling 2 Small NVFP4), TP4, one governor, self-measured.docs/performance-work.mdasks for baseline-matched comparisons of complete graph latency and throughput throughflare run CORE; a same-server placement A/B is a good complement but should be labelled as such.
Simpler way to the same end
Pin from Rust, not from C. A new pthread_create inherits the creating thread's affinity mask across the roce_start boundary (helios/src/execution/roce.rs:295). So calling the existing prefer_high_capacity_cpus() on the Rust thread immediately before roce_start — or once in RoceTransport::connect — restricts proxy_main to the same high-capacity subset with zero change to roce_proxy.c, no duplicated C scanner, no vendored-file divergence, and no dependency on FlashInfer PR #156. The thread naming (pthread_setname_np → "flare-roce") is a diagnostic nicety; if it is wanted for nsys attribution, it can be set from Rust via libc::pthread_setname_np after start, or accepted as a separate, clearly-labelled minimal divergence. This deletes roughly 70 lines of C and the entire lockstep problem.
Two even smaller options to weigh honestly: systemd CPUAffinity=/taskset on the serving unit solves it with no code at all (but does not help operators who don't set it, so the code path has value); and a one-line SCHED_FIFO/nice adjustment would not fix placement, so it is not a substitute.
Recommendation
Worth it with changes. Keep the idea, the Rust helper, the tests, and the Rust call sites. Required before merge:
- Delete
pin_high_capacity_cpus()fromroce_proxy.c; pin the proxy by restricting the Rust thread that callsroce_start(roce.rs:295). This alone satisfies the "keep the vendored proxy identical" rule inroce_proxy.c:6-8anddocs/roce-ring.md:361-364and removes the FlashInfer #156 coupling. - Stop the mask leaking onto offload/image/selene threads: either narrow only the execution/replay threads and pin
flare-modelnarrowly after the store and image worker are constructed, or restore the original mask on the threads that create long-lived I/O workers. At minimum, measure it — the current 2-hour soak would not have caught an offload thread landing on a P-core. - Update
docs/prefix-cache-offload.md:863-867(and add a short note where critical-thread placement belongs) so code and docs agree; record why 90% and why a two-CPU floor. - Make the same-process TP rank threads (
threaded.rs:652) explicit rather than relying on inheritance, or document the inheritance contract. - Reframe the claimed benefit to lead with the patch-vs-
mainmeasurements (CV,RoceOneshotLaunch, wake gap) and label the +17.2% C8 figure as a placement A/B, perdocs/performance-work.md.
With those changes it is a small, model-agnostic, off-by-default improvement aimed exactly at the hardware in the charter's vision, backed by measurements that are better than the bar the charter sets. As written, points 1-3 are the reason I would not merge it today.
Full report · Notes Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.
Prose
Verdict: blocking issues
Blocking:
- helios/native/roce_proxy.c:6-8 (+ NOTICE:18-19, docs/roce-ring.md:360-364): the PR edits the vendored FlashInfer proxy but the three documents that state its implementation is unchanged / must stay identical to the pin are not updated.
Should fix:
- PR description, Claimed Benefit/Supporting Evidence: no reproduction command for any measurement (AGENTS.md:110-112) and no statement of how the pinned vs unpinned arms were produced, so the 144.88 vs 123.66 tok/s A/B cannot be tied to this patch rather than to core capability; 48/48 vs 4/4 mixes denominators.
Nits: 3 — (1) eos/src/unix.rs:212-214 says the no-op covers "non-Linux targets" but the stub it means is eos/src/windows.rs:220; (2) nothing records that an unreadable/zero cpu_capacity makes the restriction silently not happen (eos/src/unix.rs:228-233, roce_proxy.c:1528-1535); (3) cold-prefill range "+2.6% to +17.3%" leaves the +2.6% endpoint unattributed by context size and "more than an order of magnitude" (Why) understates the reported 61×.
Compliant and worth stating: the description does follow AGENTS.md's four-part order (why / what changed / claimed benefit / evidence), distinguishes measured from expected, discloses the x86_64 no-op path and the uncompiled Windows stub, and carries Discord: woooflet.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/576
Conventions
Verdict: should-fix issues only Blocking:
- None. Should fix:
- helios/native/roce_proxy.c:1505-1570:
pin_high_capacity_cpus()duplicates eos/src/unix.rs:172-245 line for line (same sysfs path, 90% threshold, midpoint fallback, gate), and is an unmarked Flare-local change to a file that roce_proxy.c:6-8, NOTICE:18-19 and docs/roce-ring.md:361-364 require to stay identical to the pinned upstream source. Should fix: - helios/native/roce_proxy.c:1575:
pthread_setname_np(..., "flare-roce")is a second unmarked local behaviour change to the same vendored file; mark it and record the divergence where the parity procedure lives (docs/roce-ring.md:355-364, docs/TODO.txt:80-86). Nits: 4 (helper hardwires policy and returns()like no other eos helper that reports outcome;sched_setaffinityerror discarded at unix.rs:244;#[cfg(not(target_os = "linux"))]stub at unix.rs:247-248 repeats windows.rs:219-220; new call sites useflare_eos::directly instead of thecrate::os::shim used by the 20 other OS calls; no design/operating doc records the affinity policy despite docs/prefix-cache-offload.md:863-867 setting that bar). Link: https://github.com/NVIDIA/hyperflare-inference/pull/576
Simplicity
Verdict: should-fix issues only Blocking:
- None. Should fix:
- eos/src/unix.rs:172-245 and helios/native/roce_proxy.c:1505-1570: the 90%-threshold/midpoint-fallback/two-CPU-floor policy is written twice, in two languages; the C copy also breaks the repo's "keep the vendored proxy identical to upstream" rule (docs/roce-ring.md:362-364). Narrow the creating thread before roce_start in helios/src/execution/roce.rs and delete the 66 C lines.
- helios/src/execution/worker.rs:71 and helios/src/replay.rs:174: these narrow only ignition preparation/qualification threads, where the PR reports no benefit and timings are diagnostic only (docs/design-review.md:112), while the genuinely critical same-process TP rank thread flare-rank-{n} (helios/src/execution/threaded.rs:652) gets no call. Keep runtime.rs:568 + parallel.rs:539 and drop the two, or also narrow threaded.rs:654 — and state the rule, not a file list. Nits: None. Link: https://github.com/NVIDIA/hyperflare-inference/pull/576
Architecture
Verdict: blocking issues
Blocking:
- eos/src/unix.rs:172-245 + helios/native/roce_proxy.c:1505-1570: an unconfigurable, default-on host-scheduling policy with a magic 90%-of-max threshold (plus an undocumented midpoint fallback) is installed in the shared eos crate and the vendored proxy, with no recipe/config/CLI home — violating the charter's "No magic defaults", AGENTS.md:453-457 (settings have three homes) and AGENTS.md:188-193; the heuristic is also duplicated in Rust and C.
- PR description "Claimed Benefit": every number compares CPU placements within the change (X925 vs A725 launches), never branch-vs-main with
flare runon the same exported core, as the charter (#210) and docs/design-review.md:106-114 require.
Should fix:
- eos/src/unix.rs:228-233,244 and roce_proxy.c:1528-1536,1567: first unreadable sysfs file aborts the whole selection, and sched_setaffinity errors are discarded (
let _ =/(void)), so the claimed no-op semantics are unverifiable and errors are suppressed (AGENTS.md:182-186). - helios/src/execution/parallel.rs:539: the public
serve_rankentry point (used by flare-cli/src/main.rs:560 and heliopause/src/python.rs:548) now permanently narrows the calling thread's affinity as an undocumented side effect, before validation. - eos/src/unix.rs:254-314: only the pure selector is tested;
prefer_high_capacity_cpusand the entire C helper have no automated check, and the C helper is the path behind the headline result.
Nits: 5
Link: https://github.com/NVIDIA/hyperflare-inference/pull/576
Correctness
Verdict: should-fix issues only Blocking:
- None. Should fix:
- helios/native/roce_proxy.c:1505–1577: adds 71 Flare-only lines to the vendored proxy without updating the pinned FlashInfer rev, the "keep identical" header at lines 6–8, NOTICE/THIRD_PARTY_NOTICES, or docs/roce-ring.md:355–364; the next re-vendor silently drops the pin and thread name. Nits: 3 Link: https://github.com/NVIDIA/hyperflare-inference/pull/576
Correctness holds up otherwise. The Rust (eos/src/unix.rs:172–245) and C (roce_proxy.c:1510–1569) copies implement the same policy — same 90 % band (cap*10 >= max*9), same midpoint fallback, same "at least two CPUs" floor, 64-bit intermediates — and only ever narrow the thread's live sched_getaffinity mask, so operator cpusets and cgroups can't be widened. Absent/unreadable/zero cpu_capacity, homogeneous sets, single-tier cpusets and single-CPU sets all return early, covering x86_64 (no sysfs file), Windows (eos/src/windows.rs:219 stub) and non-Linux unix (eos/src/unix.rs:247). Every call site is the first statement on a freshly spawned thread — parallel.rs:539, worker.rs:71 ("flare-execution"), replay.rs:174 ("flare-cuda"), runtime.rs:568 ("flare-model"), roce_proxy.c:1576 in proxy_main (started in roce_start, joined in roce_stop) — so nothing races and nothing leaks to sibling same-host peer threads, which inherit the already-narrowed mask and no-op. sched_setaffinity errors are discarded on both sides, so no new failure surface, and ABI stays 14 with no format/protobuf change.
Nits: the policy is duplicated in Rust and C with no shared test or cross-reference comment (drift risk between the execution thread and the RoCE thread); the mask/sysfs half of prefer_high_capacity_cpus has no test (only the pure selector, unix.rs:254–314) and the cold one-time cost of statting up to 20 capacity files on the proxy thread before the doorbell loop is unmeasured; no documented opt-out for operators who want critical threads on efficiency cores.
Open: whether upstream flashinfer#156 lands (determines the pin fix), and whether cpu_capacity is trustworthy on every supported ARM host — both settle outside this repo.
Subtractive
Verdict: make it smaller first The change: +226 / −1 (7 files) Could remove: about 107 lines, in 4 places (≈47%), leaving ≈+119 in 6 files Biggest subtractions:
- helios/native/roce_proxy.c:1505-1570: delete the 66-line C
pin_high_capacity_cpus(a line-for-line copy of eos/src/unix.rs:172-248) and instead callflare_eos::prefer_high_capacity_cpus()one line beforeroce_startin helios/src/execution/roce.rs:295, whosepthread_create(roce_proxy.c:1674) makes the proxy inherit the creator's mask; keep thepthread_setname_np(…, "flare-roce")line: about 66 lines. - eos/src/unix.rs:195-204 + test 298-314: drop the three-tier midpoint fallback (the final
selected.len() >= 2guard at :205 already no-ops a sub-2 selection); the min/max loop (:176-184) and the redundantmin_cap == max_capreturn (:185-187) fall out with it, replaced by a 14-line function: about 36 lines. - helios/src/replay.rs:171-176: restore the single-line
.spawn(move || run(...)); the closure exists only to pin aflare-cudareplay worker the native server never spawns: about 4 lines. - helios/src/execution/worker.rs:71: drop the pin on
ExecutionWorker, whose own doc comment (:36-37) calls it the bootstrap/qualification surface used only by tp4_collective and heliopause: about 1 line. Left behind: None. (A pre-existing gap, not made worse: the real in-processflare-rank-Nthreads at helios/src/execution/threaded.rs:652-654 receive no pin — noted, not a proposed addition.) Link: https://github.com/NVIDIA/hyperflare-inference/pull/576
Pre Test Report
Pre-test report — PR #576: "Pin Helios execution and RoCE proxy threads to high-capacity CPUs on asymmetric Linux topologies"
Head reviewed: 3363573 (4b41ddc in some lenses). 7 files, +226 / −1. Author fordbmorris, GitHub association NONE (first-time contributor, no merged commits), Discord woooflet. No maintainer request, issue, triage label, review or CI run exists on the head.
1. Recommendation
❌ NOT REFERRED FOR HARDWARE TESTING — send back to the author
Reason: the code will change before it is worth any GPU time. Three of the review lenses call this blocking, one calls it "would not merge today", and I confirmed each of their concrete claims against the tree. This is not a case of "probably fine, let's measure it" — the change as written makes an unconfigurable, default-on scheduling decision for every Linux deployment, edits a file the repository promises is unchanged, and leaks the narrowed mask onto I/O threads it was not meant to touch. Testing it now would validate code that will not survive review.
Expected value of a hardware test today: near zero. Two independent reasons, in order of importance:
- The code is not test-worthy yet (quality/architecture, §2).
- Even a perfect test would prove little on the hardware we have (§3). The only asymmetric host (cn7) is a single GB10; the headline claim is a 4-node TP4
--roce-ringresult on 4× DGX Spark with ConnectX-7. The RoCE proxy path — the untested C helper, theflare-rocethread, the −31%RoceOneshotLaunchand the 61× wake-gap figures — cannot be exercised on cn7 or cn5 at all. cn5 is x86_64, where the feature is a guaranteed no-op. And neither host carries the recipe that was measured ("Inkling 2 Small NVFP4", fromlocal-inference-lab/hyperflare-recipes, not this repo), so the +17.2% / CV improvements are not reproducible here in principle.
A test engineer would spend hours and produce a report that says "on cn7 the threads landed on CPUs 5–9 and 15–19; on cn5 nothing changed" — which the author tells us is already true, and which proves nothing about the feature or about main versus this head.
2. What I verified myself (not taken on trust from the reviews)
Mechanism (eos/src/unix.rs:172-248, mirrored in roce_proxy.c:1505-1570): reads sched_getaffinity, then per-CPU /sys/devices/system/cpu/cpuN/cpu_capacity, keeps CPUs with cap*10 >= max*9 (unix.rs:192), falls back to cap*2 > min+max (:198-203) when fewer than two clear the band, applies only if 2 <= selected < allowed (:205), then sched_setaffinity. Four Rust call sites, one C call site, two empty stubs. Tests (unix.rs:254-314) cover only the pure selector.
The blocking problems
| # | Problem | Evidence I confirmed |
|---|---|---|
| A | The vendored proxy is no longer identical to its pin, and three documents still say it is. | roce_proxy.c:6-8: "Keep the source below identical so preparation and serving share the transport ABI." NOTICE:16-19: "Its implementation is unchanged from that revision; Flare adds a license and provenance preamble." docs/roce-ring.md:355-364: "keep the vendored source identical to the dependency after its provenance header." The PR adds +71 Flare-only lines and updates none of the three, nor the FlashInfer pin. NOTICE:18-19 is now a false statement about main. |
| B | The affinity mask leaks onto threads the PR never intended to narrow. | Real threading bug; most lenses missed it. runtime.rs:568 is the first statement of the flare-model thread; that same thread later spawns the offload/disk/image workers (runtime.rs:698 → offload/mod.rs:105 → selene/src/offload.rs:653,676; transfer.rs:509-511; runtime.rs:721 → ImagePreparation::new → runtime.rs:1011). On Linux a child inherits the parent's mask, so all of them silently land on the 10 high-capacity cores. transfer.rs:531 and disk.rs:470 then apply SCHED_BATCH + nice to those very threads — which only helps if they are not sharing the model thread's cores. This contradicts docs/prefix-cache-offload.md:863-867 verbatim: "Both use SCHED_BATCH with a positive nice value to reduce contention with the model worker... Adding CPU affinity requires a serving-latency measurement that shows a benefit." The PR neither updates that paragraph nor measures the offload path. This is the finding I would lead with, and it is a genuine regression risk that a soak test with a vision/offload model would expose. |
| C | A magic-numbered, unconfigurable, default-on policy in the shared eos crate. |
No env var, no flag, no config field, no CLI option — the policy cannot be turned off. Violates charter "Be explicit and pin everything. No magic defaults" and AGENTS.md:453 ("A setting has one of three homes: the recipe declaration, the configuration file, or a command-line flag"). The 90% band and the midpoint fallback are unexplained literals. The author frames "no environment variables" as the virtue; it is the defect. |
| D | Errors are suppressed, so the claimed no-op semantics are unverifiable. | unix.rs:228-233 returns on the first unreadable capacity file, skipping readable CPUs too; unix.rs:244 let _ = sched_setaffinity(...); roce_proxy.c:1567 (void). AGENTS.md:182-186: "Do not remove validation, suppress errors, silently substitute execution paths." Nothing in a serving log tells an operator whether the policy applied — which also makes any hardware placement test depend on external tooling rather than the runtime. |
| E | No main-vs-head baseline. |
Every figure compares placements within the change (X925-placed vs A725-placed launches), not this head against main via flare run on the same exported core. Charter: "Performance PRs need benchmarks showing an actual speedup over main on a served workload (#210)." The description also never states how the A725 arm was produced (different binary? external taskset?), so the +17.2% cannot be attributed to this patch. |
Should-fix (would still block referral in aggregate)
- The only code that touches the system is untested, and the untested arm is the latency-critical one.
prefer_high_capacity_cpus(sysfs +sched_getaffinity/sched_setaffinity) and the entire C helper have no test at any layer.AGENTS.md:194-199requires tests to exercise the affected behaviour. The C copy is the path behind the headline RoCE result. - Duplication across two languages with no shared source and hand-synchronised thresholds — guaranteed drift, and only the Rust copy is tested.
serve_rank(parallel.rs:539, public API) now permanently narrows the calling thread's affinity before validation and before the persistent-worker rejection, as an undocumented side effect. Reached fromflare-cli/src/main.rs:560(not opened) and the Python pathheliopause/src/python.rs:548(not opened), where the caller thread returns to general use afterwards.- Two of four call sites are dead weight or misplaced:
worker.rs:71pinsExecutionWorker, whose own doc comment (worker.rs:36-37) calls it the bootstrap/qualification surface (used only bytp4_collective.rs(not opened) andheliopause);replay.rs:174pins a replay worker the native server never spawns. Meanwhile the genuinely criticalflare-rank-{n}threads (threaded.rs:652-654) get no explicit call and are covered only by accidental inheritance — though, per finding B, that inheritance is not a reliable mechanism to depend on. - Same-process TP peer ranks get the pin only through inheritance; undesigned and undocumented.
What is genuinely fine (so testing is not wasted on it)
- No ABI break: proxy ABI stays 14, no Protobuf/recipe/format change; existing cores load unchanged.
- The new mask is a strict subset of the live
sched_getaffinity, so operator cpusets and cgroups can never be widened — a correctly conservative intersection. - Error handling adds no new failure surface; every path degrades to the pre-PR behaviour.
- x86_64 and Windows are honest, documented no-ops.
- The unit tests are non-redundant and each asserts a distinct claimed behaviour. They already run in CI —
.github/workflows/native-serving.yml:47(not opened) runscargo test eos. Do not spend hardware time re-running them.
Also worth flagging as a process fact: the head commit has zero CI checks. The workflow that runs exactly the cited eos tests exists; it simply did not run. That gap should be closed before anyone considers hardware.
Minor / ignore for the referral decision: doc-comment wording (unix.rs:212-214 points at "non-Linux targets" when the stub it means is in windows.rs), a third redundant #[cfg] stub at unix.rs:247-248, flare_eos:: used directly instead of the crate::os:: shim, the unreachable-by-design three-tier fallback, an 8 KiB stack array in the C helper, and the +2.6% cold-prefill endpoint left unattributed.
3. Why the available hardware cannot settle this (verified)
| Host | Capability | Verdict for this PR |
|---|---|---|
| cn7 | 1 × GB10 (SM121), arm64, 10 CPUs for the job | The only asymmetric SoC — but a single node. The RoCE ring needs 2–16 ranks across multiple hosts over ConnectX-7 (docs/roce-ring.md:3,19,404; helios/src/execution/roce.rs:151). The C helper, the flare-roce thread, RoceOneshotLaunch and the 61× wake-gap claim are untestable. Also: a 10-CPU job allocation may already be a single tier, which would make the policy no-op for the wrong reason — a false negative. |
| cn5 | 4 × RTX PRO 6000 (SM120), x86_64, 4 GPUs one host | The feature is a guaranteed no-op here (no cpu_capacity sysfs). Useful only for the "no regression" claim. It does exercise the same-process TP path (threaded.rs:652) and the flare-model/flare-offload threads, so it is the right box for finding B — but only after the fix. |
| Both | Models: dinov2-base, GLM-5.3-Flash-NVFP4, Qwen3.8-27B-NVFP4/DFlash2, … | Neither carries "Inkling 2 Small NVFP4", the recipe behind every number in the PR. No main-vs-head A/B of the claimed figures is possible without new export work. |
One genuinely cheap, high-signal observation is available on existing hardware: the PR adds thread names (flare-roce, plus existing flare-model/flare-execution/flare-offload-N/flare-rank-N), so placement is directly readable with ps -L -o comm,psr or taskset -cp. That check is worth 15 minutes — but only against fixed code, and only as a smoke check, not as evidence.
4. What the author must fix before referral
Ordered; items 1–4 are the gate.
- Declare or remove the vendored-file divergence. Either pin the upstream revision so the FlashInfer source contains the helper, or update
roce_proxy.c:6-8,NOTICE:16-19anddocs/roce-ring.md:355-364to name the local addition and its removal condition.NOTICE's "unchanged" sentence must change either way. - Delete the C copy and pin from Rust.
roce_start's only caller isRoceTransport::connect(helios/src/execution/roce.rs:295) and a new pthread inherits the creator's mask, so one call beforeroce_startremoves ~66 lines and the entire lockstep problem. Keeppthread_setname_npifnsysattribution needs it, marked as a declared exception. - Fix the mask leak (finding B). Either narrow only the execution/replay threads and pin
flare-modelafter the store and image worker are constructed, or restore the original mask on threads that spawn long-lived I/O workers. And measure it — the author's 2-hour soak would not have caught an offload thread landing on a P-core. Updatedocs/prefix-cache-offload.md:863-867so code and docs agree. - Make the policy configurable or not-a-default. Give it one of the three sanctioned homes (a typed config field or a
flare run/Helios CLI flag taking an explicit CPU set), which also removes the magic 90% and the midpoint fallback. If it stays a heuristic, name the constant and justify the threshold on named hardware. - Stop suppressing errors — return a status/
Result(or one startup diagnostic line naming the applied set) so placement is observable, and do not uselet _ =. - Test the code that touches the system — factor the sysfs root into a parameter, assert the applied mask with
sched_getaffinity, and cover a negative case; add a host-side test for the C helper or state plainly that it is unverified by any automated check. - Move or justify the
worker.rs/replay.rscall sites and state the rule ("which threads are critical") rather than a file list; make theflare-rank-{n}coverage explicit. - Report a paired
main-vs-headflare runcomparison on the same exported core, with launch counts, dispersion, and the recipe/core identity. - Get CI to actually run on the head.
5. Proposed test plan — conditional, for re-review, not for now
Do not run this yet. It is provided so that when the author returns with items 1–6 addressed, testing can start immediately without re-derivation. Estimated cost if the code is fixed and a second GB10 host is made available: ~1.5 days. Without a second GB10 host: ~0.5 day on cn7 + ~2 hours on cn5, and the RoCE half stays unverified (say so in the report; do not pretend otherwise).
Stage 0 — gate (no hardware, ~30 min)
CI green on head (native-serving.yml (not opened)), including cargo test eos. Unit tests for prefer_high_capacity_cpus (mask applied + no-op) and a C helper test present. Docs consistent (NOTICE, roce_proxy.c header, roce-ring.md, prefix-cache-offload.md). Stop here if any fails.
Stage 1 — placement smoke, cn7, ~1 hour (highest value per minute)
- Confirm the topology the job actually sees:
cat /sys/devices/system/cpu/cpu*/cpu_capacityandtaskset -cp $$. If the job cpuset is already a single tier, the test is void — report and stop. - Run a short native serving session on a model present on the host.
ps -L -o comm,psr(ortaskset -cp) and record the CPU set forflare-model,flare-execution, and anyflare-rank-N.- Assert: each critical thread is confined to the high-capacity tier, and the set is a subset of the original mask.
- Run 5 launches, not 1, and record placement per launch — the claim is about variance, so a single launch cannot confirm or refute it.
- Observe the leak from finding B: with an offload/vision-enabled configuration, record the CPU set of
flare-offload-Nand the image-preparation thread. Expected today: they are on the high-capacity tier, contradictingdocs/prefix-cache-offload.md:863-867. Expected after the fix: they are not. This is the single most valuable check the PR needs.
Stage 2 — no-op / regression, cn5, ~2 hours
- x86_64: confirm a startup session succeeds unchanged and that thread masks equal the inherited process mask (the documented no-op). One session, not a matrix.
- Reuse the existing 4-GPU single-host TP path to confirm the same-process
flare-rank-Nthreads and the offload threads still start and serve correctly; run one short standard benchmark againstmainto catch a regression. Do not run a throughput sweep — x86 is not the target.
Stage 3 — the actual claim (needs 2× GB10 with ConnectX-7; not available today)
- Paired A/B:
mainvs this head, same exported core,flare run --roce-ring, ≥5 launches per arm; report per-launch and dispersion. - Metrics: launch-to-launch CV,
RoceOneshotLaunchsum, p90 inter-graph wake gap, decode tok/s. - Separately label a placement A/B (X925 vs A725 of the same binary, forced externally via
taskset) — this confirms the mechanism, not the patch. Keep the two A/Bs distinct in the report; conflating them is exactly the flaw in the current evidence (finding E). - One offload-enabled session with an offload/prefix-cache workload, measuring input-upload/completion-download latency and per-token latency against
main— this is the measurementdocs/prefix-cache-offload.md:866-867requires before affinity on transfer threads can be justified, and it is the check for the finding-B regression on real serving. - Skip: soak beyond ~1 hour (the author's 2-hour soak is adequate and reruns add little), and any re-run of unit tests already covered by CI.
Explicitly not worth testing, ever, in this PR
- The pure
select_high_capacity_cpusselector — CI already covers it. - x86_64 throughput — the documented no-op path.
- The Windows stub beyond a compile check.
- Anything on a homogeneous cpuset: the policy is a no-op there by construction.
6. Bottom line
The problem is real and squarely inside the charter's target hardware (DGX Spark/GB10), the idea is sound, and the author's measurement work is better than the bar this project usually gets. But as submitted the change (a) edits a file three documents promise is unchanged, (b) silently narrows the mask of offload, disk and image-preparation threads against an explicit documented policy, (c) installs an unconfigurable magic-numbered default in shared code, and (d) rests on evidence that never compares against main. Items (a)–(c) will change the code; item (b) is a real regression risk that needs a before/after measurement on hardware we can actually use.
Refer to testing only after the author returns with items 1–6 of §4 addressed. At that point Stage 1 (cn7) and Stage 2 (cn5) are cheap, well-targeted, and Stage 1.6 alone would justify the trip by either confirming or refuting the mask leak. Stage 3 needs a second GB10 host that we do not currently have; flag that dependency at referral time rather than discovering it mid-test.
code review summary
Recommendation: Changes Requested
The affinity mechanism is sound and well-evidenced for its target, but it ships as a silent default-on policy with a magic constant, duplicates itself into a vendored file that must stay byte-identical upstream, and is backed by measurements that never compare head to main.
- Blockers: 2
- Should fix: 4
- Subtractive suggestions: 3
- Nits: 4
Blockers. (B1) A default-on, unconfigurable host-scheduling policy with magic 90%/midpoint constants in the shared eos crate, reached from four thread entries plus the RoCE proxy; no flag, config field, env var, return value or opt-out (eos/src/unix.rs:190-216), violating the charter's "No magic defaults" and AGENTS.md:453-457. No arch guard exists anywhere, so the "x86_64 is a no-op" promise rests only on the kernel not exposing cpu_capacity. (B2) The vendored proxy is no longer identical to its pin — 71 unmarked Flare-local lines at roce_proxy.c:1505-1577 — contradicting roce_proxy.c:6-8, NOTICE:18-19 and docs/roce-ring.md:360-364, while the same policy is reimplemented element-for-element in C; four lenses converged here. Preferred fix is subtractive: delete the C copy, keep the two-line setname, and pin from RoceTransport::connect before roce_start (with the caveat that connect runs on the process main thread, so a short-lived opener thread is the safer variant).
Should fix. No main-vs-head baseline, no reproduction command, undefined A/B arms, mixed placement denominators (S1); silent failure paths with let _ = / (void) on sched_setaffinity, making the placement claim unfalsifiable (S2); the sysfs/syscall half has no test at any layer and neither does the C helper (S3); public serve_rank now narrows the calling thread before validation, undocumented, and the Python caller reuses that thread (S4).
Subtractive. ≈107 of +226 lines (≈47%) removable: the three-tier midpoint fallback plus its test (the :205 guard already no-ops a sub-2 selection, and removing it makes the min/max loop and min==max guard redundant), and the two non-serving call sites (flare-cuda, flare-execution). eos/src/windows.rs:219-220 must be kept. Correction no lens had: the "missing threaded.rs site" objection is void — production ThreadedExecutors are built inside already-narrowed parents, so deleting those two calls costs no coverage.
Nits. Shim bypass/redundant cfg arm/pub selector/eos placement; doc-vs-code mismatches including one test passing for the wrong reason; description prose (misattributed +2.6% prefill endpoint, "order of magnitude" vs the reported 61×); 8 KiB C stack arrays and one sysfs open per CPU on the startup path.
All 13 survivors are live at head: the PR has zero reviews, zero inline comments and zero CI checks — only an autobot case-file notice.
Final review
Recommendation: Changes Requested
The core change is well-targeted at DGX Spark (GB10, explicitly in the Charter's vision), preserves operator cpusets without adding flags or environment variables, and demonstrates real placement-variance improvements. However, two concrete defects block merge: the PR silently diverges the vendored helios/native/roce_proxy.c from its pinned FlashInfer source (making NOTICE factually false while duplicating 66 lines of untested C), and calling prefer_high_capacity_cpus() at the top of flare-model leaks the P-core-only mask onto prefix-cache offload, disk, and image-preparation background threads.
Blockers
-
Vendored
helios/native/roce_proxy.cdiverges from its pinned FlashInfer source, falsifiesNOTICE, and duplicates 66 lines of untested C.- Evidence:
helios/native/roce_proxy.c:6-8("Keep the source below identical so preparation and serving share the transport ABI"),docs/roce-ring.md:360-364("keep the vendored source identical to the dependency after its provenance header"), andNOTICE:16-19("Its implementation is unchanged from that revision; Flare adds a license and provenance preamble") all require the vendored proxy body to remain unchanged relative to the pinned FlashInfer commit. - This PR adds 71 lines of Flare-local C (
helios/native/roce_proxy.c:1505-1577:pin_high_capacity_cpus()pluspthread_setname_npand the call inproxy_main) without updatingNOTICEordocs/roce-ring.md, duplicates the Rust capacity-selection logic fromeos/src/unix.rs:172-245with zero tests (compiled only under--features roce, enabled on Linux aarch64 inflare-cli/Cargo.toml:43-44), and introduces lockstep coupling with an unmerged FlashInfer PR (#156). - Fix: Remove all changes to
helios/native/roce_proxy.c. Becauseroce_startcreates the proxy thread viapthread_create(&c->thread, NULL, proxy_main, c)(helios/native/roce_proxy.c:1674) with no thread-local setup (roce_proxy.c:1661-1681), a new pthread inherits its creator's CPU affinity mask on Linux. Pin the proxy from Rust around the soleroce_startcall inRoceTransport::connect(helios/src/execution/roce.rs:295) — either by saving/restoring the calling thread'scpu_set_taroundprefer_high_capacity_cpus()+roce_start, or by invokingroce_starton a short-lived starter thread that narrows its own affinity first. Do not simply callprefer_high_capacity_cpus()directly onconnect's caller thread, asconnect()runs on the process main thread (flare-cli/src/main.rs:549,613,flare-cli/src/cluster.rs:203,250) before HTTP/dashboard/offload threads are spawned. Leave"flare-roce"thread naming for an upstream FlashInfer change and normal re-vendor.
- Evidence:
-
Affinity mask inheritance leaks from
flare-modelonto offload transfer, disk, and image-preparation threads, contradictingdocs/prefix-cache-offload.md.- Evidence:
helios/src/server/runtime.rs:568callsprefer_high_capacity_cpus()at the start of the"flare-model"thread. Later inside that same thread closure:helios/src/server/runtime.rs:698callscrate::offload::open(prepared, gpu_cubins)→helios/src/offload/mod.rs:109→flare_selene::offload::open(selene/src/offload.rs:645,653,663,676), which spawns the"flare-offload-{rank}"transfer threads (helios/src/offload/transfer.rs:509-536) and the"flare-offload-disk"checksum/direct-I/O thread (selene/src/disk.rs:358-370);helios/src/server/runtime.rs:720-721callsImagePreparation::new(worker_input_store)(helios/src/server/runtime.rs:1011), which spawns the image decoding/resizing worker thread.
- Because Linux
pthread_createinherits the parent thread's CPU affinity mask, all of these background CPU/I/O threads are silently confined to the same high-capacity P-cores reserved forflare-modelandflare-roce, preventing the scheduler from running checksums, offload transfers, and image preparation on the efficiency cores. - This directly contradicts
docs/prefix-cache-offload.md:863-867, which keeps offload transfer and disk threads onSCHED_BATCH+ positive nice across the full allowed cpuset to reduce contention with the model worker and states: "Adding CPU affinity requires a serving-latency measurement that shows a benefit." - Fix: Move the
prefer_high_capacity_cpus()call inhelios/src/server/runtime.rsto aftercrate::offload::openandImagePreparation::new(immediately beforeworker.run(&mut executor)at line 726), and add an explicitcrate::os::prefer_high_capacity_cpus()call inside the same-process TP peer threads (helios/src/execution/threaded.rs:655,"flare-rank-N"), which currently rely on implicit inheritance fromflare-modelviaRankExecutor::new(runtime.rs:585→helios/src/execution/ranks.rs:34-36). This keeps background offload/disk/image threads on the full process cpuset (preservingdocs/prefix-cache-offload.md:863-867) while explicitly pinning every critical execution thread.
- Evidence:
Should Fix
- Benchmark evidence omits baseline identification, reproduction commands, and the complete cold-prefill ladder (
AGENTS.md:103-112).- The GB10 measurements are substantive and the
+17.2%C8 64k decode result is appropriately labeled as a controlled same-server placement A/B. However, perAGENTS.md:103-112("Reproduction commands must identify the required inputs and configuration directly or through a precise reference") and the Charter ("benchmarks showing an actual speedup overmainon a served workload"):- State the exact baseline commit/binary for the 4 unpinned launches (confirming
mainvs PR on the same exported core) and how the same-server C8 A/B arm switched placement (e.g.,taskset -cp); - Include the concrete reproduction commands (Orbit launch flags, decode/prefill benchmark invocations, and the
nsys --cuda-graph-trace=nodecommand); - List the remaining 32k/64k/128k points of the 8k–128k cold-prefill ladder (the description quotes
+2.6%to+17.3%but only shows 8k+17.3%and 16k+9.2%, leaving where+2.6%occurred unstated).
- State the exact baseline commit/binary for the 4 unpinned launches (confirming
- The GB10 measurements are substantive and the
Subtract / Simplify
- Delete
pin_high_capacity_cpus()(helios/native/roce_proxy.c:1505-1570, −66 C lines) and pin the proxy from Rust aroundroce_start(helios/src/execution/roce.rs:295).- Eliminates the untested duplicate C implementation and removes the cross-repo coupling to FlashInfer PR #156 (resolving Blocker #1).
Nits
- Route Helios calls through
crate::os::and keepselect_high_capacity_cpusprivate (helios/src/os.rs:8,eos/src/unix.rs:172).- All existing Helios OS calls use
crate::os::*(helios/src/offload/transfer.rs:282,helios/src/runtime_core/protection.rs:356(not opened), etc.) rather thanflare_eos::*directly; switching the new Helios call sites tocrate::os::prefer_high_capacity_cpus()keeps them consistent. - Change
pub fn select_high_capacity_cpus(eos/src/unix.rs:172) tofn select_high_capacity_cpus. Becauseeos/src/lib.rs:12re-exportspub use unix::*;only on Unix andeos/src/windows.rsdefines no matching function, making this internal helper private keepsflare_eos's public API symmetric across platforms while keeping its unit tests intact.
- All existing Helios OS calls use
- Defer
prefer_high_capacity_cpus()past manifest validation inserve_rank(helios/src/execution/parallel.rs:539-550).serve_rankis apub unsafe fnthat currently narrows the caller thread's affinity at line 539 before rejecting invalid manifests at lines 540–550 (including in unit tests such ashelios/src/execution/parallel/tests.rs:698(not opened)). Moving the call below validation (and adding one line to the doc comment noting the thread-affinity adjustment) avoids mutating caller affinity on rejected inputs.
Verified passes
- Selection arithmetic and bounds safety (
eos/src/unix.rs:172-245):u64::from(cap)widening prevents overflow in both the 90% and midpoint comparisons;selected.len() >= 2 && selected.len() < allowed_with_capacity.len()guarantees no single-core collapse and strict no-op on homogeneous or single-tier cpusets;0..size_of::<cpu_set_t>() * 8matchesCPU_ISSET/CPU_SETbounds. - Operator cpusets preserved:
nextis constructed strictly from CPUs already set insched_getaffinity(0, ...), so operatortaskset/cgroup/systemd cpusets are never widened and single-tier cpusets are untouched. - No ABI, Protobuf, core-format, or env-var regressions: Proxy ABI stays 14 (
helios/src/execution/roce.rs:23), no environment variables are read (AGENTS.md:449-452), no per-model branches are introduced, andeos/src/windows.rs:220+eos/src/unix.rs:247-248preserve cross-platform compilation. - Unit tests (
eos/src/unix.rs:254-314): Cleanly verify GB10 two-tier (718–731vs997–1024), homogeneous, efficiency-only, performance-only, single-CPU, zero-capacity, and three-tier topologies.
Dropped on verification
- Upstream B1 (Default-on unconfigurable heuristic / magic 90% constant / no arch guard): Refuted —
eos/src/unix.rs:67-101already uses default-on best-effort OS scheduling/advisory hints (lower_prioritywithSCHED_BATCH,release_page_cache,MADV_HUGEPAGE,raise_open_file_limit),AGENTS.md:188-190discourages unnecessary configuration switches, operator cpusets are strictly preserved, and relying on the kernel's topology-agnosticcpu_capacitysysfs ABI without hardcodingtarget_archis sound. - Upstream S2 (Silent failure /
let _ = sched_setaffinity/ "unfalsifiable in field"): Refuted — returning()matcheslower_priorityandrelease_page_cacheineos/src/unix.rs:67-83, bailing out on unreadablecpu_capacityis the safe no-op contract for x86_64/hotplug races, and live thread affinity is directly observable via/proc/<pid>/task/<tid>/status,taskset, andps. - Upstream S3 (Untested syscall wrapper in
eos/src/unix.rs): Dropped as a standalone Should Fix — the untested 66-line C duplicate is eliminated by Blocker #1, while the 28-line Rust glue ineos/src/unix.rs:216-245is clean and its selection logic is covered by three unit tests (unix.rs:254-314). - Upstream S4 (Python callers reuse the thread after
serve_rank): Refuted for production callers — bothignition/preparation/host_ranks.py:701-720andignition/preparation/rank_group.py:119-140immediately close resources and exit afterserve_rankreturns; only the pre-validation call ordering and doc note remain as Nit #2. - Value Prop #4 (Rewrite
docs/prefix-cache-offload.md:863-867as a repo-wide affinity gate): Refuted —docs/prefix-cache-offload.md:863-867specifically governs offload transfer and disk threads; fixing Blocker #2 so those threads do not inherit the narrowed mask keeps the existing doc accurate without edits. - Upstream SUB1 (Delete 10-line three-tier midpoint fallback and its test): Dropped — 10 lines of pure, zero-overhead defensive Rust with a valid unit test (
eos/src/unix.rs:195-204,298-314) is neither dead code nor substantial duplication. - Upstream SUB2 (Delete
worker.rsandreplay.rscall sites): Dropped — only 4 net lines, andExecutionWorkerbacksflare_heliopause.GraphExecutor(heliopause/src/python.rs:360-414), which drivesignition benchand qualification on GB10 where consistent P-core placement is beneficial. - Upstream N1 sub-items ("redundant"
#[cfg(not(target_os = "linux"))]arm ineos/src/unix.rs:247-248, placement ineos/): Refuted —unix.rscompiles on allcfg(unix)targets (including macOS/BSD) wheresched_getaffinityis absent, so:247-248is disjoint fromwindows.rs:220and required for non-Linux Unix builds;eos/is the designated host-OS crate perAGENTS.md:20-21. - Upstream N2 (Doc comments disagree with code /
performance_onlytest passes for wrong reason): Refuted —eos/src/unix.rs:196-197,212-214accurately describe the behavior, andperformance_only(997/1017/1024) passes for the right reason (all CPUs clear the 90% band, soselected.len() == allowed_with_capacity.len()returnsNone). - Upstream N3 ("more than an order of magnitude" vs
61×): Dropped —61×is more than an order of magnitude; the omitted cold-prefill points are folded into Should Fix #1. - Upstream N4 (8 KiB stack arrays in C & sysfs page-cache misses): Dropped — the C stack arrays vanish with Blocker #1, and
sysfsreads are virtual kernfs reads once at thread startup, not disk page-cache misses.
Full report Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.
screen malicious
Screen Result: All Clear
Evidence:
PR #576 (head 4b41ddc, +226/−1, 7 files) contains no prompt injection or agent-targeting content.
The diff is what the description claims, and nothing more: select_high_capacity_cpus / prefer_high_capacity_cpus in eos/src/unix.rs (216, tests ~254–314), a no-op stub at eos/src/windows.rs:220, the mirrored C helper pin_high_capacity_cpus at helios/native/roce_proxy.c:1510 called from proxy_main at 1575–1576 alongside pthread_setname_np(..., "flare-roce"), and four one-line call sites (helios/src/execution/parallel.rs:539, execution/worker.rs:71, replay.rs:174, server/runtime.rs:568). All new I/O is sysfs reads; there is no exec, network, credential, CI, hook, or agent-config change, and no hidden files.
Sweeps of the new code for ignore previous, disregard, you are an, system prompt, assistant:, curl, wget, base64 -d returned no matches; broader URL/exec sweeps hit only the SPDX header and an unrelated pre-existing comment. Added comments are ordinary prose about cpu_capacity, GB10 core tiers and WFET.
Discussion is benign: two flare-autobot automation posts and one CHANGES_REQUESTED review from maintainer original-el8 covering affinity inheritance by child threads, keeping roce_proxy.c identical to pinned FlashInfer source (FlashInfer PR #156), and commit/sign-off hygiene. None directs an agent anywhere.
One benign observation, not injection and not author-authored: the repo's flare-autobot comments link off-repo autobot.eidonix.com pages and say "Have your agent review the Full Review." I treated that as material, did not follow it, and did not fetch those pages. The description's only substantive off-repo link is the paired local-inference-lab/flashinfer/pull/156, stated to have no wire/ABI dependency.
Repo context: docs/design-review.md defines an agent Design-Signed-Off-By convention that would make a plausible coercion target, but no such coercion or fabricated trailer appears here.
Full report · Notes decide malicious: all_clear (100%): No malicious content found
explore
Author: fordbmorris (GitHub association NONE — not a member; first-time contributor with no merged commits; Discord woooflet per the PR body)
Motivation: On GB10 the CPU has two tiers of cores and Linux may put Helios's two busy-spinning serving threads (CUDA execution and the native RoCE proxy) on the slow ones, which the author says hurts one-shot collective latency and adds jitter. The PR makes each of those threads, at startup, read the kernel's per-CPU capacity and silently move itself onto the fast cores only.
Scale: +226 / −1 lines in 7 files
Proposal:
- Add
select_high_capacity_cpus/prefer_high_capacity_cpustoeos/src/unix.rs(90%-of-max threshold, ≥2 CPUs, no-op when homogeneous or cpuset-restricted) plus a Windows stub and 3 unit tests. - Call it as the first statement of the
flare-model,flare-executionandflare-cudathreads and ofserve_rank. - Insert a 71-line duplicate of the same helper, plus
pthread_setname_np("flare-roce"), into the vendoredhelios/native/roce_proxy.c. Touches: helios/native/roce_proxy.c— vendored FlashInfer proxy edited in place, breaking the NOTICE byte-identical claimhelios/src/server/runtime.rs— the call is the first statement of theflare-modelclosure, so every child thread it later spawns inherits the narrowed fast-core maskeos/src/unix.rs/helios/src/execution/parallel.rs— new affinity helper and the peer-rank entry point Related items:- #280 Park the serving loops on a frame-completion word in WFET on GB10 (merged): edits the same functions; this PR stacks on it
- #353 WFET-based Engram wait (closed): maintainers' recent "shows no benefit" ruling on the same class of change
- #577 roce_proxy ring mailbox window (open): same author, same vendored file, same parity question
- #279 Match native RoCE transport to the pinned FlashInfer proxy ABI 14 (merged): the resync-and-declare precedent this breaks
- #325 relay flag order (merged): the precedent for a declared local fix that flagged the upstream copy as outstanding
Link: https://github.com/NVIDIA/hyperflare-inference/pull/576
Autobot comments: Two findings from the earlier case file are now independently confirmed by both the bot review and
original-el8's CHANGES_REQUESTED review: the vendored-C divergence that falsifiesNOTICE:18, and the duplicate untested C helper. The event also forced two corrections to that earlier file: the "offload/disk/HTTP threads are untouched" claim is wrong (the affinity call is the parent of those demoted helper threads, so they inherit the fast-core mask), and the threaded-TP "gap" is really accidental coverage that the reviewer's own suggested fix would undo. Beyond that: head is now4b41ddc4with identical content, anarea:orbitlabel was added, CI still has not run at all, the commit message is stale against the description,Design-Signed-Off-By: Antigravitynames no model againstdocs/design-review.md:294-301, and itseb2fdigest no longer matches the checklist. The reviewers added no benchmark data, and nobody has mentioned the change's silence, the ≥2-CPU caveat, or the missing NOTICE/provenance updates.
Full report · Notes decide malicious: all_clear (100%): No malicious content found
explore
Author: fordbmorris (GitHub association NONE — not a member; first-time contributor with no merged commits; Discord woooflet per the PR body)
Motivation: On NVIDIA GB10 (DGX Spark) the ten fast Cortex-X925 cores and ten slow Cortex-A725 cores are mixed, and Linux sometimes schedules Helios's busy-spinning worker and RoCE proxy threads onto the slow ones, which the author says adds startup and per-graph jitter. The PR makes those threads read each CPU's kernel-reported capacity at startup and quietly confine themselves to the fast cores.
Scale: +226 / −1 lines in 7 files
Proposal:
eos/src/unix.rs: newselect_high_capacity_cpus(pure, unit-tested) plus Linux-onlyprefer_high_capacity_cpusthat intersectssched_getaffinitywith/sys/.../cpuN/cpu_capacity, keeping CPUs ≥90 % of the max (fallback: above the midpoint, minimum two) and callingsched_setaffinityon the calling thread; Windows no-op stub.- One call at the top of the
flare-model,flare-execution,flare-cudathread closures andserve_rank. - A logically identical 71-line C copy inside the vendored
helios/native/roce_proxy.c, pluspthread_setname_np("flare-roce"). - Silent and unconditional: no log, metric, flag, env var or config key, and
sched_setaffinityfailure is discarded. - Evidence is author-supplied only (48/48 threads on X925 across 6 launches, CV 4.82 %→0.72 %, +17.2 % C8 64k decode, 61× smaller p90 host wake gap); no raw traces, no alternating A/B against
main. Touches: helios/native/roce_proxy.c— a vendored file under an explicit byte-identical contract (roce_proxy.c:6-8,NOTICE:16-19,docs/roce-ring.md:361-364, and nowhelios/native/roce_proxy_dlopen.c:9). Editing it falsifies NOTICE and duplicates untested C.helios/src/server/runtime.rs— the call runs before the closure spawnsRankExecutor::new(:585),offload::open(:698) andImagePreparation::new(:721), so those demoted helper threads inherit the fast-core-only mask.eos/src/unix.rs— the selection logic itself, and the file merged #589 also rewrote (test added at:207-248), so a rebase is now needed. Related items:- #589 Fix CUDA 12 batched copies, Linux ARM64 release portability, and Selene unified-memory budgeting (merged): adds the Flare-owned
roce_proxy_dlopen.cwrapper that re-states byte-identity and provides the seam #576's C edit should have used. - #280 Park the serving loops on a frame-completion word in WFET on GB10 (merged): changes the same loops/functions; #576 stacks on it.
- #353 closed for showing no benefit (closed): the maintainers' most recent bar for GB10 thread-level changes.
- #577 roce_proxy: raise ring mailbox window to 16 (open): same author, same vendored file, same re-vendor/parity question.
- #279 Match native RoCE transport to the pinned FlashInfer proxy ABI 14 (merged): the precedent that changes here arrive as a declared resync.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/576
Autobot comments: The description never mentions that it edits a file whose header, NOTICE and docs assert it is unchanged from the pinned FlashInfer source; the local parity invariant and the needed NOTICE/docs updates go unmentioned (upstream FlashInfer #156 is named as a pairing only). Coverage is narrower and wider than claimed: same-process threaded TP
flare-rank-Nhas no direct call but inherits the narrowed mask, while theflare-modelcall also pins offload/disk/input/codec/image threads that were deliberately demoted to spill onto efficiency cores — a real defect, since confirmed by both flare-autobot and original-el8 (CHANGES_REQUESTED, 2026-11-28 22:12), which also flags a staleeb2fdesign-review digest and a model-lessAntigravitysign-off. Onlyserve_rankcovers the multi-host path; the only evidence covers two of five pinned threads. Zero CI has run, and the repo has no aarch64 runner, so the GB10 path is never executed. No issue or maintainer request backs the problem, and the behaviour has no opt-out or observability.
Amendment (event of 2026-11-29): the PR is unchanged, but main advanced under it. Merged #589 (ba3afb13, lukealonso, 2026-11-28 22:18) adds helios/native/roce_proxy_dlopen.c, a Flare-owned unit that #include "roce_proxy.c" at :236 and states "keeping the vendored roce_proxy.c byte-for-byte identical to FlashInfer" at :9; helios/build.rs:67-77 now compiles only that wrapper (:72, links dl/pthread :75-76). This adds a fourth, maintainer-authored witness to the invariant #576 breaks, and it is exactly the top-level seam that original-el8's blocker-2 remedy prescribes — so #576's in-vendor C helper now edits the one file meant to stay untouched. #589 also rewrote eos/src/unix.rs (new test at :207-248), so #576 needs a rebase with a possible mechanical conflict in the same mod tests block. Nothing on main competes: prefer_high_capacity_cpus does not exist there and no affinity code landed.
Classify intake
Selected: triage:review, performance
Threshold: 65%
Triage
- [✓]
triage:review: 91.2% -
triage:design-review: 8.5% -
triage:validation: 0.2% -
none: 0.1% -
triage:investigate: 0.0% -
triage:superseded: 0.0% -
triage:integration: 0.0% -
triage:partial: 0.0% -
triage:verify-for-closure: 0.0%
Priority
-
none: 99.8% -
priority:P1: 0.2% -
priority:P2: 0.1%
Type
- [✓]
performance: 99.1% -
bug: 37.8% -
duplicate: 29.4% -
enhancement: 13.3% -
community: 10.7% -
documentation: 0.0%
Area
-
area:orbit: 26.9% -
area:rocenante: 5.3% -
area:scheduling: 2.6% -
area:selene: 1.8% -
area:preparation: 0.5% -
area:api: 0.4% -
area:kernels: 0.3% -
area:memory: 0.3% -
area:engram: 0.3% -
area:caching: 0.2% -
area:packaging: 0.1%
Model
-
model:nemotron-3.5-bolt: 0.6% -
model:glm-5.3: 0.5% -
model:qwen3.8-27b: 0.5% -
model:deepseek-v4: 0.4% -
model:kimi-k3.1: 0.4% -
model:inkling-small: 0.3% -
model:qwen3.8-flash-next: 0.3% -
model:mimo-v2.6: 0.3% -
model:deepseek-v4.1: 0.1% -
model:muse-glimmer: 0.1% -
model:gemma4: 0.1%
Apply Labels (Intake)
Applied: +triage:review, +performance
Value Proposition
Value Proposition — PR #576: Pin Helios execution and RoCE proxy threads to high-capacity CPUs
Charter alignment. The vision names SM120/SM121 workstations and DGX Spark explicitly, and the charter assigns scheduling to Helios ("Ignition writes recipes… Helios handles scheduling, caches, and requests"). A GB10 thread-placement change in eos/helios is the right layer for the right hardware — no per-model branch, no broad hardware expansion. Two real conflicts: (a) the 71-line helper inside helios/native/roce_proxy.c:1505-1570 breaks the byte-identity contract witnessed four times in-tree — roce_proxy.c:6-8, NOTICE:16-19, docs/roce-ring.md:361-364, and maintainer-authored roce_proxy_dlopen.c:7-9; (b) the pin is silent, unconditional, and unlogged (let _ = sched_setaffinity, (void)sched_setaffinity, no flag/env/config), which fails the charter's "be explicit… no magic defaults" rule.
Novelty & status. Genuinely additive. Not obsolete: search_code on main for prefer_high_capacity_cpus|select_high_capacity_cpus returns nothing; affinity appears on main only in docs/prefix-cache-offload.md:869-872. Not superseded: no open PR covers affinity (sibling #577 shares the vendored file only). But main is ten commits past the fork point (a39f6777), and #589 rewrote eos/src/unix.rs including the mod tests block #576 appends to — a rebase is required.
Value vs maintenance cost. Beneficiaries are the DGX Spark cohort the vision is built around. The claimed effect is large (graph-time CV 4.82%→0.72%, +17.2% C8 64k decode, p90 inter-graph wake gap 61× smaller), but all of it is author-supplied — no raw nsys traces, no alternating A/B against main, no described method for forcing A725 — and there is no aarch64 CI (native-serving.yml runs x86_64/Windows; release.yml builds arm64 only as an archive smoke), so the GB10 path is never executed by the repo. Cost is also mispriced: a duplicated, untested C helper plus an unintended scope defect — because the call is the first statement of the flare-model closure (runtime.rs:568), every later child thread (flare-rank-*, offload, kv-codec) inherits the X925-only mask although those are deliberately demoted to spill onto efficiency cores (docs/prefix-cache-offload.md:863-867).
Minimum changes for merge: rebase; drop the roce_proxy.c edit and route pin plus flare-roce naming through #589's roce_proxy_dlopen.c seam (the rename is the measurement instrument — preserve it); scope the mask so offload/codec threads aren't narrowed; make the behaviour observable/configurable; update THIRD_PARTY_NOTICES.md/docs/roce-ring.md; supply reproducible aarch64 evidence.
Verdict: Worth it with changes.
Note: the PR text and dossier were treated strictly as review material; neither contained instructions I followed.
Full report Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.
Subtraction and simplicity
PR #576 (head 4b41ddc4, 7 files, +226/−1) is not lean: the capacity-selection algorithm is written twice, and about a third of the added lines serve hardware the PR never runs on.
Findings, in value order:
- F1 (high) —
helios/native/roce_proxy.c:1505-1570is a 66-line line-for-line copy of the testedeos/src/unix.rs:172-210(samelen<2,min==max,cap*10 >= max*9, midpoint fallback,selected>=2 && selected<countgate), untested in either tree, and it edits the file whose header demands byte-identity (roce_proxy.c:6-8,NOTICE:16-19,roce_proxy_dlopen.c:7-9). Delete the helper; replace:1574-1577withpthread_setname_npplus one#[no_mangle] extern "C"call into the tested Rust (helios/src/os.rs:8already re-exportsflare_eos). After #589 that call lives in the Flare-ownedroce_proxy_dlopen.cthathelios/build.rs:72compiles. - F2 (medium) — delete the speculative three-tier fallback
eos/src/unix.rs:195-204, its test:298-314, and themin_capaccumulator (:176,178,182); no supported hardware needs it andAGENTS.md:188-193bans fallback layers without a concrete requirement. - F3 (low-medium) — collapse the two no-op stubs (
eos/src/unix.rs:247-248,eos/src/windows.rs:219-220) into one#[cfg(not(target_os = "linux"))]stub ineos/src/lib.rs; this dropswindows.rs— the file the PR admits was never compiled — from the diff. - F4 (low-medium) — 2 of 4 call sites are off the serving path:
helios/src/execution/worker.rs:71andhelios/src/replay.rs:174are reached only from Heliopause bindings and qualification tools; serving enters athelios/src/server/runtime.rs:568andhelios/src/execution/parallel.rs:539. Delete them or state capture placement is intended. - F5 (low) —
select_high_capacity_cpusispuband escapes viaeos/src/lib.rs:12with one internal consumer; make it private. - Convention —
docs/prefix-cache-offload.md:863-867already says "Adding CPU affinity requires a serving-latency measurement that shows a benefit", andAGENTS.md:57-60sends pending measurements todocs/TODO.txt; neither was updated, and the doc paragraph names the verySCHED_BATCHthreads whose spill room this change removes via inheritance fromruntime.rs:568.
Order: F1+F3 collapse ~70 added lines, F2 ~24 more, F4/F5 one line each.
Open: does the author rebase onto #589 and use roce_proxy_dlopen.c? Is preparation/capture pinning intended? Does the test module collide with #589's map_host test on rebase (unverified)?
Correctness and contracts
Lens review of PR #576 (head 4b41ddc, 7 files, +226/−1) against all changed files, their direct callers, the vendor-contract docs, the in-tree offload policy doc and CI. Eight findings: one Blocker, four Major, three Minor.
Blocker — the 71-line in-vendor C helper falsifies four in-tree witnesses of the "keep the vendored source identical" invariant (roce_proxy.c:6-8, NOTICE:18-19, THIRD_PARTY_NOTICES.md:48-52, docs/roce-ring.md:361-364), and #589 on main already supplies the Flare-owned seam (roce_proxy_dlopen.c, build.rs:72) that makes the C edit unnecessary.
Major — runtime.rs:568 runs before every later spawn in the flare-model closure, so ranks, offload, disk, image-prep and the rayon KV-codec pool all inherit the X925-only mask despite being deliberately demoted with SCHED_BATCH/nice precisely so they can spill onto efficiency cores — contradicting docs/prefix-cache-offload.md:863-867, which requires a serving-latency measurement for exactly this. The codec pool halves on the unmeasured encode path. parallel.rs:539 mutates the caller's own mask inside an unsafe fn that documents no such side effect, with no restore. flare-rank-* threads are pinned only by inheritance, so the reviewer's suggested Rust-side move would silently unpin them.
Minor — the ≥2-CPU floor ignores how many threads are confined; affinity failures and the 0.9 threshold are silent and unobservable; neither new affinity function ever executes in CI (x86_64 + Windows only), and the Rust and C twins already differ.
Claims verified: the x86_64 no-op. The "48/48 threads pinned" evidence is measured through a thread rename added by this same PR. Open: rebase conflict with #589's test in eos/src/unix.rs; whether the author will re-vendor or move the pin into the dlopen seam.
Final review
Recommendation: Changes Requested
Pinning latency-critical execution and RoCE proxy threads to high-capacity CPUs on asymmetric ARM64 Linux hosts (DGX Spark GB10) directly addresses a real scheduling jitter problem, and the core tier-selection helper in eos/src/unix.rs cleanly respects existing operator cpusets and no-ops on homogeneous or x86_64 systems. However, two concrete blockers remain (consistent with @original-el8's review, plus critical system-level interactions verified against main): (1) editing vendored helios/native/roce_proxy.c breaks its byte-identity contract with FlashInfer and duplicates 66 untested C lines when main (#589) already provides the Flare-owned roce_proxy_dlopen.c wrapper; and (2) pinning at entry to flare-model (helios/src/server/runtime.rs:568) leaks the narrowed X925-only mask to background offload, disk, image-prep, and KV-codec threads — halving the flare-kv-codec-* rayon pool on GB10 — while moving that call alone would silently unpin same-process threaded TP ranks (flare-rank-*).
Merge Risk
Level: High
- Vendored transport provenance & base-branch conflict: Direct edits to
helios/native/roce_proxy.cfalsifyNOTICE:16-19and collide conceptually withmain's #589 (ba3afb13), which moved compilation tohelios/native/roce_proxy_dlopen.cspecifically to keeproce_proxy.cbyte-for-byte identical to FlashInfer; #589 also modifiedeos/src/unix.rsin the samemod testsregion. - Unintended background-thread & codec-pool narrowing: Pinning at the start of
flare-modelconfinesSCHED_BATCH/nice(10)offload, disk, image-prep, andflare-kv-codec-*threads to performance cores and silently halvesflare-kv-codec-*parallelism viaavailable_parallelism()on prefix-cache workloads (unmeasured by this PR). - Zero aarch64 CI coverage:
native-serving.ymlruns only on x86_64 Linux and Windows, where/sys/devices/system/cpu/cpuN/cpu_capacitydoes not exist; neitherprefer_high_capacity_cpus()norpin_high_capacity_cpus()executes in CI.
Walkthrough
eos/src/unix.rs:172-248&eos/src/windows.rs:219-220: addsselect_high_capacity_cpus(filtering CPUs ≥ 90% of max capacity with a midpoint fallback and ≥ 2-CPU guard), Linuxprefer_high_capacity_cpus(reading/sys/devices/system/cpu/cpu{N}/cpu_capacityfor CPUs insched_getaffinityand applyingsched_setaffinity), non-Linux/Windows no-op stubs, and 3 unit tests forselect_high_capacity_cpus(:254-314).helios/src/server/runtime.rs:568: callsflare_eos::prefer_high_capacity_cpus()as the first statement of theflare-modelthread, prior toRankExecutor::new,crate::offload::open, andImagePreparation::new.helios/src/execution/parallel.rs:539: callsflare_eos::prefer_high_capacity_cpus()at entry toserve_rank(multi-host peer rank execution loop, before manifest validation).helios/src/execution/worker.rs:71&helios/src/replay.rs:174: callflare_eos::prefer_high_capacity_cpus()at entry to theflare-executionandflare-cudaworker threads.helios/native/roce_proxy.c:1505-1577: duplicates the Linuxcpu_capacityaffinity-narrowing logic in C (pin_high_capacity_cpus) and callspthread_setname_np(pthread_self(), "flare-roce")pluspin_high_capacity_cpus()at the top ofproxy_main.
Pre-merge Checks
- [PASS] Security / malicious screen: Read-only
/sys/devices/system/cpu/cpuN/cpu_capacityinteger reads and standard thread affinity/naming syscalls; no env vars, network I/O, or unsafe input handling. - [WARN] Charter & value fit: Right problem and right layer for DGX Spark, but editing vendored
roce_proxy.cbreaks an explicit in-tree invariant reinforced onmainby #589, and leaking affinity onto offload threads contradictsdocs/prefix-cache-offload.md:863-867. - [WARN] Related / duplicate / conflict check: No duplicate affinity work on
main, butmainis 11 commits ahead (50c876df), including #589 (ba3afb13) which addedhelios/native/roce_proxy_dlopen.c, changedhelios/build.rs:67-77, and added tests toeos/src/unix.rs:207-248(rebase required). Sibling open PR #577 by the same author also editshelios/native/roce_proxy.c. - [WARN] Tests & verification evidence: Unit tests cover only the pure
select_high_capacity_cpusselector;native-serving.yml:16-21,47,101-113runs x86_64 Linux + Windows only (rdmajob iscargo checkonly), so neither the Linux ARM64 affinity path nor the C helper runs in CI. All GB10 benchmark numbers are author-supplied and do not cover prefix-cache offload or CPU KV-codec workloads.
Blockers
-
Vendored
helios/native/roce_proxy.cdivergence and duplicated untested C logic (helios/native/roce_proxy.c:1505-1577)- Verified behavior & impact: Adding
pin_high_capacity_cpus()and calls insideproxy_mainmodifies a vendored FlashInfer file whose own header (helios/native/roce_proxy.c:6-8),NOTICE:16-19, anddocs/roce-ring.md:360-364explicitly require keeping identical to FlashInfer's pinned source. Since this PR branched, #589 (ba3afb13) merged onmainadding the Flare-ownedhelios/native/roce_proxy_dlopen.c:7-9,216-236(which#include "roce_proxy.c"and explicitly states "keeping the vendored roce_proxy.c byte-for-byte identical to FlashInfer") and updatedhelios/build.rs:69-74to compile onlyroce_proxy_dlopen.c. The 66-line C function also duplicateseos/src/unix.rs:172-245with no test coverage. - Concrete fix (choose one, after rebasing onto
main):- Preferred (zero vendored diff, zero duplicated C): Revert all edits to
helios/native/roce_proxy.c. Apply affinity from Rust aroundroce_start(self.context)inhelios/src/execution/roce.rs:295using a scoped save-and-restore affinity guard (savesched_getaffinity, callprefer_high_capacity_cpus(), callroce_start, then immediately restore the caller's mask). Important: Do not omit the restore —RoceTransport::connect(roce.rs:295) runs onflare-cli's main thread (flare-cli/src/cluster.rs:203,250) beforeBootstrap::load(flare-cli/src/main.rs:623),Server::start(:631), and peerjoin_peer(cluster.rs:254), so an unscoped pin there would narrow the entire process (shrinkingFrontend'sEncodeThreadBudgetathelios/src/frontend/mod.rs:334,1121and confining Tokio/HTTP and peer offload threads to X925). To preserve the"flare-roce"thread name (which the placement check relies on), wrap the singlepthread_createcall (roce_proxy.c:1674) inhelios/native/roce_proxy_dlopen.cvia#define pthread_create ...(matching its existingibv_*wrapper pattern at:216-232) and callpthread_setname_np(*thread, "flare-roce")on success. - Alternative: Land FlashInfer PR #156 first, re-vendor
roce_proxy.cverbatim from the updated pinned commit, and updateNOTICE:17to the new commit SHA.
- Preferred (zero vendored diff, zero duplicated C): Revert all edits to
- Verified behavior & impact: Adding
-
Child-thread affinity inheritance in
flare-modelconfines demoted background threads, halves the KV-codec pool, and hides a threaded-TP coverage trap (helios/src/server/runtime.rs:568,selene/src/shared/codec.rs:41,helios/src/execution/threaded.rs:652-655)- Verified behavior & impact: Because
flare_eos::prefer_high_capacity_cpus()is the first statement of theflare-modelclosure (runtime.rs:568), Linux affinity inheritance propagates the X925-only mask to every child thread spawned during startup:crate::offload::open(runtime.rs:698) →flare-offload-{rank}(helios/src/offload/transfer.rs:509-535, demoted viaSCHED_BATCH+NICEat:531) andflare-offload-disk(selene/src/offload.rs:676→selene/src/disk.rs:358-360,470,489-491, also demoted viaSCHED_BATCH+NICE).ImagePreparation::new(runtime.rs:721→runtime.rs:1011).- Downstream KV-codec regression: When
flare-offload-{rank}lazily initializesselene/src/shared/codec.rs:37-60(helios/src/offload/transfer/codec.rs:353,514,751),std::thread::available_parallelism()(selene/src/shared/codec.rs:41) honors the inheritedsched_getaffinitymask. On GB10 (10 X925 + 10 A725),flare-kv-codec-*silently shrinks from20 / 2 = 10threads to10 / 2 = 5threads, and all 5nice(10)codec workers (:52) are pinned onto X925 alongside the model worker and RoCE proxy — directly contradictingdocs/prefix-cache-offload.md:863-867("Adding CPU affinity requires a serving-latency measurement that shows a benefit"). - Subtle interaction with moving
:568:flare-rank-{1..N}in same-process threaded TP (helios/src/execution/threaded.rs:652-655) has no direct pin call and is currently pinned only by inheritingflare-model's mask viaRankExecutor::new(runtime.rs:585). Movingruntime.rs:568down to beforeworker.runalone will silently unpin all threaded-TP peer ranks.
- Concrete fix:
- Move
flare_eos::prefer_high_capacity_cpus();inhelios/src/server/runtime.rsfrom:568to right beforeworker.run(&mut executor)(:726), afterRankExecutor::new,crate::offload::open, andImagePreparation::newhave spawned their background threads. - Add an explicit
flare_eos::prefer_high_capacity_cpus();at entry to theflare-rank-*thread closure inhelios/src/execution/threaded.rs:654so same-process threaded TP ranks remain explicitly pinned without relying on parent inheritance.
- Move
- Verified behavior & impact: Because
Should Fix
-
Rebase onto
main(resolving #589 drift ineos/src/unix.rsandhelios/build.rs)main(50c876df) has 11 commits above this PR's base, including #589 (ba3afb13) which addedmap_host_advises_hugepages_and_prefaults_zeroed_pagestoeos/src/unix.rs:207-248and introducedhelios/native/roce_proxy_dlopen.c+helios/build.rs:67-77. Rebasing is required before merge and unlocks the Flare-owned wrapper for Blocker 1.
-
serve_rankmutates the caller's thread affinity permanently and before validation (helios/src/execution/parallel.rs:539)- Verified behavior & impact: Unlike the other call sites (which run on dedicated newly spawned threads),
serve_rankruns on the caller's thread (flare-cli/src/main.rs:560, which exits after return, andheliopause/src/python.rs:548, which runs on the Python interpreter thread insidepy.detach). Callingprefer_high_capacity_cpus()at:539narrows the caller's affinity even if early validation rejects the manifest (:540-550), never restores it on return, and is undocumented in# Safety(:529-532). (Note: do not delete pinning fromserve_rank, as it IS the peer execution loop for multi-host TP ranks 1..N.) - Concrete fix: Move the affinity narrowing after manifest validation (
parallel.rs:550) and use the same scoped save-and-restore RAII affinity guard recommended forroce_startin Blocker 1 so any caller (especially embedded Python viaheliopause) gets its original affinity mask restored on return.
- Verified behavior & impact: Unlike the other call sites (which run on dedicated newly spawned threads),
Subtract / Simplify
- Delete the 66-line C duplicate in
helios/native/roce_proxy.c:1505-1570(covered in Blocker 1) — eliminates the entire duplicated, untested C implementation in favor of the single unit-tested Rust helper ineos/src/unix.rs. - Delete the speculative three-tier fallback and its test (
eos/src/unix.rs:195-204,:298-314) — 27 lines that only trigger on three-tier SoCs (1 prime + mid + little cores), which are not a supported Flare target (AGENTS.md:188-193: no speculative compatibility/fallback layers). The existingselected.len() >= 2 && selected.len() < allowed_with_capacity.len()check at:205already guarantees the selector never collapses onto a single core. - Make
select_high_capacity_cpusprivate (eos/src/unix.rs:172) —eos/src/lib.rs:12usespub use unix::*;, leakingselect_high_capacity_cpusintoflare-eos's public crate API on Unix only (asymmetric with Windows) despite having no external callers. Change to#[cfg(any(target_os = "linux", test))] fn select_high_capacity_cpus(...)(gating avoids adead_codewarning on non-Linux Unix targets like macOS).
Nits
None. (Note: @original-el8's existing review item 3 regarding commit-message text and Design-Signed-Off-By hygiene remains to be addressed on rebase/amend.)
Dropped on verification
flare-input-records(selene/src/input.rs:268-271) claimed to inheritflare-model's narrowed mask: Verified false.InputStore::start_boundedis called insideselene/src/offload.rs:572(prepare_with_inputs, during core loading on the main thread) beforeModelRuntime::startextractsbinding.inputs()athelios/src/server/runtime.rs:531-534and spawnsflare-modelat:565.helios/src/frontend/mod.rs:333-337(default_parallel_encode_threads) claimed to share theavailable_parallelism()shrinkage hazard: Verified false under the current diff.Frontendis constructed athelios/src/frontend/mod.rs:1121viaBootstrap::load(flare-cli/src/main.rs:623) on the main thread beforeServer::start/ModelRuntime::start. (It would become affected only if someone naively narrowed the main thread aroundroce_startwithout restoring it — captured in Blocker 1's fix guidance.)- Correctness F4 suggested fix ("drop the
serve_rankcall site and let the rank's own executor closure pin itself"): Verified false/harmful.serve_rank(helios/src/execution/parallel.rs:533-674) does not spawn a separate executor thread; it is the peer rank's execution loop on multi-host TP (flare-cli/src/main.rs:560). Dropping it would unpin ranks 1–3 on GB10 TP4. Replaced with scoped save-and-restore after validation in Should Fix #2. - Correctness F7 & Value Prop ("silent/unconfigurable affinity violates charter's 'no magic defaults'; add flag/config/logging"): Dropped. Adding a config switch or env var contradicts
AGENTS.md:188-193,449-452, andflare-eoshas zero logging dependencies (eos/Cargo.toml) and already implementslower_priority(eos/src/unix.rs:77-83) silently in the same module. - Correctness F6 ("
selected.len() >= 2floor should take an expected thread count for2P + kEcpusets"): Dropped as speculative complexity for unsupported hardware (AGENTS.md:188-193). - Subtraction F3 ("collapse non-Linux + Windows stubs into
eos/src/lib.rsand dropeos/src/windows.rs"): Dropped. Verifiedeos/src/windows.rs:150,215(release_page_cache,raise_open_file_limit) already establish the crate's uniform pattern of matching Unix/Windows module stubs re-exported viaeos/src/lib.rs:9-16. - Subtraction F4 ("delete
ExecutionWorker::startandReplayWorker::spawncall sites atworker.rs:71andreplay.rs:174"): Dropped as low-signal over-pruning; both are clean 1-line calls on dedicated execution threads with no offload children, keeping qualification benchmarks consistent with serving on GB10. - Doc/TODO update requests (
THIRD_PARTY_NOTICES.md,docs/roce-ring.md,docs/prefix-cache-offload.md,docs/TODO.txt): Dropped as unnecessary once Blockers 1 and 2 are fixed properly (keepingroce_proxy.cidentical and keeping offload/codec threads unpinned preserves all existing docs as accurate). - Commit-body verification (
eb2fdigest,Antigravitymodel name,"follow immediately"wording): Could not be independently verified with available tools (commit message body not exposed); already tracked in@original-el8's review item 3 and not re-asserted as an independently verified finding.
Classify triage
Selected: triage:review
Threshold: 65%
Triage
- [✓]
triage:review: 99.9% -
triage:design-review: 0.0% -
triage:validation: 0.0% -
triage:partial: 0.0% -
triage:integration: 0.0% -
triage:investigate: 0.0% -
none: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
Apply labels
No label changes Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with. decide malicious: all_clear (100%): No malicious content found
explore
Author: fordbmorris (GitHub association NONE — not a member; first-time contributor with no merged commits; Discord woooflet per the PR body)
Motivation: On GB10 (DGX Spark) the CPU has 10 fast Cortex-X925 and 10 slow Cortex-A725 cores, and Linux sometimes schedules Helios' CUDA-driving threads and the busy-polling RoCE proxy onto the slow ones, which varies launch-to-launch timing and slows collectives. The PR pins those threads to the fast tier so timing becomes stable and throughput rises.
Scale: +230 / −1 lines in 8 files (head ba2796c0, rebased on 3801ff1d)
Proposal:
- Add
select_high_capacity_cpus/prefer_high_capacity_cpusineos/src/unix.rs(keep CPUs ≥90% of the max allowedcpu_capacity, midpoint fallback, ≥2 CPUs, no-op on homogeneous/x86_64) plus a Windows no-op stub. - Call it at the top of
flare-model,flare-execution,flare-cuda,serve_rankand eachflare-rank-Nthread — after their child threads are spawned, so background workers keep the full mask. - Edit the vendored
helios/native/roce_proxy.c: duplicate the selector in C, pin the proxy thread, rename itflare-roce. - Description rewritten after review; trailers now
Design-Signed-Off-By: Antigravity (Gemini-4-Neon); design-review=2e5b. Touches: helios/native/roce_proxy.c— the vendored proxy that NOTICE/roce-ring/#589's wrapper all require to stay byte-identical upstream.eos/src/unix.rs— new shared-crate host-policy helper + tests; samemod testsregion open #625 rewrites.helios/src/server/runtime.rs&helios/src/execution/*— call-site ordering that decides which child threads inherit the narrowed mask. Related items:- #589 Fix CUDA 12 batched copies, Linux ARM64 release portability… (merged): adds
roce_proxy_dlopen.c, a fourth byte-identity witness #576 does not update. - #625 Avoid THP compaction stalls in eos::map_host… (open): rewrites
map_hostand adds tests in the sameeos/src/unix.rsregion. - #628 (open, draft):
CopyEngineGatearound the same offload batch/codec call sites. - #280 Park the serving loops on a frame-completion word in WFET on GB10 (merged): same functions, same GB10 host-cost topic.
- #577 roce_proxy: raise ring mailbox window to 16… (open): same author, same vendored file, same re-pin question.
Link: https://github.com/NVIDIA/hyperflare-inference/pull/576
Autobot comments: The inheritance blocker is fixed for eagerly spawned threads but a lazily built
flare-kv-codec-*pool is first created on the already-narrowed model thread, so it is sized 5 instead of 10 and inherits5-9,15-19— the PR's own Limitations skip the only workload that triggers it. The vendored-file hunk now exists upstream (flashinfer#156 @335459b2) butNOTICE:16-19,docs/TODO.txt:80-86,docs/roce-ring.md:361-364and the newroce_proxy_dlopen.c:7-9were not updated, and no CI ever executes either affinity path (x86_64/Windows only). Still zero maintainer re-review, zero CI, no issue backing the problem, all benchmarks author-supplied, and the thread rename is the instrument the placement evidence depends on.
Value Proposition
Value Proposition — PR #576 (pin Helios/RoCE threads to high-capacity CPUs)
Charter alignment: direction yes, evidence no. DGX Spark (GB10) is a named charter target ("squeeze the most out of workstation and compact hardware… keeping generation snappy"), and the mechanism is a single general affinity helper in the runtime, not a per-model branch — that part fits (#267/#334). Two things do not. (a) The charter's evidence rule (#210) demands a speedup over main on a served workload; the +17.2% decode and 6.7× CV figures are author-supplied, single-sourced, measured on binary 4c82ab5b rather than head ba2796c0, with no raw nsys traces and no alternating A/B against main. (b) Wrong layer: the pin/rename is patched into helios/native/roce_proxy.c, the file roce_proxy.c:8 and NOTICE:16-19 declare must stay identical to the pinned FlashInfer revision — while merged #589 already provides the roce_proxy_dlopen.c wrapper (:7-9) that original-el8 named as the seam. A3 confirms none of the four in-tree witnesses, nor docs/TODO.txt:80-86, were amended, and zero docs changed. It also contradicts docs/prefix-cache-offload.md:919-928, which requires a serving-latency measurement before adding affinity to offload threads.
Novelty & status: additive, no competition. A5: no prefer_high_capacity_cpus on main; nothing obsolete, no canonical PR covers it. But #625 rewrites the same eos/src/unix.rs region and #628 touches the offload codec sites — rebase cost is certain.
Value vs cost. Beneficiary pool is real (DGX Spark operators) but the win has never executed in CI (A6: x86_64/Windows only; the aarch64 leg runs --version) and no-ops silently on x86_64. Cost is high: silent unlogged affinity (eos/src/unix.rs:260), five pin sites, vendored-file parity debt shared with #577, and an open correctness regression — A1's lazily built selene::shared::codec::cpu_pool() OnceLock is sized on the already-narrowed thread, yielding 5 workers inheriting 5-9,15-19 instead of 10, exactly on --prefix-cache-memory, the path the PR did not test.
Verdict: Worth it with changes. Direction is charter-aligned and no one else is doing it, but it cannot merge as-is. Required: (1) alternating A/B vs main at PR head; (2) move the pin into the #589 wrapper or re-pin NOTICE/TODO/roce-ring together; (3) fix or explicitly bypass A1; (4) log/report no-op; (5) an aarch64 execution check; (6) rebase order with #625/#628.
Full report Decide Value: yes (99%): This change is worth reviewing: it provides value to the project in line with its charter.
Classify intake
Selected: triage:review, performance
Threshold: 65%
Triage
- [✓]
triage:review: 98.5% -
triage:design-review: 0.8% -
triage:validation: 0.6% -
none: 0.0% -
triage:investigate: 0.0% -
triage:integration: 0.0% -
triage:partial: 0.0% -
triage:superseded: 0.0% -
triage:verify-for-closure: 0.0%
Priority
-
none: 99.9% -
priority:P1: 0.1% -
priority:P2: 0.0%
Type
- [✓]
performance: 98.0% -
community: 37.8% -
enhancement: 29.4% -
duplicate: 24.5% -
bug: 22.3% -
documentation: 0.1%
Area
-
area:selene: 50.0% -
area:orbit: 43.8% -
area:scheduling: 29.4% -
area:rocenante: 22.3% -
area:preparation: 13.3% -
area:memory: 2.3% -
area:api: 0.9% -
area:caching: 0.7% -
area:kernels: 0.5% -
area:engram: 0.1% -
area:packaging: 0.0%
Model
-
model:glm-5.3: 4.7% -
model:kimi-k3.1: 4.2% -
model:qwen3.8-flash-next: 4.2% -
model:qwen3.8-27b: 3.7% -
model:deepseek-v4: 1.6% -
model:inkling-small: 1.6% -
model:deepseek-v4.1: 1.2% -
model:mimo-v2.6: 0.7% -
model:nemotron-3.5-bolt: 0.4% -
model:gemma4: 0.2% -
model:muse-glimmer: 0.0%
Apply Labels (Intake)
No label changes
Subtraction and simplicity
Review of PR #576 through the Subtraction/Simplicity/Conventions lens: the diff is lean except for one function.
- HIGH —
eos/src/unix.rs:188-226:select_high_capacity_cpusis 39 lines that reduce to ~7. Themin_cap == max_capblock (:201-203) is dead (theselected.len() < allowed.len()guard at:221already covers it); the midpoint fallback (:211-220) is speculative and reachable only on hypothetical ≥3-tier hardware — not on GB10, where it always selects 10 CPUs; thecap == 0guard (:195-197) is unreachable from its only producer (:240-252). Replace the body with a single max + filter +then_some, deletemin_cap, and delete the test at:314-330that pins the fallback.AGENTS.md:188-193forbids exactly this kind of fallback. - MEDIUM —
helios/native/roce_proxy.c:1505-1569duplicates the same policy, including the same deadmin_cap == max_cap(:1543) and fallback (:1555-1565). Do not edit it (vendored witness::8,NOTICE:16-19,roce_proxy_dlopen.c:7-9,docs/roce-ring.md:361-364) — but then the PR body's "verified equivalent" claim becomes false and must be amended. - MEDIUM — the five pin sites (
runtime.rs:724,worker.rs:86,threaded.rs:683,parallel.rs:573,replay.rs:174) are five distinct threads; no merge exists. Delete the second sentence of the comment athelios/src/server/runtime.rs:721-723, which claims background threads stay unnarrowed while the lazily builtflare-kv-codec-*pool (selene/src/shared/codec.rs:37-60) inherits the narrowed mask. Simplest real fix: narrow inside that pool'sstart_handler(codec.rs:47-54). - LOW —
eos/src/unix.rs:263-264non-Linux stub collapses into the body;select_high_capacity_cpus(:188) need not bepub. The Windows stub (eos/src/windows.rs:219-220) is required. - Cleared as lean: no new flag/env/config/Cargo feature, no new dependency, no build change (
helios/build.rs:69-74already compiles the file), no existing affinity helper to reuse, tests proportionate.
Open: whether the C hunk is verbatim from flashinfer#156 (decides if S2 applies); comment-fix vs behavior-fix for the codec pool; rebase collides with open #625 on the same eos/src/unix.rs region and mod tests.
Correctness and contracts
Correctness/contracts/system-consequences review of PR #576 at head ba2796c: 1 Blocker, 3 Majors, 4 Minors.
- Blocker — the deferral is incomplete:
prefer_high_capacity_cpus()runs athelios/src/server/runtime.rs:724, beforeworker.run, andselene::shared::codec::cpu_pool()is aOnceLockfirst built fromstore.poll→pump_spawns→host_compress_pool, i.e. on the already-narrowedflare-modelthread. On GB10 theflare-kv-codec-*pool is sized 5 instead of 10 and every worker inherits5-9,15-19, contradicting the comment atruntime.rs:721-723. - Major —
helios/native/roce_proxy.c:1572-1577edits the region:8calls "identical", leavingNOTICE:16-19,roce_proxy_dlopen.c:7-9,docs/roce-ring.md:361-364anddocs/TODO.txt:80-86false; no doc file in the diff. - Major — the 90% filter at
eos/src/unix.rs:208has no relative-spread guard (only exact equality is rejected at:201-203), so small-capacity-spread machines silently get a 1–2 CPU "high" set; the "x86_64 is a no-op" limitation is unreliable. - Major — the selector guarantees only ≥2 CPUs (
unix.rs:221,roce_proxy.c:1566) whileflare-model, up to 16flare-rank-Nand the 20M-spinflare-rocepoller all share that set. 5–8. Minor — silent unpinned outcome (no log/flag/metric, all sixlet _ = sched_setaffinity); no test for the syscall path, the sysfs root (:243) or the non-inheritance property, and zero C tests;replay.rs:174narrows beforeStream::openat:114, opposite to the documented ordering; stale rule atdocs/prefix-cache-offload.md:927-928and an undocumentedflare-rocecomm rename.
Verified sound: no hot-path cost, Windows stub parity, no ABI/core change, no metric-span shift, offload SCHED_BATCH policy untouched, no UB/overflow.
Open: whether the author will build the codec pool before narrowing; re-pin to flashinfer#156 instead of editing the vendored body; rebase vs #625/#628.
Re-review
Recommendation: Changes Requested
This rework resolves two of the three prior blockers cleanly: helios/native/roce_proxy.c now syncs the exact hunk merged upstream in local-inference-lab/flashinfer#156 (335459b2, satisfying @original-el8's upstream-first option), commit metadata and sign-offs are updated, and eagerly spawned background threads (RankExecutor/flare-rank-*, flare-offload-*, flare-offload-disk, ImagePreparation) now stay on the full process cpuset. One concrete regression remains from the prior Round 2 blocker: selene::shared::codec::cpu_pool() is a lazy OnceLock whose first use on --prefix-cache-memory with CPU KV compression occurs inside worker.run on the already-narrowed flare-model thread, halving the flare-kv-codec-* pool and pinning all codec workers exclusively to the P-cores. Eagerly initializing cpu_pool() during offload startup before narrowing resolves this and unblocks merge.
Merge Risk
Level: Medium
- Host prefix-cache KV-codec regression (
--prefix-cache-memory): Deferringprefer_high_capacity_cpus()pastcrate::offload::open(helios/src/server/runtime.rs:696,724) protects eagerly spawned offload/disk/image threads, but misses the lazyflare-kv-codec-*rayon pool (selene/src/shared/codec.rs:37-60), which on cold-start async host compression is built from the narrowedflare-modelthread with half the threads and P-core-only affinity. - No x86_64/Windows runtime regression, but zero aarch64 CI execution: On homogeneous or non-
cpu_capacityLinux hosts and Windows (eos/src/windows.rs:220), the helper is a clean no-op with zero hot-path overhead; however,.github/workflows/native-serving.yml:16-22(not opened) runs only x86_64 Linux and Windows, so neither the Linux sysfs narrowing path nor the C proxy helper runs in CI. - Cross-PR rebase overlap: Open PR #625 modifies
eos/src/unix.rs(includingmod tests) and sibling PR #577 modifieshelios/native/roce_proxy.c; coordinate merge/rebase order.
Walkthrough
eos/src/unix.rs:188-330&eos/src/windows.rs:219-220: addsselect_high_capacity_cpus(≥ 90% of max allowed capacity with midpoint fallback and ≥ 2-CPU floor), Linuxprefer_high_capacity_cpus(strictly intersecting currentsched_getaffinityvia/sys/devices/system/cpu/cpu<N>/cpu_capacity), non-Linux/Windows no-op stubs, and three isolated pure-function unit tests.helios/src/server/runtime.rs:721-724: callsflare_eos::prefer_high_capacity_cpus()onflare-modelafterRankExecutor::new(:585),crate::offload::open(:696), andImagePreparation::new(:719), immediately beforeworker.run(&mut executor)(:729).helios/src/execution/worker.rs:86,helios/src/execution/threaded.rs:683,helios/src/execution/parallel.rs:573, &helios/src/replay.rs:174: narrowsflare-execution(afterRankExecutor::new), eachflare-rank-*peer thread (afterGraphExecutor::new_unstarted),serve_rank(afterGraphExecutor::new_unstarted), andflare-cuda(on worker entry).helios/native/roce_proxy.c:1505-1577: vendorspin_high_capacity_cpus()andpthread_setname_np(pthread_self(), "flare-roce")atproxy_mainentry verbatim from mergedlocal-inference-lab/flashinfer#156(335459b2), compiled throughhelios/native/roce_proxy_dlopen.c:236.
Pre-merge Checks
- [PASS] Security / malicious screen: Read-only
/sys/devices/system/cpu/cpu<N>/cpu_capacityinteger parsing and standardsched_getaffinity/sched_setaffinity/pthread_setname_npcalls; no new env vars, network I/O, or untrusted input handling. - [PASS] Charter & value fit: Targets DGX Spark (GB10), a named charter platform, via a single model-agnostic runtime OS primitive; upstream RoCE proxy sync follows
@original-el8's Round 1 direction once Blocker 1 stops pinning offload codec workers. - [WARN] Related / duplicate / conflict check: No competing affinity change on
main; open PR #625 editseos/src/unix.rsand sibling PR #577 editshelios/native/roce_proxy.c, so merge order will require a minor rebase. - [WARN] Tests & verification evidence: Unit tests (
eos/src/unix.rs:270-330) are isolated and pass on ARM64 per author report (5/5eos,1,728/1,728helios --features roce,runtime-core,server), but CI (.github/workflows/native-serving.yml:16-22(not opened)) runs x86_64 Linux/Windows only (never executing thecpu_capacityor C proxy paths), and the author's GB10/procand throughput evidence omits--prefix-cache-memorywhere Blocker 1 triggers.
Blockers
- Lazy
flare-kv-codec-*rayon pool is still sized and pinned on the narrowedflare-modelthread (helios/src/server/runtime.rs:721-729,selene/src/shared/codec.rs:37-60,selene/src/memory.rs:1898-1901,2005-2013,2341-2370,3064-3075)- Verified behavior & impact: The comment at
helios/src/server/runtime.rs:721-723states that narrowing aftercrate::offload::open(:696) leaves host offload/codec/disk threads on the full process cpuset. Whileflare-offload-*(helios/src/offload/transfer.rs:509-536) andflare-offload-disk(selene/src/disk.rs:372,732) are spawned eagerly insideoffload::open,selene::shared::codec::cpu_pool()(selene/src/shared/codec.rs:37-57) is a lazyOnceLockthat is not touched duringoffload::open(AsyncCompressor::newatselene/src/memory.rs:1986-1998,2313creates only channels and an empty queue). - When host prefix offload uses async CPU KV compression (
helios/src/offload/transfer.rs:466-482,selene/src/memory.rs:2286-2314), the first outbound checkpoint store triggersWorker::run->service_store(helios/src/server/runtime.rs:2380-2388) ->MemoryStore::poll(selene/src/memory.rs:3064-3075) ->drain_compressed(:2368-2370) ->AsyncCompressor::pump_spawns(:2005-2013) ->host_compress_pool()(:1898-1901) ->cpu_pool()on the already-narrowedflare-modelthread. - Inside
cpu_pool(),std::thread::available_parallelism()(selene/src/shared/codec.rs:41-43) reads the calling thread'ssched_getaffinitymask, andrayon::ThreadPoolBuilder::build()spawns allflare-kv-codec-*workers from that thread. On GB10 (0-19narrowed to5-9,15-19), this both halves the codec pool (10 / 2 = 5workers instead of20 / 2 = 10), pins all codec compression workers exclusively to P-cores where they contend withflare-model/flare-roceinstead of using efficiency cores (violatingdocs/prefix-cache-offload.md:919-928and contradictingruntime.rs:721-723), and incurs pool thread-creation latency insidestore.poll(). (It also creates a startup race withhelios/src/offload/transfer/codec.rs:353,514,751, where whichever offlare-modelorflare-offload-0hitscpu_pool()first permanently fixes the pool size and affinity for the process.) - Fix: Eagerly warm
crate::shared::codec::cpu_pool()duringMemoryStore::openwhencodec_enabled/async_encoder.is_some()(e.g., insideAsyncCompressor::newor right before returning fromselene/src/memory.rs:2307-2315, or insidecrate::offload::openwhen CPU KV compression is active), which runs on the unnarrowedflare-modelthread beforehelios/src/server/runtime.rs:724and avoids spawning codec threads when offload compression is disabled.
- Verified behavior & impact: The comment at
Should Fix
None.
Subtract / Simplify
- Remove dead
min_cap == max_capcheck inselect_high_capacity_cpus(eos/src/unix.rs:201-203): Whenmin_cap == max_cap(with positive capacities), every CPU satisfiescap * 10 >= max_cap * 9, soselected.len() == allowed_with_capacity.len()and the final guard at:221(selected.len() < allowed_with_capacity.len()) already returnsNone. Deleting:201-203preserves exact behavioral parity withroce_proxy.c:1510-1569. - Tighten visibility and collapse the Unix cfg stub (
eos/src/unix.rs:188,231-264): Becauseeos/src/lib.rs:12doespub use unix::*;, markingselect_high_capacity_cpusasfn(private toeos/src/unix.rs, where its only caller:253and tests:270-330live) avoids exporting an internal helper onflare_eos's public API. Likewise,prefer_high_capacity_cpus(:231-264) can use a single signature with#[cfg(target_os = "linux")]inside the function body instead of repeating thepub fndeclaration.
Nits
NOTICE:16-19: WhileNOTICE'sf5f5341dFlashInfer commit link was already stale across priorroce_proxy.csyncs (#251,#279,#325), updatingNOTICE:17to335459b2(matching the syncedlocal-inference-lab/flashinfer#156hunk) keeps attribution accurate for the file this PR modifies.
Dropped on verification
- Correctness #2 / Discovery A3 ("vendored
roce_proxy.cbreaks byte-identity contract across 4 witnesses; move pin intoroce_proxy_dlopen.c"): Dropped as a Major/Blocker.@original-el8's Round 1 review explicitly authorized syncing throughlocal-inference-lab/flashinfer#156first, which is now merged (335459b2), soroce_proxy.c:8,roce_proxy_dlopen.c:7-9, anddocs/roce-ring.md:361-364are satisfied.docs/TODO.txt:80-86(ABI 10/11) andNOTICE:17(f5f5341d) were already stale from earlier syncs; reducedNOTICE:17to a 1-line Nit. - Correctness #3 ("90% filter has no relative-spread guard; 1–2% CPPC rounding like 1023/1024 pins to 1–2 CPUs;
cpu_capacityexists on x86 hybrid"): Dropped as factually and mathematically false. If capacities span 1–2% (e.g.,1023..1024, or GB10's997..1024tested ateos/src/unix.rs:303-308), 100% of CPUs passcap * 10 >= max_cap * 9, soselected.len() == allowed_with_capacity.len()and:221returnsNone. A >10% spread is already required to drop any CPU. Moreover, Linux x86_64 does not exposearch_topologysysfscpu_capacity(x86 hybrid uses ITMT/sched_asym_packing). - Correctness #4 ("≥ 2-CPU floor piles 8+ hot threads onto 2 CPUs under
taskset -c 0-3on a 1-prime + 3-efficiency SoC"): Dropped. On 1-prime + 3-efficiency ([1024, 500, 500, 500]), both the 90% pass and the midpoint fallback select only 1 CPU (< 2) and returnNone. Multi-GPU asymmetric big.LITTLE topologies are not in the supported hardware matrix, and@original-el8already approved theeos/src/unix.rsselector in Round 1. - Correctness #5 ("silent affinity with no env flag or logging; aborts on first unreadable
cpu_capacity"): Dropped. Environment-variable behavior switches are explicitly prohibited bydocs/design-review.md:91, fail-closed on missingcpu_capacityis intentional so x86_64/homogeneous hosts exit immediately without partial-topology assumptions, andeosis a low-level crate without logging. - Correctness #6 ("add injectable sysfs root, C-side test, and aarch64 CI execution"): Dropped as Round 2+ scope creep (CI runner matrix is repo-wide infrastructure; kept factual CI coverage note in
Pre-merge Checks). - Correctness #7 ("
helios/src/replay.rs:174narrows beforeStream::openat:114"): Dropped as speculative/untouched since Round 1 (Stream::opencallscuStreamCreateon a pre-existingbundle.context). - Correctness #8 ("
docs/prefix-cache-offload.md:919-928violated for RoCE proxy;flare-rocerename undocumented"): Dropped.docs/prefix-cache-offload.md:919-928governs prefix-cache offload threads (not the RoCE TP collective proxy), and is fully respected once Blocker 1 stops pinningflare-kv-codec-*. Naming the proxy"flare-roce"matches existingflare-*thread names. - Subtraction S1(b)-(c) ("delete
cap == 0guard and 3-tier midpoint fallback") & S3 ("fix lazy pool insidestart_handler"): Dropped S1(c) because removingcap == 0changes behavior on&[(0, 0), (1, 1024), (2, 1024)]and diverges fromroce_proxy.c:1534; dropped S1(b) to preserve exact behavioral parity with vendoredroce_proxy.c:1555-1565; dropped S3'sstart_handlersuggestion becauseavailable_parallelism()runs beforestart_handleron the calling thread andstart_handlercannot recover the unnarrowed process mask.
Classify triage
Selected: triage:review
Threshold: 65%
Triage
- [✓]
triage:review: 99.9% -
triage:design-review: 0.0% -
triage:validation: 0.0% -
none: 0.0% -
triage:integration: 0.0% -
triage:partial: 0.0% -
triage:investigate: 0.0% -
triage:verify-for-closure: 0.0% -
triage:superseded: 0.0%
Apply labels
No label changes Decision to Test: no (99%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.