Recommendation: Changes Requested
The C change itself (helios/native/roce_proxy.c, +11 / -14) is clean, minimal, and free of verified code defects: all four rotated peer loops visit every p != rank bijectively, preserve ROCE_ABI_VERSION = 14, preserve relayed-first and relay_via filters, and preserve ring mailbox serial ordering. However, the PR cannot merge as-is due to two verified hard gates: (1) helios/native/roce_proxy.c diverges from the pinned FlashInfer revision at pyproject.toml:47, breaking tests/preparation/test_roce_proxy_parity.py in python-cpu.yml, and (2) as a performance/transport-reordering PR, it lacks the mandatory main-vs-branch served-workload benchmark (Charter #210, docs/design-review.md:109-115) and live multi-GPU collective execution + before/after cross-rank happens-before analysis (docs/design-review.md:252-259).
Merge Risk
Level: Medium
- Guaranteed CI failure on head:
tests/preparation/test_roce_proxy_parity.py:35-65runs under.github/workflows/python-cpu.yml:29-33(not opened) and fails untillocal-inference-lab/flashinfer#221lands andpyproject.toml:47is repinned. - Unvalidated runtime behavior on live RDMA hardware: The cited 35 Rust unit tests (
execution::roce) do not open IB verbs or execute any of the four rotated loops, and no multi-node switched-mesh or ring benchmark has been run. - Direct merge overlap with open
#712: Same author's open#712modifies the same four functions inhelios/native/roce_proxy.c(+222 / -38) with its own companion FlashInfer PR (flashinfer#220); whichever lands second will need a rebase and coordinated FlashInfer pin.
Walkthrough
helios/native/roce_proxy.c:1296-1306(post_op): replacesfor (int p = 0; p < c->world; p++)+p == c->rankskip withfor (int step = 1; step < c->world; step++) { int p = (c->rank + step) % c->world; ... }, preserving the two-passwant_relayedfilter (:1293-1302).helios/native/roce_proxy.c:1437-1441(post_pipe_chunk): applies the same rank-rotated loop, removing the now-redundantp == c->rank ||branch while keeping thephase == 1 && c->relay && c->relay_via[p] >= 0guard verbatim.helios/native/roce_proxy.c:1556-1563(post_credits): applies the same rank-rotated loop for 4-byte inline credit writes while preserving thering_relayed(c, p)relay branch.helios/native/roce_proxy.c:1939-1951(run_varlen_op): applies the same rank-rotated loop inside the per-chunk variable-length all-gather posting loop while keepingposted % c->n_lanelane selection and source-keyed flags unchanged.- Verified invariants:
worldis bounded to2..=16(roce_layout:389),ring_post:1159allocates monotonicc->ring_serial[rail]at post time so per-relay arrival order stays strictly ascending for any peer permutation, andROCE_ABI_VERSIONremains14(:160, matchinghelios/src/execution/roce.rs:23) with zero wire or core-format changes.
Pre-merge Checks
- [PASS] Security / malicious screen: Pure local loop-order change in C proxy; no new network surface, credentials, flags, or prompt-injection content.
- [WARN] Charter & value fit: Right layer and minimal footprint (no new flags or per-model branches, ABI 14 preserved), but misses the Charter's mandatory performance-PR benchmark gate (
#210) and dependency-pinning parity rule (#215). - [WARN] Related / duplicate / conflict check: Genuinely additive (not duplicated on
main), but directly overlaps open#712(same author, same four functions inhelios/native/roce_proxy.c, companionflashinfer#220vs#221). - [WARN] Tests & verification evidence:
execution::roceunit tests (35 passed) do not exercise the four rotated loops;tests/preparation/test_roce_proxy_parity.pyfails against the currentpyproject.toml:47pin; live multi-GPU collective execution and served A/B benchmarks are unrun.
Blockers
-
Vendored proxy diverges from pinned FlashInfer revision, breaking mandatory CPU parity CI (
helios/native/roce_proxy.c:6-8,pyproject.toml:47,tests/preparation/test_roce_proxy_parity.py:35-65).- Verified behavior/impact:
helios/native/roce_proxy.c:6-8anddocs/roce-ring.md:363-365require the vendored body (lines 10..EOF) to stay byte-identical to the pinned FlashInfer_roce_proxy.c(not opened). On8b06cda,pyproject.toml:47still pinsflashinfer-pythonto1441ce862ffbc9d8550fdda7ad90e97ca04f4b8e(prior tolocal-inference-lab/flashinfer#221), so.github/workflows/python-cpu.yml:29-33(not opened) (uv sync --extra prepare --extra test+pytest tests/ -q) will failtest_vendored_roce_proxy_is_byte_identical_to_pinned_flashinfer. Per Charter#215anddocs/design-review.md:180-186,247-251, disclosing the missing pin bump as a limitation does not waive a failing Layer-1 CPU check. - Fix: Merge
local-inference-lab/flashinfer#221first, bump[tool.uv.sources].flashinfer-python.revatpyproject.toml:47to that merged commit in this PR, and re-runpytest tests/preparation/test_roce_proxy_parity.pycleanly.
- Verified behavior/impact:
-
Missing mandatory performance benchmark, live multi-GPU collective execution, and cross-rank happens-before analysis (
docs/design-review.md:109-115,252-259, Charter#210).- Verified behavior/impact: The PR is motivated as a congestion/performance optimization for switched-mesh fabrics (
world >= 4), and it reorders cross-rank RDMA posting paths in the native RoCE transport backinghelios/src/execution/roce.rs. The only executed check (cargo test ... --features roce --lib execution::roce, 35 passed) is an offline ABI/preflight suite that never reaches the four rotated loops (docs/roce-ring.md:379-385). Charter#210anddocs/design-review.md:109-115require amain-vs-branch served-workload A/B measurement for performance PRs, anddocs/design-review.md:252-259explicitly requires an explicit before/after cross-rank happens-before analysis plus live multi-GPU execution of real collective graphs (which cannot be waived by disclosing unavailable hardware). - Fix: Add to the PR description: (a) a concise before/after cross-rank happens-before argument covering flag/credit/ring-mailbox order independence (including that ring/
relay_viaintra-pass peer order also changes, intentionally); (b) live multi-GPUflare runcollective verification on an exported ABI-14 core; and (c) a matchedmain-vs-branch served-workload A/B table on aworld >= 4switched-mesh (or target) fabric showing actual speedup (matching the evidence format used in#707/#712).
- Verified behavior/impact: The PR is motivated as a congestion/performance optimization for switched-mesh fabrics (
Should Fix
None.
Subtract / Simplify
- Consider dropping the
post_creditsrotation (helios/native/roce_proxy.c:1553-1586): Unlikepost_op,post_pipe_chunk, andrun_varlen_op,post_creditswrites only a single 4-byte inline credit word per direct peer on rail 0 lane 0 (:1568,1575) — 12 bytes total atworld = 4— which cannot drive multi-MB egress incast, andcredits_arrived(:1589-1597) is order-independent. Leavingpost_creditsuntouched narrows the diff to payload loops and removes one conflict site with#712(andflashinfer#220/#221); if kept for uniformity, note in the PR description that one of the four loops is control-plane.
Nits
- Precision on the incast claim (
helios/native/roce_proxy.c:1296-1297and PR description): Because ranks poststep = 1 .. world - 1back-to-back without an inter-rank step barrier, the cyclic shift breaks systematic lockstep(world - 1):1synchronization rather than strictly guaranteeing zero arrival-time incast (ranks skewed by one or more steps can still target the same receiver concurrently). Softening "eliminating synchronized(world - 1):1incast" to "breaking lockstep(world - 1):1incast" and briefly noting that ring/relay_viaintra-pass peer order also rotates would match the mechanism more precisely.
Dropped on verification
- Code Correctness lens downgrade of
test_roce_proxy_parity.pyfailure to "Minor" (claiming no CI workflow runstests/preparation): Refuted and upgraded to Blocker #1 —.github/workflows/python-cpu.yml:29-33(not opened) runsuv sync --extra prepare --extra testand.venv/bin/python -m pytest tests/ -q, which executestests/preparation/test_roce_proxy_parity.pyon every PR. - Subtraction lens rewrite of
roce_proxy.c:1296-1297("onto rank 0, 1, ...sounds like named hot receivers"): Dropped —"rank 0, 1, ..."accurately refers to the ascending sequence0, 1, 2, ...of the previous loop, and cosmetic comment churn would require mirroring inlocal-inference-lab/flashinfer#221. - Subtraction lens rename of loop counter
step→visit/i(roce_proxy.c:1298,1437,1556,1939): Dropped — function-local variable with zero shadowing againstpost_ring2_step(..., int step)(:1390); not worth dual-repo churn inflashinfer#221. - Code Correctness lens hot-path
% c->worldstrength-reduction note: Dropped — negligible next to RDMA posting latency, and a tail wraparound (if (++p == c->world) p = 0;) would silently break on earlycontinue;paths at:1301,:1440, and:1562. - Merge overlap with
#712and unobservableDesign-Signed-Off-By/ CI status: Dropped from Blockers/Should Fix per review calibration rules (#712coordination is noted in Merge Risk and Pre-merge Checks only).