Explore scratchpad · NVIDIA/hyperflare-inference #633

Raw Markdown for agents: https://autobot.eidonix.com/p/3ef3ee81-9e86-4c14-8e2f-61ed4db19a05.md

#1 [high] Related work: #633 duplicates the roce_proxy.c hunk already in open PR #576

PR #633 (author original-el8 / commit author "Jason Cook", commit 70c811bd) changes exactly one file, helios/native/roce_proxy.c (+71/-0): adds pin_high_capacity_cpus() (lines ~1505-1569) and, in proxy_main, pthread_setname_np(pthread_self(), "flare-roce") + pin_high_capacity_cpus() (lines ~1573-1577), all under #ifdef __linux__.

Open PR #576 ("Pin Helios execution and RoCE proxy threads to high-capacity CPUs on asymmetric Linux topologies", fordbmorris, FIRST_TIME_CONTRIBUTOR, opened 2026-11-28, +230/-1 over 8 files) contains the same hunk as one of its 8 files: helios/native/roce_proxy.c (modified, +71 -0) — identical line count. #576's description says it "vendors the exact pin_high_capacity_cpus() and \"flare-roce\" thread-naming hunk merged in https://github.com/local-inference-lab/flashinfer/pull/156 (335459b2)".

So #633 is a subset-extraction of #576's RoCE portion, split out into its own PR by a different author, without mentioning #576 anywhere in the description. Reviewer question: is #633 meant to land before/instead of #576's C hunk, and does #576 then need to drop that file? Neither description says.

#2 [high] Related work: #576 review history on this same hunk (vendoring, child-thread affinity)

#576 review history is directly relevant to #633 because the reviewed C hunk is the same code.

Connection: the C code in #633 was authored upstream (FlashInfer #156 / 335459b2) per #576, not by #633's author; #633 gives no provenance note or upstream reference.

#3 [high] The change: what the +71 lines actually do, and what the description omits

Diff is 1 file, +71/-0, helios/native/roce_proxy.c at head 70c811bd: pin_high_capacity_cpus() at roce_proxy.c:1505-1570 (inside #ifdef __linux__) and two calls at the top of proxy_main (roce_proxy.c:1572-1577): pthread_setname_np(pthread_self(), "flare-roce") and pin_high_capacity_cpus(). Inserted between run_varlen_op (ends :1503) and proxy_main — i.e. mid-file, not appended.

Verified behaviour (read at pr/633):

What the description says that the diff does not do: nothing material — every claim in "What changed (before -> after)" matches the code. The description's claim that ROCE_SEND_DEPTH / 6 in reserve() is "preserved" is accurate (roce_proxy.c:784 untouched; also :920 uses /4 in ring_service_slot), and ROCE_ABI_VERSION 14 (roce_proxy.c:134) and helios/src/execution/roce.rs:23 PROXY_ABI = 14 are untouched.

Scope check: #633 contains ONLY the C hunk. #576's Rust-side flare_eos::prefer_high_capacity_cpus for execution threads (eos/src/unix.rs, helios/src/{replay,execution/*,server/runtime}.rs) is NOT here. So on its own, #633 pins only the RoCE proxy thread; every other Helios thread keeps the full mask.

#4 [high] Why: the problem statement, its origin in #576, and that no issue tracks it

#633's stated problem: on asymmetric Linux hosts (ARM big.LITTLE / Grace), proxy_main spins on the doorbell and the scheduler may place/migrate it onto low-capacity cores, adding CPU-side latency and jitter to doorbell polling, completion draining, and ring relay forwarding. Naming the thread flare-roce makes it identifiable in profilers.

Origin of the numbers: the concrete evidence for this problem is in #576, not in #633. #576 states GB10/DGX Spark has 10 Cortex-A725 efficiency cores (cpu_capacity 718-731) and 10 Cortex-X925 performance cores (997-1024), and that the OS placed Helios execution threads and the busy-polling RoCE proxy on efficiency cores on some launches: 48/48 critical threads on X925 over 6 launches vs 4/4 unpinned launches landing on A725; RoceOneshotLaunch C1 width-1 2.77 -> 1.91 ms (-31.0%); p90 inter-graph host wake gap 1,880 -> 30.9 us (61x). #576 also documents flare-roce appearing in /proc/<pid>/task/*/status with Cpus_allowed_list=5-9,15-19.

The proxy thread really is a pure spin loop while ops flow: roce_proxy.c:1586-1657 busy-polls ctrl[CTRL_SEQ], only calling nanosleep(20 us) after ROCE_IDLE_SPINS (20000000, roce_proxy.c:172) idle polls (:1605-1607), which corroborates the "latency-sensitive busy-poller" premise.

Recency of the problem: the multi-host RoCE transport itself is recent — helios/native history shows the proxy landed 2026-10-13 ("Serve packages whose ranks run on separate hosts over native RoCEnante"), ring relay 2026-10-16 (#a36480c7), ABI 7/11/14 syncs 2026-10-13/11-10/11-13. DGX Spark ARM64 focus is the project's stated target (charter Vision: "SM120/SM121 workstations and DGX Spark").

No issue tracks "proxy thread on E-cores": search_items for "affinity pin CPU efficiency cores scheduler jitter" returns no matches other than the two PRs. #633 lists no linked issue and no "Fixes" reference.

#6 [high] Recent activity: #589's dlopen shim depends on roce_proxy.c staying byte-identical; base is current

#7 [high] People: original-el8 is the priority contributor who blocked #576 on this hunk, and now lands it

#9 [high] Claims and evidence: code claims verified; every performance number is the combined stack's, none isolates this hunk

Claims → what backs them (from #633's description; verified against code where possible):

BACKED BY CODE:

  1. "narrows the mask to CPUs with capacity >= 0.9*max, falling back to capacity > (min+max)/2 if fewer than 2 qualify, applies sched_setaffinity only when 2 <= selected < count" — verified at roce_proxy.c:1543-1568.
  2. "Preserved ROCE_SEND_DEPTH / 6 in reserve(), its world = 16 ACK safety bound, and ROCE_ABI_VERSION 14 unchanged" — verified: roce_proxy.c:784 still /6, :134 still 14, :920 still /4, and the diff is +71/-0 so nothing was removed.
  3. "No model core format, Protobuf schema, or RoCE wire/shared-memory ABI changes" — verified: only C code inside proxy_main/pin function; roce_blob_bytes()/ABI untouched.
  4. Strict compile claim cc -std=gnu11 -Wall -Wextra -Werror -c helios/native/roce_proxy.c — plausible: all includes present (roce_proxy.c:113-124 has _GNU_SOURCE, pthread.h, sched.h, stdio.h, stdint.h), CPU_SETSIZE needs sched.h (present), UINT32_MAX needs stdint.h (present). Not independently run here (no toolchain in this environment) — claimed, not verified.
  5. "warnings: 0" / test counts (42 passed under -- roce, 30 passed under -- execution::roce, 1,738 passed/6 failed) — claimed, not reproducible in the case file. Note all of these are CPU tests that never execute pin_high_capacity_cpus (it needs a RoCE transport + a live proxy thread) and, on x86_64 CI hosts, /sys/devices/system/cpu/cpu<N>/cpu_capacity does not exist, so even a live run on CI would return at roce_proxy.c:1528.

CLAIMED BUT NOT EVIDENCED FOR THIS PR: 6. The entire "Claimed benefit and measured results" block (8K/32K/128K decode, prefill, Coding Peak, 46,766-token long-form, geomean 126.61 vs 124.96) is self-declared non-attributable: the PR's own scope note says it "integrates the combined SM121/RoCE kernel, recipe, and scheduler optimization set; isolated single-PR TP4 serving A/B was not run separately", and the Limitations say "direct cpu_capacity sysfs pinning ablation were not run separately". The same benchmark table appears verbatim in #632 (a scheduler PR), which is the strongest single sign the numbers belong to the combined stack, not to this C hunk. Net: there is NO measurement in #633 that isolates either (a) thread naming or (b) cpu_capacity narrowing. 7. "Prevents the RoCE proxy polling thread from running on lower-capacity cores" — no Cpus_allowed_list / /proc/<pid>/task/*/status evidence in #633 (unlike #576, which does present exactly that: flare-roce threads with Cpus_allowed_list=5-9,15-19 vs 0-19). The mechanism is inspected, not observed. 8. The claimed benefit is asserted as "without changing ... homogeneous-host scheduling" — true by inspection (min_cap==max_cap returns at :1543), but on x86_64 it is only a no-op because the sysfs file is absent, which the PR does not say. 9. Charter requirement "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over main on a served workload (#210)" — #633 asserts a served-workload result but explicitly disclaims it for this PR in isolation. That is an honest disclosure (charter principle 12 rewards disclosure) but leaves the charter's speedup requirement unmet for the isolated change. 10. Validation the charter docs require and that this PR does cite: flare run multi-GPU execution (docs/design-review.md:252-259 requires "live multi-GPU execution of real collective graphs (for example, serving a multi-GPU exported core through flare run)" for TP transport changes) — #633 says the TP4 run happened, but under the combined-stack caveat, so it partially satisfies the requirement.

#10 [high] Project fit: vendored parity invariant vs the edit; otherwise well aligned with the charter

Points where the repo's documented rules bear on #633, as facts (no verdict):

IN TENSION: a) Vendored-source invariant. helios/native/roce_proxy.c:6-8 ("Keep the source below identical so preparation and serving share the transport ABI"), helios/native/roce_proxy_dlopen.c:7-9 ("keeping the vendored roce_proxy.c byte-for-byte identical to FlashInfer"), docs/roce-ring.md:360-364 ("Flare vendors the serving proxy ... When changing the protocol, keep the vendored source identical to the dependency after its provenance header and verify their ABI and collective-region layouts together"). #633 edits the file with no upstream reference. Per #576's author the identical hunk was merged upstream in local-inference-lab/flashinfer#156 at 335459b2, so the edit MAY be a legitimate re-vendor; #633 does not state that, and its commit message does not either (commit subject only). NOTICE:16-19 still names flashinfer f5f5341d... and says "Its implementation is unchanged from that revision" — false after this change whichever way the sync question resolves, and #633 does not touch NOTICE. b) Aliasing/precedents on this exact question: original-el8's own review of #576 called editing this file a blocker; #251 (also original-el8) re-vendored rather than patched; Automat review of #577 keeps raising "vendored parity" as the recurring blocker. So the repo's established practice for this file is: land in FlashInfer first, then copy. c) docs/prefix-cache-offload.md:927-928: "Adding CPU affinity requires a serving-latency measurement that shows a benefit." That clause is scoped to offload threads, not the RoCE proxy (Autobot's #576 round 2 explicitly dropped that reading: "That doc governs prefix-cache offload threads, not the RoCE TP collective proxy"), but it is the only in-repo statement about affinity needing measurement, and #633 has no isolated measurement. d) charter "Bring real evidence" (#210) — see claims entry.

ALIGNED: e) Target hardware. Charter Vision: "squeeze the most out of workstation and compact hardware—specifically SM120/SM121 workstations and DGX Spark" — DGX Spark GB10 is the asymmetric-ARM host this change is for. Goals list SM103/SM120/SM121 serving and cross-node serving with Orbit. f) No per-model branches, no new flags/env switches (charter "No per-model special cases or flags"; docs/design-review.md:89-92 prohibits env-var behavior switches) — #633 adds no config surface at all, which fits. g) "Be explicit and pin everything" / #215 — the change pins nothing new and depends on sysfs; neutral, but the un-updated NOTICE pin (f5f5341d vs 335459b2) is the reverse of "pin everything". h) STAYS OUT of the Rust/Helios scheduler layers that #576 touches, so it does not trip the formal/TLA+/Kani requirements in docs/design-review.md:232-251 (which apply to scheduler, admission, speculation, cancellation, cache ownership, completion validation, readiness, rank coordination). By touching only native/, #633 avoids the mandatory simulator/formal work entirely — worth flagging as a scope difference from #576. i) Contribution standards require PR descriptions in four parts (why / what / claimed result / evidence) — #633 has all four. j) docs/design-review.md "Commit self-review" flow: the .githooks/commit-msg hook requires a Design-Signed-Off-By: <identity>; design-review=<sha256[:4]> trailer (docs/design-review.md:294-318, .githooks/commit-msg:14-15,56-63). #576's author had to redo trailers twice for a stale digest and a missing model name; #633's commit is a single line subject with no visible trailer in the case file. Whether the trailer exists is worth checking on the commit object (not visible through these tools).

#12 [high] Process: ready for review, CI failed, no review, and #576/#633 merge order is unresolved

#14 [high] Research summary

Case file prepared for PR #633 (helios/roce: pin proxy polling thread to high-capacity CPUs and name thread), 13 scratchpad entries covering all nine angles.

What a reader could not learn from the description, in short: (1) The entire +71/−0 diff is the same hunk already carried in open PR #576 by fordbmorris (+230/−1 over 8 files), which states the hunk was vendored byte-for-byte from merged FlashInfer PR local-inference-lab/flashinfer#156 (335459b2); #633 mentions neither #576 nor any upstream, and the two PRs' merge order is unresolved. (2) #633's author original-el8 is the reviewer who twice blocked #576 on this exact C hunk, demanding it be synced through FlashInfer first or done from Rust without touching the vendored file — #633 is that reviewer landing it themselves after the upstream merge, undisclosed. (3) The vendored-byte-identity invariant (roce_proxy.c:6-8, roce_proxy_dlopen.c:7-9 added by #589, docs/roce-ring.md:360-364) is untouched by the PR, and NOTICE:16-19 still pins f5f5341d and asserts "its implementation is unchanged from that revision". (4) Every performance number is the combined SM121/RoCE/recipe/scheduler stack's — the same table appears verbatim in scheduler PR #632 — and the PR itself disclaims isolated A/B and any cpu_capacity ablation, so nothing isolates thread naming or pinning. (5) CI failed on head 70c811bd, no CI job runs aarch64 or executes this code, and there are zero reviews, comments, labels or Autobot intake. (6) Implementation detail reviewers will want: the read loop fails closed to a complete no-op on the first unreadable/zero cpu_capacity file, the affinity result is silently discarded with no log and no opt-out, and the change is x86_64/Windows-inert. Charter-wise the target hardware (DGX Spark/SM121) aligns, the no-new-flags shape aligns, "bring real evidence" (#210) is only partially met, and by touching only native/ the PR sidesteps the TLA+/Kani obligations #576's Rust-side change triggers.

All scratchpad entries carry file:line and PR/issue citations, with verified facts kept separate from the PR's own claims.

#16 [high] Project fit: the vendored byte-identity invariant is convention-only — no test or CI check enforces it

Searched for any enforcement of the byte-identity rule asserted at helios/native/roce_proxy.c:6-8, helios/native/roce_proxy_dlopen.c:7-9, docs/roce-ring.md:360-364 and NOTICE:16-19:

Consequence for the decision: #633 would silently diverge main from its own declared vendoring contract with no red test, and NOTICE:16-19 would keep asserting "Its implementation is unchanged from that revision" while the file differs. Whether the divergence is legitimate turns entirely on the unverifiable-from-this-repo fact that FlashInfer #156 merged at 335459b2 (asserted in #576 by fordbmorris; #633 asserts nothing). No CI job rebuilds or diffs the upstream file.

#5 [medium] Related work: #577 and merged #325/#279/#251/#215 on the same vendored file

related_items for #633 lists these as changing the same file:

#8 [medium] Community/process: zero engagement, no labels, CI failed on head

#11 [medium] Reach: who is affected, observability, no opt-out knob, and the preparation/serving proxy drift

Who/what is affected:

#13 [medium] Code path: roce_start → pthread_create → proxy_main, and the Rust-side alternative that was previously suggested

Rust type contract, for reviewers who will ask "does the runtime call it from Rust?": roce_start(roce_ctx_t*) (roce_proxy.c:1661) is what creates the thread (pthread_create(&c->thread, NULL, proxy_main, c) at :1674). It is declared in helios/src/execution/roce.rs:72 and called from RoceTransport::connect at roce_proxy.rs... precisely roce.rs:300, immediately after roce_connect succeeds. So the pinning happens once per transport connect, on a fresh pthread created with default attributes (no explicit affinity in pthread_create, so the new thread inherits the creator's mask via clone semantics — this is what makes sched_getaffinity(0,...) inside the thread see the inherited mask).

Alternative implementation the reviewer already suggested for #576 (relevant as prior art, not a demand): "apply flare_eos::prefer_high_capacity_cpus() from Rust around proxy thread creation without modifying the vendored C file" (original-el8, #576 review 2026-11-28). Also #576's Autobot round 1 proposed applying it "from Rust around proxy thread creation". Because pthread_create is inside the C file and the thread starts immediately, doing it from Rust would race the thread's first polls — which is presumably why the C edit is the chosen route now. Note eos/src/unix.rs at #633's base has NO select_high_capacity_cpus/prefer_high_capacity_cpus (search_code for cpu_capacity across the whole tree returns only roce_proxy.c hits), so the only implementation of this selection logic in the repo is #576's unmerged one plus this PR's C copy; if both land, the code exists twice (C in roce_proxy.c, Rust in eos/src/unix.rs) — the exact duplication original-el8's #576 review objected to.

#15 [medium] Process: which orientation-packet leads were followed and which are not relevant

Leads from the packet and their disposition:

FOLLOWED, MATERIAL:

LEADS CONSIDERED, NOT RELEVANT TO THIS CHANGE:

#17 [medium] Correction/caveat: what is verified vs unverified in my own impact notes

To keep verified facts apart from claims, these are the soft spots in my earlier entries:

  1. "Windows builds unaffected" (entry 11) is only partly verified. Verified: the new code sits inside #ifdef __linux__ (roce_proxy.c:1505,1574), so it cannot affect a non-Linux compile. NOT verified: whether the roce feature (which compiles native/roce_proxy_dlopen.c, a file that includes <dlfcn.h>) is actually built in the windows-2022 matrix leg of .github/workflows/native-serving.yml:20-21,43-45. flare-cli/Cargo.toml:44 enables flare-helios with roce unconditionally, but the Windows leg evidently builds on main today, so something pre-existing handles it. This is a pre-existing condition unrelated to #633 and should not be read as a #633-specific risk.
  2. "glibc-specific pthread_setname_np / musl untested" (entry 3) is an inference from the __linux__ guard, not from any build evidence. The repo's release pipeline targets glibc (per #589's GLIBC_2.35 floor work), so no evidence of a musl consumer exists.
  3. "Preparation/serving proxy drift until this lands" (entry 11) relies on pyproject.toml:47 pinning FlashInfer branch = "main" and on FlashInfer #156 having merged. The first is verified in-repo; the second is the PR-author claim from #576. There is no uv.lock in the tree (searched: no *.lock other than Cargo.lock files, despite docs/model-preparation.md:146-148 and docs/roce-ring.md:333 referring to uv.lock recording the resolved commit) — so the resolved FlashInfer revision cannot be determined from this repository snapshot at all. That documentation gap is itself worth knowing: four docs tell readers to check uv.lock, and no uv.lock is present.
  4. "Commit message is a single-line subject with no visible trailer" — search_history only reports subject lines, so the presence/absence of the Design-Signed-Off-By trailer (required by .githooks/commit-msg:14-15,56-63 and docs/design-review.md:294-318) must be confirmed against the commit object; I could not read it with the available tools.
  5. No toolchain was available, so the strict-compile claim (cc -std=gnu11 -Wall -Wextra -Werror) and all Rust test counts in #633 are the author's, not reproduced here; I only checked that the required headers/defines are present (roce_proxy.c:113-124).

#18 [medium] Report skeleton: high-importance entries to lead Key findings

Key findings should lead with what is invisible in the description, in this order (entries in parentheses):

  1. The diff is the identical hunk already in open #576 by fordbmorris, vendored from merged FlashInfer #156 / 335459b2; #633 cites neither, and #576/#633 merge order is undefined (1, 2, 12).
  2. #633's author is the reviewer who blocked #576 on this same C hunk, demanding the FlashInfer sync or a Rust-only fix — the PR is the maintainer-side resolution of their own blocker, undisclosed (7).
  3. Vendored byte-identity invariant + stale NOTICE:16-19, with no automated enforcement anywhere in the repo or CI (10, 15).
  4. All performance numbers belong to the combined SM121/RoCE/recipe/scheduler stack — the identical table appears in scheduler PR #632 — and the PR disclaims isolated A/B and any cpu_capacity ablation, so nothing isolates this hunk (9).
  5. CI failed on head 70c811bd; no job runs aarch64 or executes this code; zero reviews/labels/Autobot intake; ready-for-review but effectively unexamined (8, 12).
  6. Implementation facts reviewers will ask about: fail-closed first unreadable cpu_capacity is a total no-op (3), silent result and no opt-out (11), affinity only within the inherited mask so operator cpusets still win (13), thread started from Rust at roce.rs:300 so no Rust-side alternative without racing the loop (13).

Then the body angles in the required order: change (3), why (4), related work (1, 2, 5, 14), recent activity (6), people (7), community (8, 12), project fit (10, 15), claims and evidence (9, 16), reach (11), process (12). Nothing found for: none of the angles is empty; "why" has no linked issue of its own (recorded in 4).