Explore report · NVIDIA/hyperflare-inference #576

Raw Markdown for agents: https://autobot.eidonix.com/p/2be635fd-f1aa-48fc-8a27-c8f859bdfe6b.md

Case file — PR #576: Pin Helios execution and RoCE proxy threads to high-capacity CPUs on asymmetric Linux topologies

https://github.com/NVIDIA/hyperflare-inference/pull/576 · open, "ready for review" · head 3363573b, base 167f22c · 7 files, +226/−1 · author fordbmorris (Discord woooflet) · opened 2026-11-28 · zero comments, zero reviews, zero labels, zero CI checks.

Key findings

These are the things a reader cannot get from the PR description.

  1. The C half edits a file under an explicit "keep it byte-identical" contract, and the PR never says so. helios/native/roce_proxy.c:6-8 reads "Vendored from FlashInfer's pinned preparation dependency … Keep the source below identical so preparation and serving share the transport ABI." NOTICE:18-19 states "Its implementation is unchanged from that revision"; THIRD_PARTY_NOTICES.md:48-52 repeats the provenance, and docs/roce-ring.md:361-364 says "keep the vendored source identical to the dependency after its provenance header and verify their ABI and collective-region layouts together." The PR inserts 71 lines plus a pthread_setname_np call into that body (lines 1505-1577), which makes NOTICE:18 false unless local-inference-lab/flashinfer#156 lands in the same revision. The description mentions the upstream pairing but never the local parity invariant, and never says NOTICE/docs need updating. Earlier work on this file was always resync-and-declare (#251, #279) or a declared local fix (#325: "FlashInfer's preparation copy of the proxy needs the same change and is not part of this PR"). (Change)
  2. Same-process threaded tensor parallelism is not covered, though the description implies peer-rank coverage is complete. The only peer entry pinned is serve_rank (multi-host). The RankPeers::Threads path spawns flare-rank-{i} threads that construct a GraphExecutor and run the CUDA rank loop (helios/src/execution/threaded.rs:652-678) with no prefer_high_capacity_cpus() call; it is what flare run uses for single-host multi-GPU TP (flare-cli/src/main.rs:620-621) and what Heliopause embeds (heliopause/src/python.rs:410), and it is documented (docs/same-process-tp.md:137 (not opened)). (Change)
  3. The change is silent, unconditional and unobservable. prefer_high_capacity_cpus returns () on every path, sched_setaffinity failure is discarded (let _ = …, eos/src/unix.rs:244; (void)sched_setaffinity… in C at line 1567), and there is no log line, metric, flag, config key or env var — the last correctly, per AGENTS.md:449-452. An operator cannot tell whether the pin happened or no-opped, or which CPUs were chosen, without reading /proc/<pid>/task/<tid>/status. This is in tension with the charter's "Be explicit and pin everything. No magic defaults." (Change / Project fit)
  4. The Why names two threads; the diff pins five. The justification is about the CUDA execution/WFET thread and the RoCE proxy thread, but the diff adds calls in the flare-model closure (helios/src/server/runtime.rs:568), the flare-execution closure (helios/src/execution/worker.rs:71), the flare-cuda replay thread (helios/src/replay.rs:173-176) and serve_rank (helios/src/execution/parallel.rs:539) plus the proxy. The placement evidence covers only "flare-roce + execution thread" — three of the five call sites have no placement evidence at all. (Claims / Change)
  5. Every number is author-supplied, with no raw data, no commands, no traces, and no alternating A/B against main. The strongest is the same-server C8 A/B (+17.2%), but the description does not say how A725 placement was forced for the comparison arm, so it is unclear the same threads were moved. The variance claims rest on 4 unpinned vs 6 pinned launches. (Claims and evidence)
  6. No CI has run at all on the head commit, although .github/workflows/native-serving.yml:46-47 (not opened) runs exactly the eos tests the description cites (cargo test --locked --release --manifest-path eos/Cargo.toml (not opened)), the Windows job would compile-check the windows.rs stub the author says was never built, and the rdma job would compile-check the new C helper. (Process)
  7. No issue, maintainer request or prior report backs the problem. Exhaustive searches of items and history for affinity/cpu_capacity/governor/pinning found only this PR. The nearest prior item, #353, was closed by a maintainer for precisely "shows no benefit" — the project's most recent ruling on a GB10 thread-level micro-optimisation. (Why / Related work)
  8. The strongest "fits the project" argument is not in the description: docs/prefix-cache-offload.md:866 already records the project's position that "Adding CPU affinity requires a serving-latency measurement that shows a benefit" — which is exactly the evidence form this PR supplies for its own threads. (Project fit)

The change

What it does, in plain terms. Four Linux serving threads (plus the native RoCE proxy thread) now, as their first action, look at the CPUs they are allowed to run on, read each CPU's kernel-reported cpu_capacity, and if the set spans asymmetric tiers, silently restrict themselves to the fast tier.

Inventory, verified against pr_diff and the files at pr/576:

File Lines Content
eos/src/unix.rs +145 select_high_capacity_cpus (167-210), #[cfg(target_os="linux")] prefer_high_capacity_cpus (215-245), non-Linux no-op (247-248), three unit tests (251-320)
eos/src/windows.rs +3 no-op stub (219-220)
helios/native/roce_proxy.c +71 #ifdef __linux__ pin_high_capacity_cpus (1505-1570); pthread_setname_np(…, "flare-roce"); pin_high_capacity_cpus(); in proxy_main (1574-1577)
helios/src/server/runtime.rs +1 call at line 568, first statement in the flare-model closure
helios/src/execution/worker.rs +1 call at line 71, flare-execution closure
helios/src/replay.rs +4/−1 run(...) wrapped so the call at 173-176 precedes it, in the flare-cuda thread
helios/src/execution/parallel.rs +1 call at line 539, first statement of pub unsafe fn serve_rank(...)

No test file outside eos/src/unix.rs; no documentation, NOTICE, THIRD_PARTY_NOTICES or docs/TODO.txt change of any kind.

Selection rule, verified by hand against the description's GB10 numbers (eos/src/unix.rs:167-245): threshold is cap*10 >= max*9 (90% of maximum allowed capacity). On GB10 that admits 997 (9970 ≥ 9216) and rejects 731 (7310 < 9216), so the selected set is exactly {5-9,15-19}, matching both the description and the hard-coded unit test at eos/src/unix.rs:254-274. No-op guards, all real in the code: fewer than two allowed CPUs (173-175); any zero capacity (179-181); min_cap == max_cap (185-187); a CPU whose sysfs file is missing or unparsable aborts the whole call (228-233); and the result must be at least 2 and strictly fewer than all allowed CPUs (205-209). The fallback when the 90% filter yields fewer than two is a genuinely different rule — strictly above (min+max)/2 (198-203) — which is what makes the three-tier test pick {4,5,6,7}.

Caveat the rule carries: the guard only guarantees ≥2 CPUs, not ≥ the number of threads pinned. A host with two allowed X925 cores puts the spinning flare-execution thread, the spinning flare-roce thread, and flare-model/flare-cuda on those two CPUs. Under the default 0-19 mask used for the measurements (10 fast CPUs, 4-5 hot threads) this is fine; under a constrained operator cpuset it is untested, and both the Rust and C implementations share the property.

Rust/C parity: the two implementations are logically equivalent (same thresholds, same early-outs, same fallback, same silent (void)/let _ = on sched_setaffinity). Differences are cosmetic: stack arrays cpus[CPU_SETSIZE]/caps[CPU_SETSIZE] in C; both cap CPU ids at 1024 (eos/src/unix.rs:223, roce_proxy.c:1521), so >1024-CPU hosts would silently truncate. pthread_setname_np is 15-char limited and "flare-roce" fits; _GNU_SOURCE is already defined at roce_proxy.c:113.

What the description says that the change does not do: nothing material. Sentence-by-sentence audit found the stated thresholds, no-op conditions, four call sites, ABI-14 claim, "no env vars / no Protobuf / no model-contract changes" and "cpuset restrictions preserved" all accurate. In particular the mask is intersected with the calling thread's own mask, so an operator's cgroup/cpuset is never widened and sched_setaffinity touches only the calling thread — the process-wide mask and the HTTP/tokio/offload/Engram threads are untouched.

What the change does that the description does not say: the vendored-proxy divergence (Key finding 1), the threaded-TP gap (Key finding 2), the silence (Key finding 3), three unpinned-but-claimed call sites (Key finding 4), no doc update for an aarch64-only qualified behaviour, and one more subtlety: the pthread_setname_np("flare-roce") rename is the measurement instrument, not a cosmetic touch. The claimed "48/48 critical threads" and "8/8 threads held on X925" evidence depends on being able to identify the proxy thread by name; the other four threads already had names (flare-model, flare-execution, flare-cuda, flare-rank-N). How the unpinned runs were classified as "at least one critical thread on Cortex-A725" — when the proxy had no name — is not stated.


The why

Stated problem: on GB10 the Grace CPU mixes 10 Cortex-A725 (cpu_capacity 718-731, 338-2,808 MHz, 512 KiB L2) with 10 Cortex-X925 (997-1,024, 1,378-3,900 MHz, 2 MiB L2) over two L3 clusters; Linux places the two 100%-CPU threads on either tier across launches; efficiency-core placement slows one-shot RoCE collectives, stretches p90 inter-graph host wake gaps by more than an order of magnitude and adds speculative-verification jitter.

Premise is plausible from the code: the proxy really does busy-spin on the control sequence and only naps after ROCE_IDLE_SPINS = 20,000,000 idle polls (helios/native/roce_proxy.c:172, 1578-1610), and #280 confirms both GB10 core types have FEAT_WFxT and that the serving loops held a core at 100%.

Provenance: none. No linked issue, no maintainer request, no prior discussion. Searches over the item corpus for affinity, cpu_capacity, efficiency cores, governor/schedutil, taskset, systemd affinity, launch-to-launch variance, RoCE one-shot host overhead and NUMA pinning returned only #576 itself or unrelated items. AGENTS.md:165-169 requires every contribution to address "an explicit maintainer request, a demonstrated defect, a measured performance or memory problem, or inaccurate documentation" — this PR's case rests on the third, and the only corroborating measurements are its own.

How long wanted: no history of the request; the problem statement is newly introduced by this PR (commit dated 2026-11-25, opened 2026-11-28).



Recent activity


People


Community

pr_comments returns "No comments." No reviews, no inline review comments, no reactions, no labels, no assignee, no milestone, no reviewer requested. Opened and last updated 2026-11-28. Interest drawn so far: none from humans. For contrast, merged #280 carried area:scheduling, enhancement, performance, triage:design-review plus a review comment before merge, and #279 carried area:rocenante, bug, priority:P1, triage:review.


Project fit

Lines up:

Pulls against:


Claims and evidence

All evidence is the author's own; nothing here independently reproduces it.

Claim What backs it What is missing
48/48 critical threads pinned to X925 5-9,15-19 vs 4/4 unpinned launches with ≥1 on A725 narrative only no raw data, no commands, no per-launch table; the classification method for unpinned runs (proxy unnamed pre-PR) is unstated; unit tests cover only the pure function, not the sysfs read or sched_setaffinity
width=8 graph-time CV 4.82% → 0.72% (range 50.18-51.07 ms); width=1 CV 1.50% → 1.07% (29.66 ms mean) narrative only 4 vs 6 launches is a small sample for a variance claim, and the two arms differ in launch count
Same-server C8 64k decode A/B: X925 144.88 tok/s (55.89 ms/graph, peak 151.10) vs A725 123.66 tok/s (65.38 ms/graph), +17.2% strongest claim: same server, zero restarts, isolates core tier method for forcing A725 placement is not described (taskset on which threads? proxy only? execution too?), so it is not established the same threads were moved; single pair, no spread
nsys --cuda-graph-trace=node: C1 width=1 RoceOneshotLaunch sum 2.77 → 1.91 ms (−31.0%); C1 verify p90 inter-graph host wake gap 1,880.3 → 30.9 µs (61×) narrative no trace files, no capture commands; unclear whether the baseline is "unpinned" (placement luck) or a forced-A725 arm
Cold prefill 8k-128k +2.6% to +17.3% (8k 1,527→1,791 tok/s, 16k 1,716→1,873, 0.11% CV) same core, no re-export — a real strength only two of the five sizes are quoted; no per-size table
eos unit tests pass on ARM64 GB10 covering two-tier, homogeneous, single-tier, invalid/zero, three-tier verified: the three tests exist at eos/src/unix.rs:251-320 and match the description exactly they do not cover the sysfs read path, the sched_setaffinity path, the non-Linux stub, or the C helper (which has no test at all)
4-Spark TP4 validation: 6 Orbit launches + 2-hour soak, 0 errors, 0 leaks, 8/8 threads on X925, 0/16 RoCE port errors narrative no logs or report ids; "0 leaks" method unstated
Runs on x86_64 as a no-op because cpu_capacity is absent author's statement, consistent with the code's early return no x86_64 test run cited; no verification that hybrid Intel P+E hosts lack the file
windows.rs stub compiles-per-inspection author states it was not compiled on Windows

Not tested or not stated: single-host TP1 serving (where only flare-model + flare-cuda exist and the machine also runs the frontend); hosts where an operator deliberately spread work over both tiers; the effect of pinning all five sites versus only the two "critical" ones the Why names; cpusets small enough that the ≥2 guard binds.

Missed regression angle: nothing in the description reports behaviour when the selected CPUs are also where the HTTP/tokio runtime runs under --cpuset-cpus narrow masks.


Reach


Process


Open questions / could not be found

  1. How was A725 placement forced for the +17.2% same-server A/B, and on exactly which threads? Without that, the headline number does not isolate the threads this PR moves.
  2. How were the unpinned launches classified as having a critical thread on A725, given the proxy thread had no name before this PR?
  3. Is the proxy edit intended to be upstreamed as-is (flashinfer#156), and if so what happens to NOTICE:18 / docs/roce-ring.md:361-364 if #156 is rejected or drifts? Nothing in the PR says.
  4. Why is same-process threaded TP excluded? The description does not mention it; whether that is deliberate (it is the path where all rank threads share one process and pinning all of them to 10 CPUs could contend) or an oversight is not stated.
  5. Is there a maintainer position on affinity as a runtime default anywhere beyond the offload-doc sentence? No issue, design note or roadmap item was found.
  6. Does the commit carry a Signed-off-by? Not inspectable here; the repo enforces it and recently rejected a PR partly for lacking it.
  7. Any x86_64 or Windows CI evidence does not exist yet; the two targets the author says are untested would be covered by simply letting CI run.
  8. No reactions or interest signal of any kind could be gathered beyond "no comments, no reviews, no labels".