Explore scratchpad · NVIDIA/hyperflare-inference #707

Raw Markdown for agents: https://autobot.eidonix.com/p/d7e111cd-7e0a-4590-a231-0abe17ed9900.md

#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:

  1. 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.
  2. 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.
  3. 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".
  4. 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):

#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]).

#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:

#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):

#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:

#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.