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
- Vendored transport divergence until
flashinfer#209merges:helios/native/roce_proxy.c:6-8,helios/native/roce_proxy_dlopen.c:7-9, anddocs/roce-ring.md:360-364mandate byte-for-byte parity with FlashInfer's_roce_proxy.c(not opened) (pyproject.toml:47tracks FlashInfermain). Merging before#209lands onmainforks the vendored proxy, risks silent drift if#209changes in review, and collides on the same vendored file with open#577and#649. - Preparation fallback on mixed-index hosts: Until
flashinfer#209merges (or on un-updated localb12xinstalls),ignition/preparation/collectives.py:86-93silently takes the scalargid_index=flare_heliopause.roce_gid_index()branch (first device's index), which can still prepare 1 rail while serving connects 2 rails on mixed-index hosts. - Low runtime hot-path risk, pre-existing CI blind spot: No wire struct (
roce_blob_t),ROCE_ABI_VERSION(14), or data-path function (proxy_main,post_op,post_striped,ring_service) changed; all added checks are O(n_hca <= 4) on cold startup paths. However,.github/workflows/native-serving.yml:63 (not opened), 111-113onlycargo checks--features roce,rdma, so the new C/FFI and preflight tests (helios/src/execution/roce.rs:483-485, 537-599) do not execute in CI.
Walkthrough
helios/native/roce_proxy.c:259, 262-269, 423, 460-464, 531-595, 673-674: Movesgid_indexfromroce_ctx_tonto per-HCAroce_hca_t, passes each HCA's index intoopen_hca(ibv_query_gid) andconnect_qp(ah_attr.grh.sgid_index), addsroce_create_with_gidswithNULLand0..=255bounds checks before allocation, and keepsroce_createas a compatibility wrapper (ROCE_ABI_VERSION = 14androce_blob_tunchanged).helios/src/execution/roce_fabric.rs:224-228, 308-320, 406-430, 468-472, 1005-1047, 1189-1253: Selects each active HCA's RoCEv2 IPv4 GID index independently (preferringPREFERRED_GID_INDEX = 3per HCA, else that HCA's lowest valid index in0..16), replaces scalargid_indexwithpub gid_indices: Vec<u32>onFabricandTopology, validatesgid_indices.len() == endpoints.len()inFabric::topology, and adds mixed-index and per-HCA preference-3 unit tests.helios/src/execution/roce.rs:46-61, 181-187, 206-224, 397-406, 483-485, 537-599: Switches FFI fromroce_createtoroce_create_with_gids, rejectstopology.gid_indices.len() != topology.hcas.len()inRoceTransport::openpreflight before zeroing the region or loadinglibibverbs, and adds unit tests covering the length-mismatch preflight and CNULL/-1/256rejection.heliopause/src/python.rs:668-669, 693-727&ignition/preparation/collectives.py:80-98: Exposesflare_heliopause.roce_devices() -> list[tuple[str, int]], updatesroce_gid_index()docs/delegation, and passes alignedhca_namesandgid_indicesintoroce.AllReducewhen supported byroce.AllReduce.__init__(with a scalar fallback otherwise).flare-cli/src/doctor/spark.rs:152-195, 242-281, 550-615&docs/cli-design.md:1696-1699: Storesgid_index: u32onInterface, resolves each HCA's ownports/1/gid_attrs/ndevs/{gid_index}, formats uniform vs. mixed indices via sharedformat_gid_indiceson both Pass and Warn paths, adds a decoy-index-3 test covering both paths, and updatesdocs/cli-design.md.
Pre-merge Checks
- [PASS] Security / malicious screen: Pure local sysfs GID scanning, bounds-checked (
0..=255) C array validation before allocation/verbs calls, and rank-localsgid_indexwiring; no new network exposure, env vars, or unsafe boundary weakenings. - [WARN] Charter & value fit: Right problem, right layer, model-agnostic, targets DGX Spark/SM121 with no new flags or magic defaults, but still lands a vendored
helios/native/roce_proxy.cupdate ahead of unmerged upstreamlocal-inference-lab/flashinfer#209(docs/roce-ring.md:360-364). - [WARN] Related / duplicate / conflict check: Genuinely additive on top of
#369,#506,#643, and#666(no duplicate), but depends on unmergedlocal-inference-lab/flashinfer#209and toucheshelios/native/roce_proxy.cconcurrently with open#577and#649. - [WARN] Tests & verification evidence: Unit tests and exact commands (
35/35--features roceexecution::roce,4/4doctor::spark,66/66FlashInfer pytest, 2-node dual-CX7 GB10 serving[3, 5]) are verified and consistent with the codebase; warning remains because.github/workflows/native-serving.yml:63 (not opened), 111-113never executes--features rocetests in CI and the cited Rust runs were debug rather than--locked --release.
Blockers
- Vendored
helios/native/roce_proxy.cis updated ahead of unmergedlocal-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.cafter its 9-line header to remain byte-for-byte identical to FlashInfer's_roce_proxy.c(not opened) on the upstream dependency (pyproject.toml:47trackslocal-inference-lab/flashinferbranchmain). Opening#209is the right step, but#209is not yet merged (no merged commit SHA is cited). Merging#672first forksroce_proxy.cfrom FlashInfermain(risking silent drift if#209changes before merge), leaves fresh installs taking the legacy single-GID preparation path inignition/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#209onto FlashInfermainfirst, verifytail -n +10 helios/native/roce_proxy.chas 0 diff bytes against the merged FlashInfer commit, and cite that exact merged commit SHA in the PR description (matching#643).
- Verified behavior/impact: Three in-repo contracts require
Should Fix
- Fail loudly instead of silently falling back to the first device's GID index on mixed-index hosts when
b12xlacksgid_indices(ignition/preparation/collectives.py:80-93).- Verified behavior/impact: When
"gid_indices"is absent fromroce.AllReduce.__init__, lines92-93pass{"gid_index": flare_heliopause.roce_gid_index()}, which returns onlyfabric.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 installedb12x, preparation silently runs with a single GID index (opening 1 rail or failing on rail 1) while native serving now connects both rails. Additionally, line81describes b12x as"pinned", whereaspyproject.toml:47tracksbranch = "main". - Concrete fix: Once
flashinfer#209merges ontomain(Blocker #1), either passhca_names+gid_indicesunconditionally (preferred — see## Subtract / Simplify) or calldevices = flare_heliopause.roce_devices()before the signature check and raise aRuntimeErrorin theelsebranch wheneverlen({gid for _, gid in devices}) > 1(directing the user to updateflashinfer-python), and update line81's comment from"pinned"to"installed".
- Verified behavior/impact: When
Subtract / Simplify
- Drop the
inspect.signaturecompatibility branch and legacy scalar shim onceflashinfer#209merges (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#209is on FlashInfermain,ignition/preparation/collectives.py:83-93can unconditionally unpackflare_heliopause.roce_devices()intohca_namesandgid_indices, removing an untested dual-path runtime probe. If no external caller depends onflare_heliopause.roce_gid_index(), deletingroce_gid_index()(python.rs:669, 693-706) andFabric::gid_index()(roce_fabric.rs:1005-1010) also removes the unreachable.unwrap_or(PREFERRED_GID_INDEX)fallback.
- Once
Nits
- After re-vendoring from merged
flashinfer#209, re-run the Rust verification commands with--locked --release(matching CI and#643) and runcargo test --manifest-path heliopause/Cargo.toml(not opened) (not onlycargo check). - Consider adding
assert!(module.hasattr("roce_devices").unwrap());tobinding_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
- Discovery Dossier #5 / Correctness Lens Finding 2 ("PR description's
cargo testcommand omits--features roceand cannot produce 35 passed"): Stale — read from an outdated cached PR description. The current PR description explicitly runscargo test --manifest-path helios/Cargo.toml (not opened) --features roce --lib execution::roce, and the 35-test count matches5fa291d6exactly (7tests inhelios/src/execution/roce.rs+28tests inhelios/src/execution/roce_fabric.rs). - Correctness Lens Finding 2 (treating
.github/workflows/native-serving.yml:111-113(not opened) only runningcargo check --features roce,rdmaas a Major/Blocking requirement for PR #672): Pre-existing repository CI limitation (untouched by#672, and treated as a Merge Risk / Pre-merge Check warning rather than a blocker on merged#643and open#577/#649). Retained only as a factual Merge Risk / Pre-merge Check note. - Correctness Lens Finding 4 / Subtraction Lens #3 (delete
roce_create()or add a local comment inhelios/native/roce_proxy.c:585-595): Contradicts the vendored byte-identity rule (helios/native/roce_proxy.c:6-8,docs/roce-ring.md:360-364).roce_createis upstream FlashInfer's backwards-compatible C entry point and must not be modified or annotated locally in Flare. - Subtraction Lens #2 (delete
Fabric::topologylength check athelios/src/execution/roce_fabric.rs:1029-1035"along with its dedicated test caseroce.rs:484"): Misattributed and low-signal —roce.rs:484testsRoceTransport::open(roce.rs:181-187), notFabric::topology, and bothFabricandTopologyexposepubvectors, so keeping a 7-line early guard inFabric::topologybefore route planning is benign. - Correctness Lens Finding 5 / Value Prop (update
docs/multi-host.md(not opened) anddocs/roce-ring.md): Verified unnecessary —docs/multi-host.md:42 (not opened), 565already uses plural "IPv4 RoCEv2 GIDs",docs/roce-ring.md:360-364already states the vendored-parity rule accurately, anddocs/cli-design.md:1696-1697was already updated by this PR. - Value Prop / Discovery Dossier #8 ("missing mixed-build wire guard" & "Charter #215
pyproject.toml:47unpinned FlashInfer"): Wire guard is unnecessary because GID indices are strictly rank-local (roce_proxy.c:461, 674) androce_blob_tcarries only the 16-byte GID value (:644) with unchangedPROXY_ABI = 14;pyproject.toml:47'sbranch = "main"is pre-existing repo state (tracked under roadmap #215), not introduced by#672. - Subtraction Lens #4 / Value Prop ("0 diff bytes" in PR body is a process assurance; link
#151): Low-signal/incorrect — reporting a 0-bytediffagainst upstream is standard evidence (matching merged#643), and#151had both rails at GID index 3 so#672does not close it.