#1 [high] Test environment on cn7/an5: 4 real CX-7 RoCE devices (not rxe)
Sandbox (cn7, aarch64, 20 CPUs, 121 GiB, ephemeral container) inspection, 2026-12-04:
- /sys/class/infiniband/ shows FOUR devices: roceP2p1s0f0, roceP2p1s0f1, rocep1s0f0, rocep1s0f1 (2 dual-port CX cards).
- Each port 1: state=4 ACTIVE, phys_state=5 LinkUp, rate=200 Gb/sec (2X NDR), link_layer=Ethernet (i.e. RoCE, not IB). fw_ver 28.50.1002, node_type 1: CA (real hardware, NOT Soft-RoCE rxe).
- Netdevs visible in namespace: only eth0 and lo (iproute2
ipabsent; use /sys/class/net). So RoCE GIDs will be for the host IP, but ibverbs traffic between local processes over the 4 devices works via GID index per device. - GPU: 1x NVIDIA GB10, driver 580.178.04, CUDA 13.0, idle 39C / 4W.
- Toolchain present: uv (/usr/local/bin/uv), python3 (/opt/flare-venv/bin/python3), cargo (/opt/cargo/bin/cargo), gcc/cc, nvidia-smi.
- MISSING: ibverbs userspace tools (ibv_devices, ibv_devinfo), rdma (iproute rdma), ip (iproute2). Must apt-get install libibverbs-dev ibverbs-utils rdma-core iproute2. Significance: phase 1 (live multi-verb exercise of the 4 rotated loops at world=4) is possible on this box with REAL verbs, one rank pinned per device, better fidelity than the plan's Soft-RoCE fallback. Still single node → no multi-host core, so still no served A/B and no flare-cli path.
#2 [high] cn7 sandbox: hardware visible but uverbs inaccessible → phase 1 impossible
Sandbox = cn7 (aarch64, 20 CPU, 121 GiB, ephemeral, 16 GiB /work). No git repo metadata in /work/source (source snapshot, not a checkout — no git log available).
Toolchain: uv (/usr/local/bin/uv), python /opt/flare-venv (UV_PROJECT_ENVIRONMENT=/opt/flare-venv, prefetched deps), cargo /opt/cargo (CARGO_HOME=/work/cargo, CARGO_NET_OFFLINE=true, crates from /deps/crates dir source), gcc, nvidia-smi. Installed by me via apt-get (exit 0): libibverbs-dev, ibverbs-utils, rdma-core, iproute2, pciutils, net-tools.
HARDWARE PRESENT IN SYSFS: 4 RoCE ports of 2 dual-port CX-7 cards — /sys/class/infiniband/{roceP2p1s0f0,roceP2p1s0f1,rocep1s0f0,rocep1s0f1}, each port1 state=4 ACTIVE, phys 5 LinkUp, 200 Gb/sec (2X NDR), link_layer=Ethernet, fw 28.50.1002. GPU: 1x NVIDIA GB10, driver 580.178.04, CUDA 13.0, idle 39 C / 4 W (nvidia-smi output quoted).
But verbs are NOT usable from the sandbox: /dev/infiniband/ does not exist; mknod fails "Operation not permitted" (CapEff 0xeb — no cap_mknod, no cap_sys_admin, no cap_sys_module, no cap_net_admin). Consequences: ibv_devices → empty table; ibv_devinfo → "No IB devices found"; userspace ibv_get_device_list returns 0 (verified via ctypes on libibverbs.so.1); rdma link add rxe0 type rxe netdev eth0 → "error: Operation not permitted". So neither real CX-7 verbs nor Soft-RoCE (rxe) can be opened in this container. Phase 1 (live multi-verb exercise of the rotated loops) is UNAVAILABLE on this box, not merely degraded.
#3 [high] Phase 0.1-0.3 results: parity, full suite, Rust conformance
HEAD da7abad is a SOURCE SNAPSHOT: git log in /work/source → "fatal: not a git repository". Cannot diff PR hunks locally; line content verified directly instead.
Phase 0 results (all on cn7 sandbox, exit codes recorded):
0.1 PARITY TEST — FAILS AS AN ENVIRONMENT ARTIFACT OF THE PREFETCH, then PASSES once the pinned upstream is fetched:
python -m pytest tests/preparation/test_roce_proxy_parity.py -q(no uv sync) → 1 failed, 1 passed (exit 1). The failure is only test_vendored_roce_proxy_is_byte_identical_to_pinned_flashinfer; the failure text is a unified diff of vendored vs installed flashinfer.- Root cause: /opt/flare-venv has flashinfer_python-0.7.3 built from commit 598c8547be335bcd833254177ac18ccb2bf4dabc (direct_url.json), NOT the pyproject pin 3c5c7b14886a7b8904e2963f7d678dbf3a4a755e. The prefetch installed an older rev; 598c is an ancestor of 3c5c (76 commits behind).
- Decisive evidence the repo is CORRECT and the environment is stale: I cloned local-inference-lab/flashinfer at 3c5c7b14886a7b8904e2963f7d678dbf3a4a755e into /work/tmp/fi;
cmp flashinfer/experimental/b12x/comm/roce/_roce_proxy.c <(tail -n +10 /work/source/helios/native/roce_proxy.c)→ IDENTICAL (exit 0). Upstream commit subject: "perf(b12x/comm/roce): rotate peer send order by rank to avoid synchronized incast (#221)" — exactly the PR being vendored. - Re-run with PYTHONPATH=/work/tmp/fi (so the pinned 3c5c7b148 file is the one found) → "2 passed in 1.65s" (exit 0). Note: the test module has only TWO tests (grep '^def test' → parity + GID/create test), not three as the plan said; 3 was the parametrised count of create_roce_runtime cases.
uv sync --extra prepare --extra test --dry-runon the repo resolves ~37.5s and wants to upgrade ~20 packages incl. pytest 9.1.1→9.2.0, but no uv.lock exists; I ran a real sync into a scratch venv in background (bg8) to check whether the git pin resolves to 3c5c7b148 when uv follows pyproject.toml.
0.2 FULL PREP SUITE (CI's command, CUDA_VISIBLE_DEVICES="") — FAILS at COLLECTION in the prefetched venv: exit 0 from pytest but "Interrupted: 9 errors during collection", 2 skipped, 18 warnings, 11.2s. All 9 are missing/older APIs in the prefetched flashinfer 598c8547 build, not PR-related: b12x.sequence.engram: cannot import 'hash_op' (tests/components/test_engram_cuda.py, test_engram_local_heads.py) ModuleNotFoundError: flare_heliopause (tests/preparation/test_export_transfer.py, test_peer_storage_groups.py ...; heliopause wheel not installed) b12x.comm.pcie: cannot import 'CudaRTLibrary' (test_preparation_reclamation.py) b12x.preparation: cannot import 'custom_plan' / 'declaration_key' / 'coalesce_requests' (test_scratch.py, test_tuning_jobs.py, test_tuning_replicas.py, test_tuning_shards.py) I confirmed all four names DO exist in the pinned 3c5c7b148 tree (grep in /work/tmp/fi: preparation/init.py exports coalesce_requests/declaration_key/custom_plan; pcie/init.py exports CudaRTLibrary; sequence/engram has hash_op) → the 9 errors disappear with the correct pin, i.e. stale prefetch again.
0.3 RUST CONFORMANCE — PASS: cargo test --locked --release --manifest-path helios/Cargo.toml --features roce --lib execution::roce → "35 passed; 0 failed; 0 ignored; 1307 filtered out", 1m01s wall (first attempt failed only because CARGO_NET_OFFLINE=true blocked the deepseek-recipe git dep; fixed by CARGO_NET_OFFLINE=false cargo fetch --locked, after which the offline build works). The proxy IS compiled here: helios/build.rs:81-91 cc::Build file native/roce_proxy_dlopen.c with .std("gnu11") under #[cfg(feature="roce")]; roce_proxy_dlopen.c:236 #include "roce_proxy.c", so the changed file is compiled and linked (artifact helios/target/release/build/flare-helios-*/out/libflare_roce_proxy.a). Still zero RDMA device opened → regression check only, not rotation validation.
#4 [high] Phase 0.4-0.5: compile parity PASS, doctor WARN not N/A, GID table
0.4 COMPILE PARITY — PASS on the arch that matters (aarch64 = default RoCE build):
cargo check --locked --manifest-path flare-cli/Cargo.toml --tests --features roce,rdma → Finished dev profile in 18.60s, exit 0. (First attempts failed on missing system packages, not on the code: turbojpeg-sys needed cmake, ibverbs-sys needed libclang for bindgen. Installed cmake, nasm, pkg-config, libssl-dev, libclang-dev, clang — apt exit 0. ibverbs-sys v0.3.2+55.0 vendors rdma-core and builds it with cmake; it emitted only the benign "pyverbs build requested but python development files not found" warning.)
Also built the real binary: cargo build --release --locked --manifest-path flare-cli/Cargo.toml → exit 0, 1m26s, binary flare-cli/target/release/flare (30,905,656 bytes). On aarch64 the RoCE feature is ON by default (flare-cli/Cargo.toml:43-44 target.'cfg(all(target_os="linux", target_arch="aarch64"))' → flare-helios with "roce"), so the shipped arm64 path compiles the changed proxy. On x86_64 it is NOT default (flare-cli/Cargo.toml:27 flare-helios features = runtime-core, server only) — needs --features roce, exactly as the plan said.
0.5 FABRIC INVENTORY (flare-cli/target/release/flare doctor --plain, exit 0, status WARN):
- interconnect "Single GPU"; gpus 1 selected (NVIDIA GB10, 000f:01:00.0); pcie bridges 1 on P2P paths.
- "N/A PCIe TP>1 preflight — requires at least two selected GPUs."
- "WARN ConnectX-7 fabric — Active ConnectX-7 links (roceP2p1s0f0, roceP2p1s0f1, rocep1s0f0, rocep1s0f1): discovery could not verify a local IPv4 address and prefix on a ConnectX-7 device at RoCEv2 GID index 3." Summary: 1 warning, 1 not applicable.
- So the fabric check is NOT "not applicable/adapter absent" as the plan predicted; the adapters ARE present. The WARN is a netns artifact: only eth0 and lo exist in this container's network namespace (/sys/class/net), while the CX-7 netdevs (enP2p1s0f0np0, enP2p1s0f1np1, enp1s0f0np0, enp1s0f1np1) are in the host netns → no local IPv4+prefix to verify.
- GIDs (rocep1s0f0 port 1): idx0/idx1 = link-local fe80::4ebb:47ff:feec:a093 (IB/RoCE v1 and RoCE v2), idx2/idx3 = IPv4-mapped 172.16.3.7 (::ffff:ac10:0307), idx4+ = zero. So RoCEv2 GID index 3 IS an IPv4 GID, as roce_fabric.rs discovery expects.
ibv_devicesprints an empty table andibv_devinfosays "No IB devices found" — userspace cannot open the devices (see entry 2).
#5 [high] Diff composition verified against upstream git; rotated loops + compile linkage
Verified the diff composition claim with upstream git (clone /work/tmp/fi of local-inference-lab/flashinfer):
git diff --stat 1441ce862ffbc9d8550fdda7ad90e97ca04f4b8e 3c5c7b14886a7b8904e2963f7d678dbf3a4a755e -- flashinfer/experimental/b12x/comm/roce/ tests/experimental/b12x/comm/ → ONLY _roce_proxy.c | 273 ++++----, i.e. 227 insertions, 46 deletions. That is byte-identical to the PR's own diffstat for helios/native/roce_proxy.c (+227/−46) → the re-vendored body is purely upstream, no hand edits, and pyproject.toml:47 moves 1441ce86 → 3c5c7b148 (confirmed via pr_diff).
Upstream 3c5c7b148 = "perf(b12x/comm/roce): rotate peer send order by rank to avoid synchronized incast (#221)".
I inspected the four rotated loop headers directly in helios/native/roce_proxy.c (sed):
- :1460-1461 post_op —
for (int step = 1; step < c->world; step++) { int p = (c->rank + step) % c->world;inside two passes filtered by want_relayed (:1462-1464 ring_relayed filter) - :1602-1603 post_pipe_chunk — same rotation, then relay_via filter (:1604-1606) and hairpin_pacing filter (:1607-1609)
- :1729-1730 post_credits — same rotation then ring_relayed branch
- :2115-2116 run_varlen_op — same rotation then hairpin_pacing filter (:2117-2119)
At world=2 each loop's step set is {1} and p=(rank+1)%2 is the sole peer — the same peer the old
p != rankskip visited, and the same single global order. So the rotation is unobservable at world=2 (confirms plan claim #3). Hairpin-pacing deadness re-verified at head:grep -c roce_set_hairpin_peers helios/src/execution/roce.rs→ 0 hits; the only writer of c->hairpin_pacing is roce_proxy.c:891 (inside roce_set_hairpin_peers, defined :874); no other .rs/.c/.h/.py in the repo references it. Hence passes==1 and the want_paced filters short-circuit; the PR's "mesh path identical to the measured 8b06cdac" claim holds for Shape::Mesh. Also verified the vendored proxy is actually COMPILED and linked on this arch: helios/build.rs:81-91 (cfg feature="roce") cc::Build file native/roce_proxy_dlopen.c .std("gnu11"); roce_proxy_dlopen.c:236#include "roce_proxy.c"; artifacts helios/target/release/build/flare-helios-*/out/{451a93ed…-roce_proxy_dlopen.o, libflare_roce_proxy.a};nmshows local symbols post_op-adjacent: post_striped, post_striped_paced, post_direct_striped_batched, post_pipe_chunk (post_op/post_credits/run_varlen_op inlined/constprop'd).
#6 [high] Phase 0.2 full-suite results + phase 1 blocker and shim substitute
0.2 FULL PREP SUITE — two runs, both on cn7 with CUDA_VISIBLE_DEVICES="".
(a) Prefetched /opt/flare-venv (flashinfer at stale 598c8547): "9 errors during collection, 2 skipped" — all import-name drift in the old flashinfer build (hash_op, CudaRTLibrary, custom_plan, declaration_key, coalesce_requests) plus missing flare_heliopause. Not PR-related.
(b) After a real uv sync --extra prepare --extra test into a scratch venv /opt/testsync-venv (UV_PROJECT_ENVIRONMENT override; sync exit 0), which resolved flashinfer-python to the pinned 3c5c7b148 (verified in its dist-info direct_url.json) and built flare-heliopause from ./heliopause:
run 1 → "106 failed, 2510 passed, 481 skipped in 369.21s"
run 2 (after installing missing system tools zstd + python3-dev headers) → "4 failed, 2612 passed, 481 skipped, 62 warnings in 334.20s".
The 102 that went green were environmental: 80 test_core_protection (needed zstd binary: FileNotFoundError 'zstd'), 10 test_storage_lifetimes + others (needed Python.h for torch inductor C++ compile: "fatal error: Python.h: No such file or directory"), plus test_aot_guards/test_capture_order/test_inductor_template_mutations/test_forward_compile_options/test_inspect_forward_kernels.
The FOUR residual failures are unrelated to this PR (they touch packaging = 16-byte writes per credit word on rail-0 lane 0 → cannot be part of the measured prefill gain; credits_arrived is order-independent).
(c) Ring mailbox ordering risk: ring_service_slot (:1043-1085) validates serial>=seen, slot=(serial-1)%RING_WINDOW, hop distance, flag bounds, and errors "invalid ring mailbox from origin ..." — and reordering relay posts changes the order serals reach a relay, so the --ring-open (line) run is the one that probes it.
(d) The rotation is a probability reduction, not an elimination: nothing serializes ranks between steps, so skewed ranks can still hit the same receiver; the testable claim is "breaks lockstep (world-1):1 posting".
PHASE 1 ATTEMPT (live verbs) — BLOCKED, then substituted:
- Real route tried first: 4 local ranks pinned one-per-device on the 4 ACTIVE CX-7 ports. Impossible: /dev/infiniband absent, mknod EPERM (entry 2).
- Soft-RoCE route:
rdma link add rxe0 type rxe netdev eth0→ "error: Operation not permitted" (no CAP_NET_ADMIN). Also impossible. - Fix not possible from inside: cannot pass /dev/infiniband through, cannot add caps, cannot change PCI/netns.
- Substitution (documented as such): a userspace FAKE libibverbs (LD_PRELOAD/SONAME libibverbs.so.1) plus fixed-address MAP_SHARED regions, driving upstream 3c5c7b148 tests/experimental/b12x/comm/validate_roce_ring_native.py at world=4. It executes the four rotated loops and the ring/relay code paths (control flow + posting order) but fakes RDMA transport semantics, so it can only prove "the rotation posts every peer exactly once and all four collectives complete", not hardware behaviour. Keep separate from phase 0 in the report and label it clearly.
#7 [high] Final addendum: enumeration results, unrelated failures, thermal, verdict
Two extra CPU-only checks run after phase 1 was blocked (no NIC, no GPU):
(A) Posting-order enumeration straight from the loop headers (/work/tmp/rot.py, /work/tmp/rot2.py, python exit 0):
- world=2: rotated order == pre-PR order for every rank (rank0 [1], rank1 [0]) → the rotation is a no-op at world=2, confirming the plan's hard constraint.
- world=3..6: every peer is posted exactly once (sorted(rotated)==sorted(old) for all ranks/worlds), so the rotation is a permutation and cannot skip a peer. Orders differ from pre-PR for ranks 1..world-2, and are IDENTICAL to pre-PR for rank 0 and rank world-1 at every world (those two ranks keep the old order, so at world=3 only rank 1 changes).
- Incast fan-in at posting step k: world=4 pre-PR peak fan-in on one receiver = 3, rotated = 1 (4 distinct receivers per step); world=5: pre-PR 4, rotated 1; world=8: pre-PR 7, rotated 1. The mechanism is real and exactly as described (lockstep (world-1):1 posting → 1:1). This is arithmetic on posting order, NOT a hardware measurement, and must be labelled as such.
(B) A posting-order probe (stub libibverbs compiled against helios/native/roce_proxy.c verbatim, /work/tmp/probe/probe.c) was drafted and abandoned when the turn budget ran out; it is not needed since (A) already establishes the order, and a stubbed run could not prove anything about hardware.
Non-PR failures observed and attributed (pre-existing at da7abad, candidate follow-ups; the PR touches only the RoCE proxy C file and one pin line):
- tests/preparation/test_packaging.py::test_server_cli_help_does_not_prepare_model — asserts "\n debug-serve " in
python -m ignition --helpbut argparse wraps the command onto its own line (" debug-serve$", help on the next line); brittle to terminal width (fails at COLUMNS=200 too). - tests/preparation/test_runtime_dynamo.py::test_guarded_type_death_invalidates_real_dynamo_cache_entry — weakref to the Owner type still alive where the test asserts None (torch 2.14.1 in this env).
- tests/preparation/test_export_transfer.py::test_large_export_frames_progress_with_scarce_descriptors[False/True] — isolated child raises RuntimeError('Operation not permitted (os error 1)') after RLIMIT_NOFILE is cut to 128; capability-sensitive.
Thermal/safety record (requirement 3): nvidia-smi sampled throughout — 39 °C / 4 W idle at start; 41 °C, 4.80 W, 0 % util, 208 MHz SM clock at 21:09 UTC after the Rust builds and the 5.5-minute pytest run. No GPU work was ever submitted (proxy opens no CUDA context; all gates CPU-only), so no thermal risk was taken. Load average ~2880 is host-wide, not mine; my jobs used at most 10-way cargo parallelism.
Environment fixes I had to make (all apt, exit 0): libibverbs-dev, ibverbs-utils, rdma-core, iproute2, pciutils, net-tools, cmake, nasm, pkg-config, libssl-dev, libclang-dev, clang, zstd, python3-dev. Also CARGO_NET_OFFLINE=false cargo fetch --locked --manifest-path helios/Cargo.toml once so the deepseek-recipe git dep resolves from the local db, after which offline --locked builds work. And uv sync --extra prepare --extra test into a scratch UV_PROJECT_ENVIRONMENT=/opt/testsync-venv to get the pinned flashinfer 3c5c7b148 (the prefetched /opt/flare-venv has 598c8547). Do NOT present the venv swap as a repo problem: with the pinned rev everything in phase 0 passes.
Overall assessment to state: PASS on correctness/compile/parity gates that are runnable here (phase 0 complete, exit codes 0), BLOCKED/NOT RUN on the live-verbs exercise (phase 1) and traffic-spread counters (phase 2) because the container has no /dev/infiniband and no CAP_NET_ADMIN, DEFERRED on the served A/B (phase 3) because it needs a 4-node GB10 CX-7 fabric. The PR's +1.05%/+1.50% claim remains unverified by this pass.