Pre test report report · NVIDIA/hyperflare-inference #725

Raw Markdown for agents: https://autobot.eidonix.com/p/298e8892-2e84-4dec-8908-3f4315fc6030.md

Hardware test plan — PR #725 (helios: rotate RoCE proxy peer send order by rank)

Head verified at da7abad; diff is helios/native/roce_proxy.c (+227/−46) and pyproject.toml (+1/−1). Of that, only four loop headers are the PR's own change (roce_proxy.c:1460-1461, :1602-1603, :1729-1730, :2115-2116); the remaining ~150 lines plus the pin bump are the re-vendored upstream flashinfer@3c5c7b148 required by tests/preparation/test_roce_proxy_parity.py:48-65.

Bottom line

Book no GPU time for cn5 or cn7. The change cannot produce a measurable result on either machine, for one structural reason:

What is worth the machines is a ~75-minute correctness pass — the property the reviewer actually flagged as unverified ("the cited 35 Rust unit tests do not open IB verbs or execute any of the four rotated loops"). That needs CPUs and NICs, not GPUs.

Hard constraint the plan is built around: world = 2 cannot test this change

At world = 2 the rotated loop is behaviourally identical to the old one: step takes only the value 1, so p = (rank + 1) % 2 is the single peer — exactly what the old p != rank skip visited. Therefore a 2-rank pair (cn7 alone, or cn5↔cn7 over Soft-RoCE) cannot exhibit or measure the rotation at all, and its passing would be evidence about nothing.

The change is only observable at world >= 3, and its claimed benefit only at world >= 4 (the PR's own problem statement: "on switched mesh fabrics (world >= 4)").

Phase 0 — CPU gates (cn7 or cn5, no GPU, ~20 min)

Run on a checkout of da7abad, from the checkout root.

  1. Vendored-proxy parity — this is the gate the PR exists to satisfy, and it has never been observed green here; it validates pyproject.toml:47 end to end (no uv.lock exists in the repo, so the pyproject.toml:47 rev is what resolves).
    uv sync --extra prepare --extra test
    .venv/bin/python -m pytest tests/preparation/test_roce_proxy_parity.py -q
    
    Pass = 3 tests green (test_vendored_roce_proxy_is_byte_identical_to_pinned_flashinfer plus the two GID/create tests). A failure prints a unified diff of the divergence up to 4 KB (test_roce_proxy_parity.py:51-65) — attach it verbatim; it distinguishes "wrong pin" from "vendored body edited after re-vendor".
  2. Full prep CPU suite (CI's exact command, python-cpu.yml:33) so an unrelated import break isn't discovered later:
    CUDA_VISIBLE_DEVICES="" .venv/bin/python -m pytest tests/ -q
    
  3. Native conformance tests (requires libibverbs-dev + a C compiler, docs/roce-ring.md:387-388):
    cargo test --locked --release --manifest-path helios/Cargo.toml (not opened) --features roce --lib execution::roce
    
    Expect 35 passed. This is a regression check only — it opens no RDMA device and cannot reach the four loops. Do not let it be reported as validation of the rotation.
  4. Architecture-specific compile parity. On cn5 (amd64) the proxy is not compiled by default (flare-cli/Cargo.toml:27 gives flare-helios without roce; only the aarch64 target at :43-44 enables it), so a plain x86 build would silently skip the changed file:
    cargo check --locked --manifest-path flare-cli/Cargo.toml --tests --features roce,rdma   # native-serving.yml:113
    
    That is also what CI checks — but CI is amd64 only, so run step 4 on cn7 too: it is the only place the proxy is actually compiled by default, and the shipped arm64 path.
  5. Fabric inventory for the next phase (record output, not pass/fail):
    /usr/bin/flare doctor --plain      # cn7: GB10 CX7 check; cn5: PCIe/NVML checks
    ibv_devices; ibv_devinfo
    
    On both nodes expect the CX7 fabric check to be "not applicable" (adapter absent) per docs/cli-design.md:1710-1717. Record the device list: if it shows no rxe* devices, phase 2 is unavailable and must be reported as such rather than faked.

Phase 1 — Live multi-verb exercise of all four rotated loops (cn5 preferred, no GPU, ~30 min)

The strongest attainable on-hardware exercise is 4 local ranks over Soft-RoCE, each rank pinned to one device so that ranks reach each other over an Ethernet/IP path instead of loopback. This runs the real vendored proxy with real IB verbs and real relays, at a world where the rotation is observable.

Setup (cn5, amd64; the proxy is built out of tree there, see step 4):

sudo rdma link add rxe0 type rxe netdev <if0>     # one rxe device per distinct /24 or /25 subnet,
sudo rdma link add rxe1 type rxe netdev <if1>    # max 4 devices are discovered per host
sudo rdma link add rxe2 type rxe netdev <if2>    # (roce_fabric.rs:424 MAX_DEVICES; docs/multi-host.md:68-69)
sudo rdma link add rxe3 type rxe netdev <if3>
ibv_devinfo -v | grep -E 'hca_id|state|gid'      # each: PORT_ACTIVE + a RoCEv2 IPv4 GID

Discovery requires port1_active and a RoCEv2 IPv4 GID (roce_fabric.rs:402-427) — an rxe port without both is silently skipped, which would drop world below 4 and invalidate the run. Verify discovery before launching anything.

Run — upstream FlashInfer CPU proxy validator (docs/roce-ring.md:328-348; the repo holds no copy, so use a checkout of the pinned 3c5c7b148). Four processes on cn5, identical options except rank:

python3 tests/experimental/b12x/comm/validate_roce_ring_native.py (not opened) \
  --rank 0 --world-size 4 --rendezvous 127.0.0.1:29783 \
  --iterations 120 --skew-rank 2 \
  --hca-names rxe0 rxe1 rxe2 rxe3 --gid-index <idx>     # --mesh on every rank: direct routing
# repeat the identical command with --ring-open on every rank: chain/relay path

It covers mixed one-shot, two-shot and variable-length transfers — i.e. post_op, post_pipe_chunk, run_varlen_op and (indirectly) post_credits — including empty contributions, unequal shards, delayed senders and buffer reuse. --skew-rank is the important flag here: the rotation's mechanism is per-rank skew in posting order, so a run without skew tests the easy case only.

Two runs, both required: --mesh (direct routing; exercises the rotated post_op and post_pipe_chunk non-relay passes, which is exactly what the PR's benchmark measured) and --ring-open (chain; exercises the rotated relay ordering, which the PR's mesh-only evidence never touched).

Known failure signatures, so the engineer can attribute a failure without guessing:

Phase 2 (optional, 20 min) — check the claim's mechanism, not just correctness

The PR asserts the rotation spreads per-receiver arrival. That is checkable cheaply, and it is the one place the direction of the claim can be observed without a CX-7 mesh: during the phase-1 mesh run, sample per-device counters on the four rxe ports

sar -n DEV 1 60   # or: cat /sys/class/net/<if>/statistics/{tx_bytes,rx_bytes,rx_dropped}

and confirm traffic is distributed across all four devices rather than concentrated on one. This is weak, direction-only evidence (software verbs, no switch egress, no incast) and must be labelled as such — it cannot support the +1.05% / +1.50% numbers.

Phase 3 — what must be deferred, and what the next hardware run must be

Do not attempt the served-workload A/B on cn5/cn7. It requires: a multi-host core with world >= 4, four same-architecture hosts, and a switched CX-7 fabric. The PR's numbers came from exactly that (4-node GB10 SM121, dual-rail 200GbE CX-7, DeepSeek-V4.1-Flash TP4). A 4-node GB10 bench is the minimum configuration that can reproduce or refute it. Optionally, --roce-switch-only (docs/multi-host.md:134-139) gives a switch-only baseline, which is the fabric shape whose incast this PR targets.

When that run is scheduled, the current evidence needs these four upgrades, because as submitted it cannot support a 1% claim:

  1. n ≥ 5 interleaved passes per arm, not 2–3 sequential ones. The existing 10,618-token row has overlapping per-pass ranges (main 9866.0/9869.4/10053.6 vs branch 9916.1/9833.8/10226.2 — the ranges overlap, so that row is noise), and decode C=4/C=16 are negative.
  2. Report per-pass ranges and SD, not just means; keep the raw JSONL.
  3. Incast counters at last — the word "incast" appears in the claim but no NIC/switch counter backs it. Capture, per receiver port: PFC pause frames/priority, rx_discards, rx_out_of_buffer, and switch egress queue drops. Without these the mechanism is unmeasured and the win is unexplained.
  4. Measure the exact head (da7abad), or state the equivalence explicitly.

Findings the test engineer and reviewers should carry forward

  1. The measured arm is not the merged code — but the equivalence holds for Shape::Mesh, and I verified why. The A/B compared main vs 8b06cdac (rotation only), not head da7abad (rotation + re-vendored hairpin pacing). The claimed justification is that roce_set_hairpin_peers is never called. That is correct in this repo: the FFI extern block (helios/src/execution/roce.rs:35-76) does not export roce_set_hairpin_peers, and the only writer of c->hairpin_pacing is roce_proxy.c:891. Hence passes == 1 and want_paced == 0 (:1599-1601, :2112-2114), the filters at :1607/:2117 always short-circuit, and the want_paced ? ... : ... ternary always selects post_striped (:1628-1632). Even so, phase 0 step 4 on cn7 is what proves the head binary is the thing that compiles and loads.
  2. x86_64 RoCE is explicitly unqualified. docs/multi-host.md:54-55 ("Not qualified: x86_64 RoCE serving on RDMA hardware; its coverage is functional, over Soft-RoCE") and docs/roce-ring.md:350-354. So cn5 results are functional-only and cannot be cited as a qualification step; the qualified configuration remains GLM-5.3 Flash TP4 on four cabled Sparks.
  3. ~150 lines of the diff are dead in this repo. roce_set_hairpin_peers (:874), peer_outstanding (:1299), post_striped_paced (:1307-1422) and HAIRPIN_* (:206-213) have no caller, and cannot be deleted here because parity pins the file to upstream. Their rotation × pacing combination is untested by anyone — #725 measured mesh with pacing dead, #712 measured pacing with un-rotated loops. Once #712 lands, that combination needs its own hardware pass on Shape::HairpinRing/HairpinChain.
  4. post_credits (:1729) is control-plane: 4 inline bytes per direct peer on rail 0 lane 0 (12 bytes at world=4), and credits_arrived is order-independent. It cannot contribute to the measured prefill gain; the PR is honest that it is rotated "for uniformity". It is, however, one of the four functions #712 rewrites, so it is the hunk with conflict cost and no measurable upside — dropping it narrows the diff and removes one guaranteed merge conflict.
  5. Pin contention: open #731 re-pins the same pyproject.toml:47 line to 6aff33c4; #712 edits both the same proxy file and the same pin line. Merge #725 first, then #712 rebases with its proxy/pin hunks dropped and #731 re-pins. If any of these lands second without rebasing, phase 0 step 1 fails and the failure will look like a proxy bug rather than a pin collision — check the pin before debugging the C.
  6. Wording that hardware evidence should be pinned to. "Eliminating synchronized (world-1):1 incast" overstates the mechanism: there is no inter-rank step barrier, so ranks skewed by one or more steps can still target the same receiver. The testable claim is "breaks lockstep (world-1):1 posting" — a reduction in collision probability, which is precisely what phase 3's counters would have to show.

Time and resource budget

Phase Machine GPUs Wall time Gives
0 cn7 (and cn5 for step 4) 0 ~20 min Parity gate actually green; proxy compiled and loadable on both arches; Rust conformance regression
1 cn5 0 ~30 min First live-verbs execution of all four rotated loops at world=4, mesh and relay paths, with skewed ranks
2 cn5 0 ~20 min Direction-only confirmation of traffic spreading
3 4-node GB10 CX-7 (not available today) 4×4 separate booking The only configuration that can test the +1.05% / +1.50% claim

Total on available hardware: ≈75 minutes of CPU and NIC, zero GPU-hours. Marking the decision to test as met, with the recommendation that the merge gate not be treated as satisfied by this pass: phases 0–2 establish correctness, not the claimed speedup, and the PR's performance claim remains supported only by n=2–3 passes on hardware we do not have.