Case file — PR #672 "fix(helios,roce): select RoCEv2 IPv4 GID index per HCA"
https://github.com/NVIDIA/hyperflare-inference/pull/672 · author nepenth (FIRST_TIME_CONTRIBUTOR) · open, "ready for review", opened 2026-12-02 03:04, head c582b10, base main · 4 files, +187/−40 · 0 comments, 0 reviews, 0 labels, no CI checks on head.
Key findings
Fabric::gid_indexsilently changes meaning, and its one outside consumer is left on the old rule. It used to be the host's chosen index; it is nowdevices[0].1— whatever index the first device in sorted name order happens to use (helios/src/execution/roce_fabric.rs:430).flare_heliopause.roce_gid_index()still returns that value (heliopause/src/python.rs:692-704) and still documents the old rule ("3 when every active device has a RoCEv2 IPv4 GID there, otherwise the lowest index at which one does",python.rs:692-693), and prep feeds it into b12x as one host-wide index (ignition/preparation/collectives.py:83(not opened)). #672 does not touch that path: the serving side becomes per-HCA while preparation keeps an arbitrary single pick — the preparation/serving device-set mismatch that #369 (merged 2026-11-21) was created to unify. Not stated in the description.- The native edit re-forks the vendored proxy one day after #643 re-vendored it.
helios/native/roce_proxy.c:6-8says the file is "Vendored from FlashInfer's pinned preparation dependency (…proxy ABI 14). Keep the source below identical";helios/native/roce_proxy_dlopen.c:7-9says "byte-for-byte identical to FlashInfer". #643 (2026-11-30) was merged specifically to restore that parity, and #649 is currently blocked on "the vendored transport is forked ahead of its unmerged upstream". #672 editsroce_hca_t,open_hca,connect_qp,roce_create*with no upstream FlashInfer revision cited. - The "backward-compatible wrapper" is dead code.
roce_createis kept atroce_proxy.c:587-601, but the only in-tree caller — the Rust FFI — was switched toroce_create_with_gids(helios/src/execution/roce.rs:46, 205); grep finds no other caller. So nothing in-tree exercises the wrapper. - No mixed-build guard, unlike #232. The rendezvous
encode/decodeformat is unchanged (roce_fabric.rs:531/563), so a mixed cluster (one rank with #672, one without) will not refuse to pair-up front; the old build still drops the second HCA and plans a different rail count, which surfaces as a connect/rail-count mismatch rather than a loud rejection. #232 handled a comparable hazard by adding a field older builds reject. - Evidence is thin where the reviewers here are strict. Verification is two lines of "
cargo test …— passed" plus one narrative hardware paragraph (2× GB10, dual CX-7, GLM-5.3-Flash-FP4-Local) with no command, crate/feature set, counts, throughput, baseline, core id or logs. The bar applied in #643 ("30 passed", exact command) and #577 (1,728/1,728) is much higher;AGENTS.md:103-112and the charter's "bring real evidence / address the root cause" rules (#210, #397) apply. NoDesign-Signed-Off-Bytrailer could be confirmed. - CI cannot execute the riskiest part. If triggered, the helios non-
rocejob runs the newroce_fabrictest and the flare-cli job runs the new doctor test, but the only--features rocejob iscargo check --features roce,rdma(.github/workflows/native-serving.yml:101-113(not opened));execution::roceis#[cfg(feature = "roce")](helios/src/execution.rs:16-17), so the FFI change and its test (roce.rs:394) are compile-checked only — exactly the gap #643/#577 reviews flagged. - The closest user-visible issue, #151, may not be this mechanism. #151 is 2× GB10, dual active CX-7, "timeout … HCA 0, at sequence 1", GLM-5.3-Flash-FP4-Local — the PR's exact narrative — but in #151's environment both rails sat at GID index 3, so per-HCA divergence does not explain it; #151 is
triage:verify-for-closureon #232, and #672 neither cites it nor posts to it.
The change (what it does, and what it does more than it says)
Plain terms: on a multi-rail host each RoCE HCA can carry its IPv4-mapped RoCEv2 GID at a different GID-table index. Before, Helios picked one global index and discarded any active HCA whose GID was elsewhere; a rank that prepared kernels for 2 HCAs while the runtime kept only 1 then disagreed about rail count and flag offsets, and multi-host collectives timed out on sequence 1. #672 makes the index a per-HCA property, threads it through to the native proxy's per-QP SGID, and teaches the doctor to report mixed indices.
helios/src/execution/roce_fabric.rs(+84/−24):Fabricgainsgid_indices: Vec<u32>(:221-228),Topologygains it too (:306-321).discover_in(:386-475) now uses a per-device closurepick_gid_index=PREFERRED_GID_INDEX(3) if valid on that HCA else that HCA's lowest valid index (:407-413),filter_maps only devices with no RoCEv2 IPv4 GID at all (:414-426), errors if none remain (:427-429), and setsgid_index = devices[0].1(:430). NewFabric::gid_index_for(&self, index: usize)with fallback togid_index(:1006-1011);Fabric::topology()emitsgid_indicescloned when the lengths match else padded withgid_index(:1024-1035). New testmixed_per_hca_gid_indices_discover_both_ipv4_rails(:1181-1216); three existingFabricfixtures getgid_indices: Vec::new()(:1565, :1680, :1832).helios/native/roce_proxy.c(+34/−8):roce_hca_t.gid_index(:259);open_hcaqueries with it (:461);connect_qpsetsgrh.sgid_index = (uint8_t)hca->gid_index(:680, wasc->gid_index); new exportedroce_create_with_gids(...const int* gid_indices)with NULL and 0..=255 validation (:531-584, bounds loop :547-552,c->gid_index = gid_indices[0]:558);roce_createkept as a wrapper (:587-601).helios/src/execution/roce.rs(+10/−4): FFI declaresroce_create_with_gids(:46-61);RoceTransportbuilds per-HCA indices fromtopology.gid_indiceswhen lengths line up, else repeatstopology.gid_index(:199-203, call :204-221).PROXY_ABIstill 14 (:23).flare-cli/src/doctor/spark.rs(+59/−4):inspectenumerates endpoints and readsgid_attrs/ndevs/{gid_index_for(idx)}per endpoint (:153-165, :179), prints "RoCEv2 GID index N" or "indices [a, b]" (:187-200); new testcx7_readiness_handles_distinct_per_hca_gid_indices(:539-576).
Not in the description: the Fabric::gid_index semantic change and its prep consumer (finding 1); the vendored-file divergence (finding 2); the unused wrapper; the mixed-build behaviour; the untouched contract docs; and the doctor's terminal Warn fallback, which still prints a single index (flare-cli/src/doctor/spark.rs:250-256, verified at head).
Said but not done: nothing in the "What Changed" list is absent from the diff. The gap is in the Verification section, which asserts more than it shows (see Claims).
The why
- The defect class is documented in #143 (open since 2026-10-29, P2,
area:preparation+area:rocenante,triage:investigate, reporter CaptKitCarson): GB10 TP2 export where b12x prep hard-defaults to GID index 3 while the IPv4 RoCEv2 GID sits at 5/6. yatesdr root-caused it to preparation (create_roce_runtime,ignition/preparation/collectives.py:50(not opened)) and CaptKitCarson supplied GID tables showing IPv4 at index 5, index 3 holding a second link-local IPv6 GID. - #369 (merged 2026-11-21, yatesdr) fixed the prep half by exposing Helios's rule as
flare_heliopause.roce_gid_index()so "the rule exists once". Its description explicitly names the residual hole: b12x opens every active device with a non-zero GID at the chosen index while serving keeps only devices with a RoCEv2 IPv4 GID there. #672 is that residual hole, addressed on the serving side. - #151 (open since 2026-10-30, P2,
triage:verify-for-closure) is the serving-side symptom: "first request times out on RoCE collective (HCA 0, sequence 1) when both CX-7 rails are active; single rail works", reporter evehour, independently confirmed by jannerchang. original-el8 pointed it at merged #232 as "candidate fix … not proof that this exact fabric is repaired" and asked for a retest (2026-11-18). #672's hardware paragraph reads like that retest but is not linked to it, and #151's environment has both rails at index 3, so the mechanism differs. - Breadth of demand: the Rails/HCA/GID topic has produced at least four transport PRs in three weeks (#232, #369, #666, #672) plus the ABI series (#251, #279, #643, #649). #143 is still open; #151 still awaits verification.
Related work
- #369 (merged) — direct predecessor; #672 changes the rule its
roce_gid_index()wrapper exposes, without touching the wrapper or prep. - #143 (open issue) — prep-side report of the same defect class; not fixed here.
- #151 (open issue) — closest symptom match, different GID configuration, no cross-link.
- #666 (merged 2026-12-01, original-el8) — extended
Endpointwithportand rewrote pairing/ranking; #672 patchesdiscover_indirectly on top of it and reuses itsdevice()/endpoint()fixtures. No conflict. - #506 (merged, dbotwinick) — authored
flare-cli/src/doctor/spark.rsand the "serving's RoCEv2 GID index" wording indocs/cli-design.md:1695-1698; its tests (spark.rs:363,:379) still pass under #672 because their fixtures put the GID at one index, but they now describe a rule that no longer holds in the mixed case. - #232 (merged) — route planning over direct cables; also the source of the mixed-build guard #672 does not add.
- #643 (merged 2026-11-30, lukealonso) — byte-identical re-vendor of
roce_proxy.cfrom FlashInfer2a07747b8; undone by #672's C hunk one day later. - #649 (open, FujitsuPolycom) — adds opcodes 7-9 to
roce_proxy.c; blocked on the same parity invariant. #577 (open, fordbmorris) —roce_proxy.c+roce.rs, changesroce_blob_tsize and blob assertions; overlaps both of #672's touch points. #576 (open, fordbmorris) — CPU pinning inroce_proxy.c; file overlap only. Whoever lands second rebases. - #633 (closed, superseded CPU-pinning attempt), #589 (merged, created
roce_proxy_dlopen.c, which#includes the proxy and inherits ABI drift), #251/#279 (ABI 11/14 alignment), #325 (ring relay flag ordering), #215 (closed "track FlashInfer main"; the charter cites it as the pin-everything rule that makes parity blocking, not routine) — history, no functional overlap. - #34 (open issue, 2-hop relay via flow label) — unrelated to GID selection.
Recent activity
- 2026-12-01
5c0d9c67#666 — planner ranking rewrite; #672 sits on it. - 2026-11-30
ec957867#643 — re-vendor to restore byte parity; reversed by #672. - 2026-11-28 #506 — created the doctor file and its CX-7 checks; #672 extends its display.
- 2026-11-21 #369 — prep-side single-index rule; #672 changes the serving rule under it.
- 2026-11-14 #232 — rail planning over direct cables; mixed-build guard precedent.
- Open work on the same files: #576, #577, #649. So #672 builds on #666/#506, is the serving-side continuation of #369, and conflicts with the vendored-parity invariant restored by #643 and relied on by #649/#577.
People
- nepenth — FIRST_TIME_CONTRIBUTOR, single commit
c582b10onfix/roce-per-hca-gid, no other PRs or issues in 180 days, no Discord handle given (recent RoCE PRs carry one: #369 "D-Rock", #643 "lukealonso"). The charter says priority contributors (@voipmonitor, @original-el8, @lukealonso) carry extra weight, so this lands on its merits with an explicit review. - Area owners / recent committers:
helios/src— Luke Alonso (236), Martin Vit (52), yatesdr (49);flare-cli/src— Luke Alonso (21), eugr (4), yatesdr (4);helios/native— Jason Cook (4), Luke Alonso (4), jasonc (2). - File-level:
roce_proxy.c— lukealonso (#643), iein (#325), jetnet (#279), original-el8 (#251), Jason Cook ABI series, FujitsuPolycom (#649).roce_fabric.rs— original-el8 (#232, #666), yatesdr (#369).doctor/spark.rs— dbotwinick (#506). - Reporters who would care and have not engaged: CaptKitCarson (#143, #151 hardware validator), evehour (#151), jannerchang (#151 confirmation).
- Engaged on #672 so far: nobody.
Community
Zero comments, zero reviews, zero reactions, no labels, and #672 did not receive the automatic flare-autobot case-file comment that #506, #643, #577 and #649 all got on opening — so no automated review has run. Interest in the underlying problem is documented in #143 (open, P2) and #151 (open, P2, with a workaround suggested by jannerchang and a --roce-hca request), but neither thread mentions #672.
Project fit
- Charter "Bring real evidence" (#210 performance, #397 root cause): the change addresses a genuine root cause; the evidence line does not meet the stated bar.
- Charter "Solve the right problem in the right place" (#404): the fix lives in discovery, transport FFI and the proxy; no new flag, env var or config key is introduced (verified in the diff).
- Charter "Be explicit and pin everything. No magic defaults" (#215): keeps
PREFERRED_GID_INDEX = 3as a per-HCA preference (roce_fabric.rs:63-64, 407-413, same default b12x uses) rather than adding a new one — aligned. But forking a vendored pinned dependency conflicts with the same principle, per #215's use as precedent. - Charter "Keep the runtime small and model-agnostic": transport/fabric only, no model branch — aligned. Target hardware (DGX Spark / GB10 / SM121, dual-rail CX-7) is explicitly in scope.
- Contract docs left stale:
docs/multi-host.md:42-43("Active RoCEv2 ports with IPv4 GIDs"),docs/multi-host.md:102-130(rails, dual-rail),docs/roce-ring.md:161(proxy ABI 14),docs/roce-ring.md:360-364(vendored-parity rule),docs/roce-ring.md:405,docs/cli-design.md:1695-1698(doctor wording, singular index),docs/cli-design.md:1707-1714("four DGX Sparks … RoCEv2 GID index 3").AGENTS.md:234maps multi-host transport changes todocs/orbit.md(not opened),docs/multi-host.md,docs/roce-ring.md— none updated.
Claims and evidence
| Claim | Backing |
|---|---|
"cargo test … — passed" (×2, identifiers blank in the rendered body) |
No command, crate, feature set or counts. The two new tests are named; the --features roce suite is not mentioned. |
| "End-to-end hardware verification on 2× GB10 … eliminated the sequence-1 RoCE collective timeout … GLM-5.3-Flash-FP4-Local, greedy parity, C1–C4, full eval suite" | Unverifiable as written: no numbers, no commands, no logs. Plausibly the #151 scenario, but not linked. |
| Previously "dropped any active HCA whose IPv4 RoCEv2 GID lived at a different index" | Verified before/after in discover_in (roce_fabric.rs:404-431 vs main's global-index filter). |
| "rail/flag-offset mismatch" caused the sequence-1 timeout | Consistent with the proxy's flag[src][slot][rail] layout (roce_proxy.c:14-21) and #151's "HCA 0, sequence 1"; not demonstrated. |
"roce_create_with_gids with bounds validation, roce_create intact as a backward-compatible wrapper" |
Verified (roce_proxy.c:531-601); wrapper has no caller in-tree, so its "backward compatibility" is untested. |
Doctor shows "index N" or "indices [a, b]" |
Verified (spark.rs:187-200); the terminal Warn path still says "at RoCEv2 GID index {}" (spark.rs:250-256). |
gid_index_for falls back to gid_index "for backward compatibility" |
Verified (roce_fabric.rs:1006-1011, roce.rs:199-203); fallback is .get(index)-style, so a short/empty vec silently degrades to the single index. Only implicit coverage (existing fixtures use Vec::new()). |
Also: the posted description lost its inline code spans (file names, symbols and test commands render as blanks), so the two test lines cannot be reproduced from the description alone; there is no Discord: handle; and there are no tests declared for roce.rs, the one changed file CI cannot execute.
Reach
- Behaviour on every multi-HCA host: the kept-device set now depends on "does this HCA have a RoCEv2 IPv4 GID anywhere", not on one shared index. On CaptKitCarson's real tables (IPv4 at 5, IPv6 at 3 on both HCAs) both rules pick 5, so no change; they diverge exactly in the mixed case, where main dropped the HCA.
Fabric::gid_indexsemantics now "first device's index", which propagates to prep viaheliopause/src/python.rs:692-704→ignition/preparation/collectives.py:83(not opened), to the doctor's fallback message, and todocs/cli-design.md's wording.- Operator-visible: the doctor's output text changes for mixed hosts (new wording, no config surface change). No new flag/env var/default.
- Compatibility:
PROXY_ABIstays 14 (roce.rs:23),roce_blob_tand exported-core ABI untouched;roce_createkeeps its signature and a new symbol is added, so old callers link. Wire effect is limited to each HCA'ssgid_index(roce_proxy.c:680); the destination GID comes from the peer blob (roce_proxy.c:650/679), so peers may legitimately differ. Rendezvousencode/decodeunchanged → no mixed-build rejection, but no mixed-build guard either. - Deployment: applies to any host where serving plans rails; the tested configuration is 2× GB10 / dual-rail CX-7. Unaffected consumers checked:
flare-cli/src/cluster.rs:196,238andflare-cli/src/fabric.rs:40usediscover()for endpoints only;selene/src/shared/rdma.rs:161-202has its own independent per-device GID rule. - Dependency: forking the vendored FlashInfer
roce_proxy.cmeans the next re-vendor (#643-style) must reconcile this change, and #649/#577 rebases must account for it.
Process
Ready-for-review from the start, single commit, hours old at case-file time. No review, no CI run, no labels, no linked issue, no Autobot case-file comment. Applicable process: docs/design-review.md:298 requires a Design-Signed-Off-By: <identity>; design-review=<4 hex> trailer enforced by .githooks/commit-msg:15 (could not confirm whether c582b10 carries one); docs/design-review.md:252-259 mandates live multi-GPU execution for transport changes — the PR claims it, without commands or logs; AGENTS.md:103-112 requires each claim tied to command, configuration and result.
Open questions / not verifiable from the repository
- Does
c582b10carry a validDesign-Signed-Off-By/design-reviewtrailer? - Which exact
cargo testinvocations were run, and did any of them enable--features roce(i.e. execute the FFI path)? - Was the FlashInfer upstream change corresponding to
roce_create_with_gidssubmitted, and at which revision?roce_proxy.c:6-8androce_proxy_dlopen.c:7-9still claim byte parity. - Is the intended contract that preparation also becomes per-HCA?
roce_gid_index()andignition/preparation/collectives.py:83(not opened) are untouched, and no follow-up is mentioned. - Does this change actually close #151 (whose rails are both at GID 3) or only the #143/CaptKitCarson table case? No linkage either way.