#1 [high] PR 725 scope: 4 rotated peer loops in roce_proxy.c
PR #725 (original-el8, head 8b06cda, 1 file, +11/-14) changes 4 peer-posting loops in helios/native/roce_proxy.c from for (p=0..world-1) if (p==rank) continue; to for (step=1..world-1) { int p = (c->rank + step) % c->world; ... }.
Sites (head): 1298 (post_op, inside 2-pass relayed-first loop at 1294-1307), 1437 (post_pipe_chunk), 1556 (post_credits), 1939 (run_varlen_op, inside while (posted < chunks)).
Base (ref=main read): post_op 1238-1241, run_varlen_op 1660-1663, identical fixed ascending order.
Verified invariants:
- world bounds 2..16 (roce_layout 389:
world < 2 || world > ROCE_MAX_PEERS), so% c->worlddivisor never 0; step range 1..world-1 visits every p != rank exactly once (rank+step mod world for step=1..world-1 is exactly Z_world \ {rank}). - relayed-first two-pass preserved: filter
(ring_relayed(c,p)!=0)!=want_relayedat 1300 unchanged; pass 0 = relayed, pass 1 = direct; rotation reorders within each pass only. - relay filter in post_pipe_chunk (1439,
phase==1 && c->relay && c->relay_via[p]>=0) preserved verbatim. - flags are per (source=rank, chunk/phase), not per destination: post_pipe_chunk flag_off uses
c->rank(1456-1459); pipe_chunk_arrived reads(world + s)(1471-1473). So destination order cannot affect flag-arrival semantics. - ring serial ordering safe:
c->ring_serial[rail](1159) is shared across targets on a rail, but relay next-hop groups are contiguous cyclic arcs in rank order, so a cyclic shift preserves ascending intra-next-hop serial order, which is what ring_service_slot (1025) / ring_service (1117-1135) require. - non-rotated all-peer loops are all setup/read-only (
credits_arrived1591, outstanding scan 1610,forwarded[]init 1654, connect/hca setup 508/673/747/767/806/838/850, ring_relays_origin 791) — leaving them ordered is correct. - other fan-outs post to neighbors only (post_ring2_step 1390-1425 to 2 neighbors; run_ring_bidir_op/post_ring_bidir_chunk 1733-1758 to CW/CCW), unaffected.
#3 [high] pr_diff is a stale-base artifact; real diff is the 4 loops
- pr_diff tool returned enormous diffs for many files (helios/src/async_transfer/*, docs, AGENTS.md, etc.) even though read_item/pr_files say exactly 1 file +11/-14. Cause: the local mirror's
mainref is incomplete/older (search_history fails: "Could not read c513e46... cannot simplify commit ef38cb9..."). Evidence: read_file ref=main reports roce_proxy.c has 1971 lines vs 2248 at head;search_code ref=mainfinds no KIND_RING_RS and no roce_create_with_gids, both of which are present at head. So the big pr_diff is a stale-base artifact; the real PR is the 4-loop rotation only. Do NOT report the ring_bidir/gid/ring_window content as this PR's change. - No barrier exists between per-rank posting loops, so the permutation guarantee holds only when all ranks sit at the same
stepindex; relief is statistical (collisions become prob. ~1/world instead of guaranteed). - No automated test exercises the C posting order;
cargo test --features roce --lib execution::rocetests are Rust-side (roce_layout, blob size 1176, ABIs, control words) and open no devices.
#2 [medium] Parity test now fails: pyproject flashinfer pin not advanced
tests/preparation/test_roce_proxy_parity.py:35-65 does assert b"".join(lines[9:]) == upstream_raw.read_bytes() where upstream = installed flashinfer's experimental/b12x/comm/roce/_roce_proxy.c (resolved via importlib.find_spec, line 20-32). PROVENANCE_LINES=9 (line 17), and line 9 must be a bare b"\n" (line 44).
pyproject.toml:47 (unchanged by this PR per pr_files/description): flashinfer-python rev = "1441ce862ffbc9d8550fdda7ad90e97ca04f4b8e".
Since the invariant held before the PR (vendored body == pinned upstream body) and the PR edits the vendored body without bumping the pin, this test fails at 8b06cda. PR description acknowledges: "pyproject.toml will need to pin the merged commit from local-inference-lab/flashinfer#221". No CI workflow reference to tests/preparation was found (grep of .github/workflows for "tests/preparation": no matches).