PR #672: fix(helios,roce): select RoCEv2 IPv4 GID index per HCA

Raw Markdown for agents: https://autobot.eidonix.com/api/v1/cases/bf06d9e0-7798-41d1-8565-d92850829543

Opened by a workflow run, Dec 1, 2026 10:04 PM EST. decide malicious: all_clear (100%): No malicious content found

explore

Author: nepenth (first-time contributor; no Discord handle given) Motivation: On multi-rail ConnectX-7 hosts each HCA can hold its IPv4 RoCEv2 GID at a different GID-table index; Helios used to pick one index for the whole host and throw away HCAs that differed, so prepared rail counts and runtime rail counts disagreed and multi-host collectives timed out on sequence 1. This PR makes the GID index a per-HCA property from discovery down to the native proxy's per-QP SGID. Scale: +187 / −40 lines in 4 files Proposal:

Full report · Notes

Classify intake

Selected: triage:review, priority:P2, bug, area:rocenante

Threshold: 65%

Triage

Priority

Type

Area

Model

Apply Labels (Intake)

Applied: +triage:review, +priority:P2, +bug, +area:rocenante

Value Proposition

Value Proposition — PR #672 "fix(helios,roce): select RoCEv2 IPv4 GID index per HCA"

Charter alignment — right problem, right layer (mostly). The change lives entirely in the multi-host transport path (roce_fabric.rs, roce.rs, roce_proxy.c) plus the doctor display. No per-model branch, no new flag/env var/config key, and PREFERRED_GID_INDEX = 3 is reused as a per-HCA preference rather than inventing a new default. Dual-rail CX-7 on 2× GB10 / SM121 is explicitly in-scope hardware per the charter's Goals. On "keep the runtime small and model-agnostic" and "no random switches," this is clean.

Novelty & status — genuinely additive. Nothing on main selects a GID index per HCA; #369 (merged 2026-11-21) only exposed the single prep-side rule, and no open PR (#576, #577, #649) does this. It is the serving-side continuation of the #143 defect class (open, P2), so the problem is real and maintainer-tracked. It builds on merged #666 and #506 with no conflict. Not obsolete, not superseded.

Where it conflicts with the charter. Two structural problems. (1) helios/native/roce_proxy.c is a vendored FlashInfer file whose header demands it stay identical; #643 (merged 2026-11-30) existed solely to restore byte parity, and #672 re-forks it one day later with no upstream revision cited — while #649 is currently blocked on that exact invariant. Under "pin everything / exact versions" (#215) and docs/roce-ring.md:360-364, that is blocking, not a rebase nuisance. (2) Fabric::gid_index silently changes meaning to devices[0].1 (roce_fabric.rs:430) while its outside consumer (heliopause/src/python.rs:692-704 → ignition/preparation/collectives.py:83) and its doc comment still assert the old host-wide rule. Preparation and serving therefore diverge in exactly the mixed case this PR fixes — reinstating the class of bug #369's "the rule exists once" was created to eliminate. The description does not mention this.

Value vs maintenance cost. The benefit is narrow but concrete: hosts where active HCAs hold their IPv4 RoCEv2 GID at different indices (the CaptKitCarson GID tables in #143) currently lose a rail and time out. Evidence does not meet the bar: two cargo test lines with blanked identifiers and an unsourced hardware paragraph — no command, crate/feature set, counts, or logs — well below #643's precedent and below AGENTS.md:103-112 / #210. CI only cargo checks --features roce (native-serving.yml:101-113), so the FFI change and its sole test are never executed; roce.rs gets no test. #151 — the closest user-visible symptom — has both rails at index 3, so this mechanism does not explain it, and the PR neither links nor posts to it. Cost: the file is also touched by #576/#577/#649, and the next re-vendor must reconcile the fork.

Verdict: Worth it with changes. The root cause is real and the location is right, but it should not land as-is. Required: (1) upstream roce_create_with_gids to the pinned FlashInfer revision, or obtain explicit maintainer sign-off to fork the vendored file; (2) make preparation per-HCA in the same PR or state the new gid_index contract explicitly so the single-index consumer is not silently wrong; (3) reproducible evidence — exact commands including a --features roce execution, counts, and a test or CI coverage for roce.rs; (4) a mixed-build rejection field per the #232 precedent; (5) refresh docs/multi-host.md, docs/roce-ring.md, docs/cli-design.md, and drop or justify the caller-less roce_create wrapper. Without (1)–(3), it should be declined.

No instructions directed at reviewers were found in the PR body or dossier.

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

Subtraction/simplicity review of #672. The Rust discovery rewrite is lean and strictly simpler than main, and the PR adds no flag, env var, config key, trait or module — nothing to trim there. Removable code is concentrated in the vendored C proxy and in redundant plumbing of the new per-HCA index.

  1. helios/native/roce_proxy.c:268 — roce_ctx_t.gid_index is now write-only: assigned at :558, and connect_qp reads hca->gid_index instead (:680). roce_ctx_t is opaque to the FFI and absent from roce_blob_t, so deleting field + assignment is ABI-neutral.
  2. roce_proxy.c:587-601 — roce_create wrapper is dead code with a duplicated bounds check (callee re-validates at :538, :544-549). Repo-wide grep finds no caller; the Rust FFI uses roce_create_with_gids (roce.rs:46, :205). Delete lines 587-601.
  3. gid_index is by construction gid_indices[0] (roce_fabric.rs:430-431) yet stored separately on Fabric (:224-225) and Topology (:310-311), with three fallback branches that are unreachable in production and untested — Fabric::topology :1027-1031, gid_index_for :1006-1011, roce.rs:199-203. The else arms are reachable only from four gid_indices: Vec::new() fixtures (roce_fabric.rs:1567/1682/1834, roce.rs:397). Collapse to one Vec<u32> + accessor and fix the fixtures: ~20 lines gone.
  4. (Low) flare-cli/src/doctor/spark.rs:150/179/187-198 keeps a parallel ready_gids vec plus a 12-line branch to print index N vs indices [a, b]; the warn path at :250-256 still prints singular. Fold the index into Interface (:267-273) or always print indices [...].
  5. Convention: roce_proxy.c:6-8 and roce_proxy_dlopen.c:7-9 still claim byte parity with FlashInfer, and docs/roce-ring.md:360-364 states that as the repo rule; AGENTS.md:234 requires multi-host/RoCE doc updates, absent here. AGENTS.md:188-193 ("no speculative compatibility, fallback layers") backs items 1-3.

Open: is the wrapper for an out-of-tree caller, or should it go? Does preparation also become per-HCA (heliopause/src/python.rs:692-704 untouched)? Was the upstream FlashInfer change submitted, at which revision?

Full report · Notes

Correctness and contracts

Review of PR #672 (per-HCA RoCEv2 IPv4 GID selection) — verdict: request changes. The plumbing itself is correct, but the fix is one-sided and silently changes a public contract.

Findings, severity-ranked:

  1. Major — the fix is one-sided. Serving now keeps both mixed-index HCAs, so rails becomes 2 on exactly the targeted hosts (roce_fabric.rs:1025), while preparation still opens every HCA at one host-wide index (ignition/preparation/collectives.py:83 → heliopause/src/python.rs:698-699). n_rail is baked into kernel flag addressing (roce_proxy.c:1259), and preflight only bounds-checks rails (roce.rs:152-162) — the prep/serving rail-count mismatch the PR blames for the sequence-1 timeout is not closed and can invert.
  2. Major — Fabric::gid_index semantics changed unannounced. It is now devices[0].1 (roce_fabric.rs:430); the field doc (:221-228), the roce_gid_index() doc contract (python.rs:692-693), the doctor's terminal Warn text (spark.rs:252-255) and the docs AGENTS.md:234 requires are all stale.
  3. Major — vendored-parity invariant broken. The C edit forks roce_proxy.c one day after #643 restored byte parity; the provenance header (roce_proxy.c:6-8), NOTICE:16-19 ("implementation is unchanged") and docs/roce-ring.md:360-364 still claim identity, no upstream revision is cited, and PROXY_ABI stays 14 (roce.rs:23).
  4. Major — the riskiest code has no executable coverage. CI only runs cargo check --features roce,rdma (native-serving.yml:113) and execution::roce is feature-gated (execution.rs:16-17), so the new per-HCA FFI branch and its silent length-mismatch fallback (roce.rs:199-203) are never run; the one fixture uses gid_indices: Vec::new() (roce.rs:397). The description's cargo test … lines render with blanked identifiers and the hardware evidence carries no command, counts or logs.
  5. Minor — silent degradation: gid_index_for falls back to gid_index via unwrap_or (roce_fabric.rs:1009-1011), i.e. the old bug rather than an error; two new tests leave gaps (never exercise "index 3 valid on both HCAs" or a truncated vector).
  6. No issue: per-HCA SGID is local-only and symmetric (roce_proxy.c:461,680, roce.rs:199-221); no hot-path, lock, memory, failure-propagation or cross-platform regression.

Open: whether c582b10 carries a Design-Signed-Off-By trailer; which exact commands were run; whether the upstream FlashInfer patch exists; whether preparation is meant to become per-HCA; and #151's closure is unproven (its rails both sat at GID 3).

Full report · Notes

Final review

Recommendation: Changes Requested

The core per-HCA GID discovery rewrite in helios/src/execution/roce_fabric.rs and the rank-local per-HCA SGID plumbing in helios/src/execution/roce.rs and helios/native/roce_proxy.c are technically sound, solve a real dual-rail ConnectX-7 defect at the right layer, and add no hot-path overhead or config switches. However, two blockers prevent merge as-is: helios/native/roce_proxy.c is locally forked ahead of its pinned upstream FlashInfer source (breaking the byte-identity invariant enforced on #643 and #577), and the PR ships its FFI/C changes with zero executable test coverage in CI or unit tests alongside blanked, unreproducible verification commands. In addition, silently redefining Fabric::gid_index to devices[0].1 breaks flare_heliopause.roce_gid_index()'s documented contract and leaves multi-host preparation one-sided on mixed-index hosts.

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

  1. Vendored helios/native/roce_proxy.c is locally forked without a merged upstream FlashInfer revision (helios/native/roce_proxy.c:6-8, 259, 461, 531-601, 680; helios/native/roce_proxy_dlopen.c:7-9; docs/roce-ring.md:360-364; NOTICE:16-19)

    • Behavior / impact: Both C provenance headers and docs/roce-ring.md:360-364 mandate keeping helios/native/roce_proxy.c byte-for-byte identical to FlashInfer's flashinfer/experimental/b12x/comm/roce/_roce_proxy.c (not opened) after the 9-line header so preparation and serving share the exact transport implementation. Maintainers enforced this invariant directly on #643 (merged one day before this PR to restore 0-byte diff against FlashInfer 2a07747b8) and #577. Editing roce_proxy.c locally without an upstream FlashInfer commit breaks parity, leaves NOTICE:18-19's "implementation is unchanged" statement false, and forces future re-vendors (#577, #649) to reconcile an untracked fork.
    • Fix: Land roce_create_with_gids and per-HCA roce_hca_t.gid_index upstream in local-inference-lab/flashinfer first (keeping ROCE_ABI_VERSION = 14 unchanged so existing exported cores continue to load), then re-vendor _roce_proxy.c (not opened) byte-for-byte after the provenance header and cite the merged upstream FlashInfer commit SHA in the PR description.
  2. Missing executable test coverage for roce.rs / roce_proxy.c and unreproducible verification claims (.github/workflows/native-serving.yml:63 (not opened), 109-113; helios/src/execution.rs:16-17; helios/src/execution/roce.rs:199-221, 394-406, 408-529; docs/roce-ring.md:381-384; docs/design-review.md:247-259; AGENTS.md:103-112)

    • Behavior / impact: helios/src/execution/roce.rs is gated on #[cfg(feature = "roce")]. CI's native job omits roce, and the rdma job only runs cargo check --locked --manifest-path flare-cli/Cargo.toml (not opened) --tests --features roce,rdma. Every existing test in roce.rs:408-529 fails preflight before line 199 (and specification() sets gid_indices: Vec::new() at :397), so neither the Rust per-HCA dispatch (roce.rs:199-221) nor the new C validation loop (roce_proxy.c:538-549) is exercised anywhere. Meanwhile, both cargo test bullets in the PR description render with blanked code spans (no commands, crates, features, or pass counts), no --features roce execution is reported (required by docs/design-review.md:247-251), and the hardware claim omits commands, core ID, and results (AGENTS.md:103-112).
    • Fix:
      • Add unit tests in helios/src/execution/roce.rs that populate non-empty topology.gid_indices and directly exercise roce_create_with_gids bounds validation (NULL gid_indices, < 0, > 255—which runs at roce_proxy.c:538-549 before open_hca and requires no RDMA hardware).
      • Run and report exact commands and counts for cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) --features roce --lib execution::roce and the flare-cli doctor tests (plus exact hardware verification command/core/outcome details in the PR description), and ensure the commit carries a valid Design-Signed-Off-By trailer per .githooks/commit-msg:56-63.

Should Fix

  1. One-sided serving fix silently changes Fabric::gid_index / flare_heliopause.roce_gid_index() and leaves mixed-index preparation inconsistent (helios/src/execution/roce_fabric.rs:430; heliopause/src/python.rs:692-700; ignition/preparation/collectives.py:80-85; helios/native/roce_proxy.c:1259; helios/src/runtime_core/model.rs:46-59; helios/src/execution/roce.rs:147-162)

    • Fabric::gid_index changed from the host-wide rule ("3 when every active device has a RoCEv2 IPv4 GID there, otherwise the lowest index at which one does") to devices[0].1 (whichever active device sorts first by name). heliopause/src/python.rs:692-699 still documents the old rule and passes fabric.gid_index into ignition/preparation/collectives.py:83 (roce.AllReduce(..., gid_index=flare_heliopause.roce_gid_index())).
    • On a mixed-index host (e.g., roceP2p1s0f0 at 5 and rocep1s0f0 at 3, or roceP2p1s0f0 at 3 and rocep1s0f0 at 5 with empty gids/3), roce_gid_index() returns devices[0].1, causing b12x preparation to either drop the second HCA (preparing 1-rail kernels while serving opens 2 rails—inverting the exact n_rail flag-offset mismatch in roce_proxy.c:1259, undetected because RoceSpec does not record rail count) or open the second HCA at a non-IPv4 GID.
    • Fix: Pair the upstream FlashInfer PR with per-HCA gid_indices support in b12x.comm.roce.AllReduce and thread per-HCA indices through flare_heliopause into ignition/preparation/collectives.py:83. If preparation support is explicitly deferred to a follow-up, update heliopause/src/python.rs:692-699 to state the actual semantics accurately and disclose the mixed-index preparation limitation in the PR description.
  2. Doctor's terminal Warn fallback and CLI doc still assume a single host-wide GID index (flare-cli/src/doctor/spark.rs:250-256; docs/cli-design.md:1695; helios/src/execution/roce_fabric.rs:221)

    • When discover() succeeds on a mixed-index host (e.g., [3, 5]) but no active CX7 endpoint resolves a local IPv4 prefix, spark.rs:252-255 still reports "at RoCEv2 GID index {}" with only fabric.gid_index (devices[0].1), misleading operators about the second HCA's index. docs/cli-design.md:1695 ("serving's RoCEv2 GID index") and roce_fabric.rs:221 ("the GID index ... they use") are similarly singular.
    • Fix: Format uniform vs. mixed indices consistently in spark.rs:252-255 (reusing the same label helper as :187-198), and update docs/cli-design.md:1695 and helios/src/execution/roce_fabric.rs:221 to reflect per-HCA GID indices.

Subtract / Simplify

  1. Delete write-only roce_ctx_t.gid_index (helios/native/roce_proxy.c:268, 558): c->gid_index is written once (c->gid_index = gid_indices[0];) and read nowhere in the file (open_hca at :461 and connect_qp at :680 both use hca->gid_index). roce_ctx_t is opaque across FFI and not part of roce_blob_t. Remove both lines (in the upstream FlashInfer change as well) to eliminate dead, misleading state.
  2. Collapse duplicate gid_index / gid_indices storage and three unreachable fallback branches (helios/src/execution/roce_fabric.rs:224-225, 310-311, 1009-1011, 1027-1031, 1567, 1682, 1834; helios/src/execution/roce.rs:199-203, 397): discover_in always populates gid_indices 1:1 with non-empty endpoints. Keeping both fields and three silent scalar fallbacks violates AGENTS.md:188-193 ("no speculative compatibility or fallback layers") and silently masks truncated/mismatched vectors instead of failing fast. Store only gid_indices: Vec<u32> on Fabric and Topology (with a derived gid_index(&self) -> u32 accessor if heliopause still needs a scalar), validate topology.gid_indices.len() == topology.hcas.len() in RoceTransport::open preflight (roce.rs:152-180), and populate real gid_indices in the four test fixtures.
  3. Avoid dead roce_create shim in-tree and fold doctor's parallel ready_gids vec into Interface (helios/native/roce_proxy.c:587-601; flare-cli/src/doctor/spark.rs:150, 172-198, 267-273): roce_create has zero in-tree callers and duplicates the n_hca bounds check (:591-594 vs :538); if FlashInfer's Python callers switch to roce_create_with_gids when upstreaming, drop roce_create upstream too (otherwise cover it in FlashInfer's proxy tests). In spark.rs, add gid_index: u32 to Interface (:267-273) instead of maintaining a parallel ready_gids vector (:150, 179).

Nits

  1. Tighten per-HCA test coverage (helios/src/execution/roce_fabric.rs:1182-1219; flare-cli/src/doctor/spark.rs:540-578): Add a case in roce_fabric.rs where an HCA has valid IPv4 RoCEv2 GIDs at both index 1 and index 3 (pinning the per-HCA PREFERRED_GID_INDEX = 3 preference), and write a decoy IPv6 gids/3 + gid_attrs/ndevs/3 on roce1 in spark.rs:540 so the doctor test fails if it regresses to reading ndevs/3.
  2. Restore blanked inline code spans in the PR description: Multiple filenames, symbols, and both cargo test commands rendered as blanks in the PR body (AGENTS.md:134-135).

Dropped on verification

Full report

Classify triage

Selected: triage:review

Threshold: 65%

Triage

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: nepenth (first-time contributor; no Discord handle given) Motivation: On hosts with two RoCE network cards, each card can list its IPv4 RoCEv2 GID at a different table index. The code assumed one index for the whole host and silently dropped any card that differed, so preparation and serving disagreed about the rail count and multi-host collectives timed out at sequence 1. This PR makes the index a per-card property end to end. Scale: +187 / −40 in 4 files as recorded (stale: the head tree also changes heliopause/src/python.rs, ignition/preparation/collectives.py and docs/cli-design.md, so ≥7 files) Proposal:

Full report · Notes

Classify intake

Selected: triage:review, priority:P2, bug, performance, area:rocenante

Threshold: 65%

Triage

Priority

Type

Area

Model

Apply Labels (Intake)

Applied: +performance

Subtraction and simplicity

Subtraction/Simplicity/Conventions review of #672 at head 5fa291d6. No blocking finding: the earlier big targets are genuinely fixed in the pushed tree — roce_ctx_t.gid_index is gone (helios/native/roce_proxy.c:262-269), Fabric/Topology carry only gid_indices (roce_fabric.rs:223-228, :308-320), the three duplicated fallbacks are gone (roce_fabric.rs:1013-1015, :1040, roce.rs:206), and the doctor stores gid_index on Interface with one shared format_gid_indices used in both Pass and Warn paths (spark.rs:190, :246, :259-272).

Remaining, in severity order:

  1. Medium — ignition/preparation/collectives.py:83-93 version-sniffs b12x and adds a second, untested prep path whose scalar branch still returns one device's index; delete the probe, the gid_index branch, roce_gid_index (heliopause/src/python.rs:693-706) and Fabric::gid_index() (roce_fabric.rs:1004-1010, whose unwrap_or(PREFERRED_GID_INDEX) arm is unreachable) once flashinfer#209 is pinned; if it cannot be pinned, add nothing. Mechanism has repo precedent (tensor_metadata.py:138 (not opened)).
  2. Low — the GID/HCA length invariant is guarded twice on the Rust side (roce_fabric.rs:1029-1035 and roce.rs:181-187); Topology is cloned from Fabric&apos;s own vectors in one constructor, so keep the roce.rs preflight (it precedes write_bytes at :205) and delete the other plus its test case (roce.rs:484). The C guard must stay.
  3. Low — roce_create (roce_proxy.c:585-595) has no in-tree caller (only roce_create_with_gids is declared, roce.rs:46-61); its duplicate n_hca guard is already removed, so deleting it is an ABI/vendored-parity decision to make explicitly, here and in flashinfer#209.
  4. Low — convention: the description's "0 diff bytes" byte-identity check is a process assurance (AGENTS.md:129-132, :513); the durable statement belongs in docs/roce-ring.md:362-363, which the PR does not touch. Also the recorded pr_diff/description are still the stale 4-file c582b10 view — read the diff from GitHub.

Already lean: pick_gid_index closure, no new flags/knobs/env vars, reuse of PREFERRED_GID_INDEX, compact C validation at the ABI boundary.

Open: is flashinfer#209 pinned/merged (decides finding 1); does the pushed description carry --features roce and the 35-test count; does upstream keep roce_create.

Full report · Notes

Correctness and contracts

Verdict: core is correct; hold Changes Requested on evidence, pinning and vendored parity.

The per-HCA RoCEv2 GID logic is sound end to end: discovery pairs device i with index i in one pass (helios/src/execution/roce_fabric.rs:407-429), Fabric carries only gid_indices (roce_fabric.rs:224-228), RoceTransport::open hard-rejects a length mismatch before touching the region (helios/src/execution/roce.rs:181-187) and then passes the vector with no fallback (roce.rs:206). The index is local-only — only the peer GID value crosses the wire — so no proto/ABI change is needed (ABI still 14). C guards precede allocation (roce_proxy.c:537-549); doctor's Pass and Warn paths both use format_gid_indices (flare-cli/src/doctor/spark.rs:190, :246). No concurrency, hot-path, memory or metric-span regression.

Findings that matter:

  1. Major — preparation sniffs the installed b12x API (ignition/preparation/collectives.py:81-93) while pyproject.toml:47 tracks FlashInfer main; the scalar fallback returns only the first device's index, so prep/serving divergence persists on mixed-index hosts (charter #215).
  2. Major — CI never runs the new FFI/preflight tests: helios tests use --features runtime-core,server (.github/workflows/native-serving.yml:63 (not opened)), only cargo check uses roce (:113); roce.rs:537 is human-run-only.
  3. Major — vendored byte-identity is asserted, not verifiable (roce_proxy.c:6-8, docs/roce-ring.md:362-363), and this PR adds an exported symbol to that file; if flashinfer#209 differs, prep and serving compile different proxies under ABI 14.
  4. Minor — roce_create (roce_proxy.c:585-595) has no in-tree caller.
  5. Minor — docs/multi-host.md un-updated.

Description claims mostly check out (35 = 7 roce.rs + 28 roce_fabric.rs tests; mixed-index test at roce_fabric.rs:1189-1219), except the quoted helios command omits --features roce.

Open: is flashinfer#209 merged at a named SHA; is FlashInfer still unpinned; was the description updated; did the rebase force-push; has auto re-review fired (still zero human reviews).

Tooling note: pr_files/pr_diff and read_file without ref serve a stale c582b10 revision — cite only at ref: pr/672.

Full report · Notes

Re-review

Recommendation: Changes Requested

Commit 5fa291d6 cleanly resolves Round 1's technical and test-coverage issues: per-HCA GID discovery in roce_fabric.rs, single-source-of-truth gid_indices, hard preflight rejection before region mutation in roce.rs, per-HCA sgid_index wiring in roce_proxy.c, preparation wiring via flare_heliopause.roce_devices(), doctor pass/warn formatting, and executable --features roce FFI/preflight tests (35/35 passing) are all verified and sound with no hot-path or wire-ABI regressions. One Round 1 blocker remains open at the merge gate: helios/native/roce_proxy.c is updated ahead of unmerged local-inference-lab/flashinfer#209, violating the repository's byte-identity vendoring rule (helios/native/roce_proxy.c:6-8, docs/roce-ring.md:360-364) and leaving FlashInfer main on the legacy single-GID preparation path until #209 lands. Hold merge until flashinfer#209 merges on FlashInfer main, cite its merged commit SHA, and close the silent mixed-index fallback in ignition/preparation/collectives.py.

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

  1. Vendored helios/native/roce_proxy.c is updated ahead of unmerged local-inference-lab/flashinfer#209 (helios/native/roce_proxy.c:6-8, 259, 531-595, helios/native/roce_proxy_dlopen.c:7-9, docs/roce-ring.md:360-364, pyproject.toml:47).
    • Verified behavior/impact: Three in-repo contracts require helios/native/roce_proxy.c after its 9-line header to remain byte-for-byte identical to FlashInfer's _roce_proxy.c (not opened) on the upstream dependency (pyproject.toml:47 tracks local-inference-lab/flashinfer branch main). Opening #209 is the right step, but #209 is not yet merged (no merged commit SHA is cited). Merging #672 first forks roce_proxy.c from FlashInfer main (risking silent drift if #209 changes before merge), leaves fresh installs taking the legacy single-GID preparation path in ignition/preparation/collectives.py:92-93, and diverges from the merge-order invariant enforced on #643, #577, and #649.
    • Concrete fix: Merge local-inference-lab/flashinfer#209 onto FlashInfer main first, verify tail -n +10 helios/native/roce_proxy.c has 0 diff bytes against the merged FlashInfer commit, and cite that exact merged commit SHA in the PR description (matching #643).

Should Fix

  1. Fail loudly instead of silently falling back to the first device's GID index on mixed-index hosts when b12x lacks gid_indices (ignition/preparation/collectives.py:80-93).
    • Verified behavior/impact: When "gid_indices" is absent from roce.AllReduce.__init__, lines 92-93 pass {"gid_index": flare_heliopause.roce_gid_index()}, which returns only fabric.gid_indices[0] (heliopause/src/python.rs:697-703, helios/src/execution/roce_fabric.rs:1005-1010). On a mixed-index host (e.g., [3, 5]) running an older installed b12x, preparation silently runs with a single GID index (opening 1 rail or failing on rail 1) while native serving now connects both rails. Additionally, line 81 describes b12x as "pinned", whereas pyproject.toml:47 tracks branch = "main".
    • Concrete fix: Once flashinfer#209 merges onto main (Blocker #1), either pass hca_names + gid_indices unconditionally (preferred — see ## Subtract / Simplify) or call devices = flare_heliopause.roce_devices() before the signature check and raise a RuntimeError in the else branch whenever len({gid for _, gid in devices}) > 1 (directing the user to update flashinfer-python), and update line 81's comment from "pinned" to "installed".

Subtract / Simplify

  1. Drop the inspect.signature compatibility branch and legacy scalar shim once flashinfer#209 merges (ignition/preparation/collectives.py:83-93, heliopause/src/python.rs:669, 693-706, helios/src/execution/roce_fabric.rs:1005-1010).
    • Once local-inference-lab/flashinfer#209 is on FlashInfer main, ignition/preparation/collectives.py:83-93 can unconditionally unpack flare_heliopause.roce_devices() into hca_names and gid_indices, removing an untested dual-path runtime probe. If no external caller depends on flare_heliopause.roce_gid_index(), deleting roce_gid_index() (python.rs:669, 693-706) and Fabric::gid_index() (roce_fabric.rs:1005-1010) also removes the unreachable .unwrap_or(PREFERRED_GID_INDEX) fallback.

Nits

  1. After re-vendoring from merged flashinfer#209, re-run the Rust verification commands with --locked --release (matching CI and #643) and run cargo test --manifest-path heliopause/Cargo.toml (not opened) (not only cargo check).
  2. Consider adding assert!(module.hasattr("roce_devices").unwrap()); to binding_tests::raw_replay_exports_require_qualification_feature (heliopause/src/python.rs:734-750) so the new PyO3 export is asserted by unit tests.

Dropped on verification

Full report 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.

Classify triage

Selected: triage:review

Threshold: 65%

Triage

Apply labels

No label changes