#1 [high] Change: #707 unifies 3 open RoCE PRs into one ABI-14 proxy sync + relay wiring + CI parity
PR #707 by lukealonso (COLLABORATOR), open 2026-12-03, base main, head 81ef561, 12 files +1247/-129, no reviews, no comments, CI passed. Four parts:
- helios/native/roce_proxy.c synced byte-for-byte below 9-line provenance header to local-inference-lab/flashinfer#213 commit 524799c47fca54229c15b6db12261171854a7b7d (body SHA-256 1f6b3ea8...1c25bc). Adds per-HCA roce_create_with_gids (0..=255 validation), 1-hop closed-ring opcodes KIND_RING_RS=7/KIND_RING_AG=8/KIND_RING_RSAG=9, RING_WINDOW 8->16, roce_blob_t 1168->1176 bytes with ring_window/ring_bytes connect validation, ROCE_RESERVE_OPS=48 < ROCE_RELAY_OPS=64 send-queue caps, eager drain_all in run_pipe_op. ROCE_ABI_VERSION stays 14.
- Per-HCA RoCEv2 GID discovery: Fabric/Topology scalar gid_index -> gid_indices: Vec (prefer index 3 per HCA else its own lowest RoCEv2 IPv4 slot); RoceTransport::connect calls roce_create_with_gids; heliopause exports roce_devices() -> Vec<(String,u32)>; ignition/preparation/collectives.py passes hca_names+gid_indices when AllReduce.init accepts gid_indices else RuntimeError on mixed GIDs; flare doctor reports per-device GID indices.
- Mesh all-gather relay: ported partners() and relay_plan() into roce_fabric.rs (Mesh + Links::All + even world>=4 with mutual direct-cable pairs), Topology::relay_plan: Option<Vec>, validate_relay_plan preflight, roce_set_relay FFI call between roce_connect and roce_start; flare-cli cluster.rs appends ", all-gather relay".
- tests/preparation/test_roce_proxy_parity.py (new, 131 lines) asserting LF + 9-line header + 0-byte divergence, plus create_roce_runtime GID forwarding tests; .github/workflows/native-serving.yml gains
cargo test ... --features roce --lib execution::roce. Also: pyproject.toml flashinfer-python rev 5a8ceed8 -> 524799c4; docs/roce-ring.md, docs/cli-design.md updated. Says it "unifies and supersedes #672, #649 and #577".
#2 [high] Change: undeclared edits in #707 — flare-cli files and docs outside the description
pr_diff at PR head 81ef561 includes hunks the PR description never mentions (pr_files lists only 12 files; these additional files appear in the head diff, meaning they are main-side changes since the branch point — i.e. bundle/unrelated content in the review window, or the branch was cut from a different base):
- flare-cli/src/cli.rs +37: new test
debian_man_page_documents_every_visible_subcommandasserting packaging/debian/flare.1 .SH COMMANDS matches visible subcommands. - flare-cli/src/orbit/agent.rs +3/-1: "a orbit's serving group" -> "an orbit's serving group" in the systemd unit Description, plus assertion in systemd_unit_quotes_core_cache_with_spaces_and_percent.
- flare-cli/src/orbit/controller.rs +2/-2, orbit/mod.rs +1/-1: "a orbit" -> "an orbit" comment wording.
- docs/TODO.txt: two new TODO items (Windows Helios release tests; WinUI Serving GPU selection with two CUDA GPUs).
- docs/api.md: typed HTTP 400 error codes (context_length_exceeded, unsupported_feature, invalid_grammar, invalid_image).
- docs/cli-design.md: also rewritten "No environment variables"/"Two levels of precedence" bullets + CUDA_HOME/TRITON_PTXAS_PATH/CPATH table row + scheduler checkpoint reasoning-anchor rule (beyond the one-line GID edit the description claims).
- docs/core-design.md, docs/scheduling-runtime-design.md: checkpoint anchor reasoning-block change.
- docs/model-preparation.md: CUDA toolkit discovery fallback.
Because
search_codeat ref=main and at the PR head both resolve to the PR head tree in this tooling (verified: main shows "an orbit's..." AND "No environment-variable behavior switches"), I could not confirm from git which side these belong to. The commit-history endpoint errors out ("Could not read c513e46a..."). Note the PR description's claim "docs/cli-design.md (modified, +1 -1)" matches pr_files, while the diff shows a much larger cli-design.md rewrite — so the head diff is likely vs an older base and includes main-side drift, not author edits. Flag as unresolved.
#3 [high] Related work: #707 supersedes open #672/#649/#577, all still open; evidence lives in theirs
#707 says it "unifies and supersedes #672, #649 and #577". All three are still OPEN as of this review; #707 does not close them (no "Closes #" links in the body; related_items shows only [mentions]).
- #672 "fix(helios,roce): select RoCEv2 IPv4 GID index per HCA" by nepenth (FIRST_TIME_CONTRIBUTOR), opened 2026-12-02, labels area:rocenante/bug/performance/priority:P2/triage:review, 7 files +380/-65, head 5fa291d. Companion local-inference-lab/flashinfer#209. Verified on 2-node dual-CX7 GB10 ARM64 (roceP2p1s0f0 GID 3, rocep1s0f0 GID 5); both rails serve TP2. Round-2 autobot review = Changes Requested with 1 blocker: must wait for flashinfer#209 to merge so vendored proxy stays byte-identical. #707 part 2 is essentially #672's Rust/Python/doctor code, except #672 kept a scalar fallback while #707 raises RuntimeError on mixed GIDs with legacy FlashInfer (see #672 review "Preparation fallback on mixed-index hosts" warning) — #707 closes that warning.
- #649 "helios: add 1-hop closed-ring RoCE prefill proxy opcodes" by FujitsuPolycom (CONTRIBUTOR), opened 2026-11-30, 1 file +267/-35, head e64b087, companion flashinfer#195 (proxy @ eeb1234d8346). Has full 4× DGX Spark GB10 SM121
flare runA/B: TTFT/prefill +3.76%..+4.32% at 8K–128K, RS/AG microbenchmarks 1.20x–1.46x, burst -4.1% wall/-11.0% TTFT, concurrent decode -2.6%. Round-2 review: 1 blocker = upstream flashinfer#195 unmerged. #707's stated numbers for "1-hop closed-ring" derive from this. - #577 "roce_proxy: raise ring mailbox window to 16 and drain relays eagerly in pipelined ops" by fordbmorris (FIRST_TIME_CONTRIBUTOR), opened 2026-11-28, 3 files +38/-15, head 07f4fb4, companion flashinfer#157. Has 4× DGX Spark ring benchmarks: ReduceScatter -9.7/-7.4/-7.1%, GatherShards -6.2%, Twoshot -6.6%; live 4-Spark flare run on existing ABI-14 core. REVIEWED BY MAINTAINER original-el8 with CHANGES_REQUESTED (2026-11-28): explicit instruction "Do not bump ROCE_ABI_VERSION (14) ... Validate RING_WINDOW ... inside the rank-to-rank roce_blob_t / roce_connect handshake instead" — #707's proxy does exactly this (1168->1176). Abobot "Should Fix" on #577: equalizing reserve()/ring_service_slot() at ROCE_SEND_DEPTH/8 loses relay priority for lane 0 on world 8..16; recommended reserve()=48 or poll drain_cqs() before ring_service(). #707's proxy has
#define ROCE_RESERVE_OPS 48u,#define ROCE_RELAY_OPS (ROCE_SEND_DEPTH / 8u)and _Static_assert(ROCE_RESERVE_OPS < ROCE_RELAY_OPS) — i.e. it incorporates that exact fix — and the PR body says "drain_cqs polled before ring_service". Consequence for readers: if #707 merges, #672/#649/#577 are superseded and should be closed (not done in this PR); their benchmark evidence is the only hardware evidence behind #707's expected gains.
#5 [high] Why: issues #143 / #151 and merged #369 are the recorded demand for per-HCA GIDs
The per-HCA GID problem has a long, documented history:
- #143 (open, CaptKitCarson, 2026-10-29, labels area:preparation/area:rocenante/bug/priority:P2/triage:investigate): "GB10 TP2 export: b12x RoCE prep hard-defaults to GID index 3 and fails when the IPv4 RoCE v2 GID is elsewhere". GID tables reported: index 3 empty or a second link-local IPv6 RoCE v2 GID, IPv4 RoCE v2 at 5, sometimes 6 after a reboot; explicitly noted "The position of the IPv4 entry depends on how many IPv6 addresses the interface holds at the time" (CaptKitCarson comment 2026-11-19). So a host-wide GID index (not just per-HCA) is unstable across reboots — the exact premise of #707 part 2.
- yatesdr (2026-11-19) root-caused it:
ignition/preparation/collectives.pybuilt the b12x RoCE all-reduce without a GID index; b12x then used B12X_ROCE_GID_INDEX, else NCCL_IB_GID_INDEX, else 3. "#369 makes preparation use that same selection" — #369 "Choose the RoCE GID index per host during multi-host preparation" is MERGED. #707's collectives.py change is the next step after #369 (per-host -> per-HCA, plus hca_names). - #151 (open, evehour, 2026-10-30, area:rocenante/bug/priority:P2/triage:verify-for-closure): TP2 dual-rail serving times out on the first collective (HCA 0, sequence 1) when both CX-7 rails are active; workaround
ip link set <if> down. jannerchang reported a container sysfs bind-mount workaround and asked for a--roce-hcaflag. Comments note their GIDs were at index 5 and 6, not 3 (CaptKitCarson 2026-11-02) — i.e. another instance of the non-3 GID placement. original-el8 (2026-11-18) said #232 is "a candidate fix ... not proof that this exact fabric is repaired", marked verify-for-closure. Neither #151 nor #143 is closed by #707 (body does not reference them). #707's per-HCA discovery is adjacent to #151's remaining verify item but does not touch the--roce-hcarequest or the per-rail data-path probe request.
#6 [high] Research summary
Case file assembled for PR #707. Five scratchpad entries hold the core findings; the additional facts below were verified this turn and should be merged into the final report.
Verified state of the head (81ef561): helios/native/roce_proxy.c at head is 2251 lines vs 1971 on main; it now has ROCE_RESERVE_OPS 48u + ROCE_RELAY_OPS (ROCE_SEND_DEPTH/8u) with _Static_assert(ROCE_RESERVE_OPS < ROCE_RELAY_OPS) (roce_proxy.c:156-158), RING_WINDOW 16 (:223), roce_blob_t.ring_window/.ring_bytes (:267-268) populated in roce_local_blob (:665-666) and validated in roce_connect (:744-761), KIND_RING_RS/AG/RSAG = 7/8/9 (:194-196), and roce_create_with_gids (:557) with roce_create kept as a wrapper (:611-619). Main has none of these: main's roce_proxy.c:205 is #define RING_WINDOW 8, :185 uses ROCE_SEND_DEPTH / 6, :981 relay cap /4. So the proxy sync is real and, notably, incorporates the exact fix Autobot's "Should Fix #1" recommended on #577 (reserve at 48 < relay 64, drain_cqs polled before ring_service).
Undeclared edits. pr_diff at head contains hunks in flare-cli/src/cli.rs (not opened) (+37, a new debian_man_page_documents_every_visible_subcommand test), flare-cli/src/orbit/{agent,controller,mod}.rs ("a orbit" → "an orbit"), docs/TODO.txt, docs/api.md, docs/core-design.md, docs/model-preparation.md (not opened), docs/scheduling-runtime-design.md (not opened), and a much larger docs/cli-design.md rewrite than the declared "+1 -1". Cross-checking confirmed these belong to merged upstream PRs, not to #707: #687 ("flare-cli, debian: sync flare.1 subcommands and fix 'an orbit' wording", jcartu) covers the cli.rs (not opened)/orbit hunks (fixing issue #452), and #697 ("helios/scheduler: preserve interior anchor for open-reasoning prompts", FujitsuPolycom) covers the reasoning-block docs. So the head diff is against an older base and includes main-side drift; the description's file table (+1 -1 for cli-design.md) is the accurate author-side delta. This is a review-window artifact, not an undeclared change — worth stating so downstream readers do not mis-score it.
CI. .github/workflows/native-serving.yml:114-115 (not opened) adds the cargo test ... --features roce --lib execution::roce step in the Linux-only rdma job, after the pre-existing cargo check --features roce,rdma at :109-113. The parity test runs via .github/workflows/python-cpu.yml:33 (not opened) (.venv/bin/python -m pytest tests/ -q) after uv sync --extra prepare --extra test (:29), so it does execute in PR CI — but it depends on the installed flashinfer git checkout containing _roce_proxy.c (not opened), and there is no uv.lock in the repo (list_files found none), so the pin in pyproject.toml:47 is the only lock. If flashinfer#213 force-pushes or is squash-merged to a different SHA, the parity test fails CI on main; the PR body acknowledges this in its merge-order step 2.
Process/community. No comments, no reviews, no labels, opened and last updated 2026-12-03 (same day), CI green. Author lukealonso is a named priority contributor in the charter and has 41 merged PRs in 180 days, including the immediately-preceding vendored-proxy sync #643 (merged 2026-11-30) which established the "re-vendor byte-for-byte from a merged FlashInfer commit" precedent. The three PRs #707 supersedes are all still open and would need closing: #672 (nepenth, first-time contributor, P2 bug label, never approved — 1 open blocker), #649 (FujitsuPolycom, contributor, has the 4× DGX Spark flare run A/B), #577 (fordbmorris, first-time contributor, has an explicit CHANGES_REQUESTED review from maintainer original-el8 whose instruction #707's proxy implements). #577's own review said explicitly "Do not bump ROCE_ABI_VERSION (14) ... validate RING_WINDOW inside roce_blob_t/roce_connect" — #707 follows that. Note the process risk: three contributors' work, including two first-time contributors, is absorbed without any comment or credit on their PRs, while #707 carries no labels and no review.
Charter fit. Lines up: model-agnostic transport layer, targets DGX Spark/SM121, no new flags, preserves ABI-14 core loading (charter line 42 "verify that existing data, artifacts, and exported cores still load"), addressed to roadmap item "FlashInfer dependency fix (#215)" and "pin dependencies to exact commits (#215/line 19)". Does not line up cleanly: charter "Bring real evidence" (#210) asks for benchmarks over main on a served workload, and #707 explicitly states its transport gains were NOT re-measured — every number is inherited from #649/#577. Also #707 replaces the previous "track FlashInfer main" arrangement (#215) with an exact-rev pin, i.e. it takes a side in the open #215 dispute.
Reach. Wire compatibility: roce_blob_bytes() 1168 → 1176 means mixed proxy revisions in one serving group are rejected at roce_connect; all ranks must upgrade together. Ring registered host memory doubles (4.02 → 8.03 MiB/rank at world 4, 16.06 → 32.13 MiB at 16; docs/roce-ring.md:106-112). flare doctor output text changes format ("GID index N" vs "indices [3, 5]"), covered by tests at flare-cli/src/doctor/spark.rs:550. roce_set_relay now actually engages on every Mesh + Links::All + even world≥4 mutual-pair fabric, i.e. 4-node Spark clusters with two direct-cable pairs — a behavior change on already-exported cores that was previously dormant, and the PR's central unmeasured claim ("25% less switch-traversed all-gather traffic"). The ignition change can raise a new RuntimeError during preparation on mixed-GID hosts with an older FlashInfer — an intentional regression-to-loud-failure that reaches operators via a preparation abort rather than a silent single-rail serve.
Gaps I could not close. git commit history for the touched areas errors out ("Could not read c513e46a…"), and search_code/read_file at ref=main return the PR head tree in this tooling, so base-vs-head attribution had to be done by cross-referencing merged PR titles rather than commits. Not verified on hardware, matching the PR's own limitations: multi-node relay traffic reduction, world != 4 relay plans, and the --features rdma (Selene/ibverbs-sys) build. tests/preparation/test_collectives.py, which #369 added a RoCE assertion to and which #707's description implies is exercised, does not exist at the head (list_files under tests/preparation shows no such file) — worth confirming whether #369's test was renamed or dropped, since #707's new parity test is now the only Python coverage of create_roce_runtime.
#7 [high] Change: verified proxy-diff facts (head vs main) and that #707 adopts #577's recommended reserve fix
Head 81ef561: helios/native/roce_proxy.c is 2251 lines; main is 1971. At head (verified by search_code/read_file):
- roce_proxy.c:156-158
#define ROCE_RELAY_OPS (ROCE_SEND_DEPTH / 8u),#define ROCE_RESERVE_OPS 48u,_Static_assert(ROCE_RESERVE_OPS < ROCE_RELAY_OPS, ...); comment at :201 "ROCE_RELAY_OPS three-WR relay ops (192 WRs) plus world=4 ring ACKs (64 WRs)"; asserts at :225 and :228. - roce_proxy.c:223
#define RING_WINDOW 16; :252 ring_bytes(); :267-268uint32_t ring_window; uint64_t ring_bytes;in roce_blob_t; :665-666 populate in roce_local_blob (0 when mesh); :744-761 validate exact agreement in roce_connect; :631/637/639 ring allocation and MR registration sized by ring_bytes(world). - roce_proxy.c:194-196 KIND_RING_RS 7 / KIND_RING_AG 8 / KIND_RING_RSAG 9; :1511-1524 kind_phases/kind_1hop dispatch; :1763-1765 phase docs.
- roce_proxy.c:557 roce_create_with_gids(...); :611-619 roce_create kept as a wrapper delegating to it (so ABI-14 rlibs/core-loading path unchanged).
- roce_proxy.c:773 roce_set_relay(roce_ctx_t*, const int32_t* plan, int n).
- roce_proxy.c:905-910 reserve() capped at ROCE_RESERVE_OPS (48); :1039 ring_service_slot() capped at ROCE_RELAY_OPS (64).
- Provenance header unchanged in shape: :6-8 "Vendored from FlashInfer's pinned preparation dependency (flashinfer/experimental/b12x/comm/roce/_roce_proxy.c, proxy ABI 14). Keep the source below identical...". Note the header text itself does NOT carry the commit SHA or the body SHA-256 that the PR description cites (those live only in the description), unlike #643/#649 whose line 7 named the upstream SHA.
On main: roce_proxy.c:205
#define RING_WINDOW 8; :185(ROCE_SEND_DEPTH / 6) * 3 <=; :852 reserve_limit(... ROCE_SEND_DEPTH / 6); :981 relay cap>= ROCE_SEND_DEPTH / 4; :421 roce_blob_bytes returns sizeof(roce_blob_t) (1168). Connection: #707's 48/64 split is exactly Autobot's "Should Fix #1" on #577 (which asked for reserve() at 48 or /10 while keeping ring_service_slot at /8, and warned that reverting relay to /4 overflows 512 at world 16). So #707 resolves a should-fix finding that #577 still carries. Also: helios/build.rs:71cargo:rerun-if-changed=native/roce_proxy.c— the C file is compiled into helios, so thecargo test --features roce --lib execution::roceCI step exercises the linked proxy symbols (roce_blob_bytes, roce_set_relay, roce_create_with_gids) at least for FFI-shape assertions.
#8 [high] Reach/claims: what #707 changes for operators, wire compatibility, memory, and which claims are unevidenced
Wire/compat: roce_blob_bytes() 1168 -> 1176 (asserted at helios/src/execution/roce.rs:491 assert_eq!(size, 1176) plus legacy 1168 rejection test at :501-503). ROCE_ABI_VERSION stays 14, so exported ABI-14 cores still load, but all ranks in a serving group must run the same proxy revision or roce_connect rejects them. docs/roce-ring.md:161-169 now documents this.
Memory: ring registered host memory doubles — docs/roce-ring.md:106-112 "about 2.008 MiB per rank in the group, so 8.03 MiB ... at four ranks and 32.13 MiB at sixteen ranks" (was 1.004 / 4.02 / 16.06).
New default behavior: roce_set_relay now actually engages wherever Topology.relay_plan is Some — Shape::Mesh + Links::All + even world>=4 with mutual single direct-cable pairs — unless --roce-switch-only is passed (Links::Shared disables it; roce_fabric.rs relay_plan() returns None on Shared). This is a live data-path change on previously-shipped cores, not an opt-in.
CLI surface: no new flags. flare-cli/src/cluster.rs:94-112 appends ", all-gather relay" to the existing "Connect RoCE transport" phase line. flare doctor text changes shape: format_gid_indices (spark.rs:259-273) prints "index N" when uniform, "indices [3, 5]" when mixed, "index (none)" when empty; tests at spark.rs:550 and :387.
Preparation reach: ignition/preparation/collectives.py:79-98 raises RuntimeError("host RoCE devices use distinct GID indices ... update the pinned FlashInfer dependency ...") when AllReduce.init lacks gid_indices and devices disagree; uniform-GID hosts still fall back to scalar gid_index. So a mixed-GID host on an old FlashInfer now aborts preparation instead of preparing one rail (this closes the warning Autobot filed against #672 round 2).
Claims vs evidence:
- "38 passed" on
--features roce --lib execution::roce— backed by tests in the diff (roce.rs:488-503, 515-560, 608-748 incl. roce_create_with_gids NULL/-1/256 rejection and a live-HCA roce_set_relay rejection test that self-skips without /sys/class/infiniband). - "Per-HCA GID rails retained" — unit-tested in roce_fabric.rs (:1290-1310 mixed, :1331 preferred-3-wins); NOT hardware-verified in this PR. #672 has the hardware evidence (2-node dual-CX7 GB10, indices [3,5], both rails serve TP2). PR body's own limitation list agrees.
- "roce_set_relay invoked" — unit-tested via validate_relay_plan and the C-side rejection test; the actual traffic reduction is explicitly NOT measured ("expected to reduce switch-traversed mesh all-gather traffic by 25%").
- Ring gains (-6.2..-9.7% latency) — from #577's 4× DGX Spark ring benchmarks, not re-run here.
- 1-hop closed-ring gains (+3.76..+4.32% prefill, 1.20–1.46x RS/AG microbench) — from #649's 4× DGX Spark GB10 A/B, not re-run here.
- Parity guard — the test is real and does run in python-cpu.yml, but it compares against whatever flashinfer checkout
uv syncinstalls (pyproject.toml:47 rev); no uv.lock exists in the repo, so the pin is the only lock and a force-push/squash of flashinfer#213 breaks main CI (PR body step 2 acknowledges this). Not verified by anyone:--features rdma(Selene/ibverbs-sys) build — PR body says local bindgen fails on Arch headers; CI checks it. docs updated: docs/roce-ring.md (+17/-14: window 8->16, memory, 1-hop collectives, replace the sentence "Serving does not enable FlashInfer's all-gather relay" with the new mesh-relay description at :161-169, and the component table at :418-422), docs/cli-design.md:1706-1709 (doctor wording). NOT updated: docs/multi-host.md, which still describes ring relays only (:94, :344, :574-577) and says nothing about the mesh all-gather relay now being on by default.
#4 [medium] Related work: #643 is the merged predecessor in the vendored-proxy sync series
Merged predecessor: #643 "perf(helios): sync vendored roce_proxy.c to FlashInfer 2a07747b8 (2-step ring2)" by lukealonso, merged 2026-11-30 (same day as #577/#649 rounds). +315/-34, one file. This is the direct pattern #707 repeats: re-vendor byte-for-byte from a merged FlashInfer commit, disclose ABI-14 compatibility, list overlapping open PRs. #643's own review history shows the precedent that establishes #707's blocker for #672/#649/#577: autobot demanded a merged upstream revision, and reviewer original-el8 (2026-11-30, on #643) noted ring2 opcodes keep ABI 14 so "landing #643 before (or bumping the proxy ABI alongside) flashinfer#192 avoids 'unknown op kind 5'". Earlier syncs in the same series: #251 (ABI 11) merged, #279 (ABI 14) merged, #325 (per #576 review, a prior roce_proxy.c sync), and #589 (roce_ensure_libibverbs). aitm: #643 brought in pin_high_capacity_cpus() which overlaps open #576. Measured #643 result: GPU round time -1.5–2.2 ms, 5-prompt mean 74.02 -> 76.11 tok/s, greedy_code 74.39 -> 80.89 tok/s (+8.7%) on 4× DGX Spark TP4 DeepSeek-V4.1-Flash.