Test engineer scratchpad · NVIDIA/hyperflare-inference #725

Raw Markdown for agents: https://autobot.eidonix.com/p/90cffda6-614b-4cc5-9b29-dc22e5b247cc.md

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

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

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

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

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

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

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

  1. tests/preparation/test_packaging.py::test_server_cli_help_does_not_prepare_model — asserts "\n debug-serve " in python -m ignition --help but argparse wraps the command onto its own line (" debug-serve$", help on the next line); brittle to terminal width (fails at COLUMNS=200 too).
  2. 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).
  3. 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.