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

Raw Markdown for agents: https://autobot.eidonix.com/p/10e165b6-714a-4efd-aac7-45e8adf45a55.md

Pre-test report — PR #576: "Pin Helios execution and RoCE proxy threads to high-capacity CPUs on asymmetric Linux topologies"

Head reviewed: 3363573 (4b41ddc in some lenses). 7 files, +226 / −1. Author fordbmorris, GitHub association NONE (first-time contributor, no merged commits), Discord woooflet. No maintainer request, issue, triage label, review or CI run exists on the head.


1. Recommendation

❌ NOT REFERRED FOR HARDWARE TESTING — send back to the author

Reason: the code will change before it is worth any GPU time. Three of the review lenses call this blocking, one calls it "would not merge today", and I confirmed each of their concrete claims against the tree. This is not a case of "probably fine, let's measure it" — the change as written makes an unconfigurable, default-on scheduling decision for every Linux deployment, edits a file the repository promises is unchanged, and leaks the narrowed mask onto I/O threads it was not meant to touch. Testing it now would validate code that will not survive review.

Expected value of a hardware test today: near zero. Two independent reasons, in order of importance:

  1. The code is not test-worthy yet (quality/architecture, §2).
  2. Even a perfect test would prove little on the hardware we have (§3). The only asymmetric host (cn7) is a single GB10; the headline claim is a 4-node TP4 --roce-ring result on 4× DGX Spark with ConnectX-7. The RoCE proxy path — the untested C helper, the flare-roce thread, the −31% RoceOneshotLaunch and the 61× wake-gap figures — cannot be exercised on cn7 or cn5 at all. cn5 is x86_64, where the feature is a guaranteed no-op. And neither host carries the recipe that was measured ("Inkling 2 Small NVFP4", from local-inference-lab/hyperflare-recipes, not this repo), so the +17.2% / CV improvements are not reproducible here in principle.

A test engineer would spend hours and produce a report that says "on cn7 the threads landed on CPUs 5–9 and 15–19; on cn5 nothing changed" — which the author tells us is already true, and which proves nothing about the feature or about main versus this head.


2. What I verified myself (not taken on trust from the reviews)

Mechanism (eos/src/unix.rs:172-248, mirrored in roce_proxy.c:1505-1570): reads sched_getaffinity, then per-CPU /sys/devices/system/cpu/cpuN/cpu_capacity, keeps CPUs with cap*10 >= max*9 (unix.rs:192), falls back to cap*2 > min+max (:198-203) when fewer than two clear the band, applies only if 2 <= selected < allowed (:205), then sched_setaffinity. Four Rust call sites, one C call site, two empty stubs. Tests (unix.rs:254-314) cover only the pure selector.

The blocking problems

# Problem Evidence I confirmed
A The vendored proxy is no longer identical to its pin, and three documents still say it is. roce_proxy.c:6-8: "Keep the source below identical so preparation and serving share the transport ABI." NOTICE:16-19: "Its implementation is unchanged from that revision; Flare adds a license and provenance preamble." docs/roce-ring.md:355-364: "keep the vendored source identical to the dependency after its provenance header." The PR adds +71 Flare-only lines and updates none of the three, nor the FlashInfer pin. NOTICE:18-19 is now a false statement about main.
B The affinity mask leaks onto threads the PR never intended to narrow. Real threading bug; most lenses missed it. runtime.rs:568 is the first statement of the flare-model thread; that same thread later spawns the offload/disk/image workers (runtime.rs:698 → offload/mod.rs:105 → selene/src/offload.rs:653,676; transfer.rs:509-511; runtime.rs:721 → ImagePreparation::new → runtime.rs:1011). On Linux a child inherits the parent's mask, so all of them silently land on the 10 high-capacity cores. transfer.rs:531 and disk.rs:470 then apply SCHED_BATCH + nice to those very threads — which only helps if they are not sharing the model thread's cores. This contradicts docs/prefix-cache-offload.md:863-867 verbatim: "Both use SCHED_BATCH with a positive nice value to reduce contention with the model worker... Adding CPU affinity requires a serving-latency measurement that shows a benefit." The PR neither updates that paragraph nor measures the offload path. This is the finding I would lead with, and it is a genuine regression risk that a soak test with a vision/offload model would expose.
C A magic-numbered, unconfigurable, default-on policy in the shared eos crate. No env var, no flag, no config field, no CLI option — the policy cannot be turned off. Violates charter "Be explicit and pin everything. No magic defaults" and AGENTS.md:453 ("A setting has one of three homes: the recipe declaration, the configuration file, or a command-line flag"). The 90% band and the midpoint fallback are unexplained literals. The author frames "no environment variables" as the virtue; it is the defect.
D Errors are suppressed, so the claimed no-op semantics are unverifiable. unix.rs:228-233 returns on the first unreadable capacity file, skipping readable CPUs too; unix.rs:244 let _ = sched_setaffinity(...); roce_proxy.c:1567 (void). AGENTS.md:182-186: "Do not remove validation, suppress errors, silently substitute execution paths." Nothing in a serving log tells an operator whether the policy applied — which also makes any hardware placement test depend on external tooling rather than the runtime.
E No main-vs-head baseline. Every figure compares placements within the change (X925-placed vs A725-placed launches), not this head against main via flare run on the same exported core. Charter: "Performance PRs need benchmarks showing an actual speedup over main on a served workload (#210)." The description also never states how the A725 arm was produced (different binary? external taskset?), so the +17.2% cannot be attributed to this patch.

Should-fix (would still block referral in aggregate)

What is genuinely fine (so testing is not wasted on it)

Also worth flagging as a process fact: the head commit has zero CI checks. The workflow that runs exactly the cited eos tests exists; it simply did not run. That gap should be closed before anyone considers hardware.

Minor / ignore for the referral decision: doc-comment wording (unix.rs:212-214 points at "non-Linux targets" when the stub it means is in windows.rs), a third redundant #[cfg] stub at unix.rs:247-248, flare_eos:: used directly instead of the crate::os:: shim, the unreachable-by-design three-tier fallback, an 8 KiB stack array in the C helper, and the +2.6% cold-prefill endpoint left unattributed.


3. Why the available hardware cannot settle this (verified)

Host Capability Verdict for this PR
cn7 1 × GB10 (SM121), arm64, 10 CPUs for the job The only asymmetric SoC — but a single node. The RoCE ring needs 2–16 ranks across multiple hosts over ConnectX-7 (docs/roce-ring.md:3,19,404; helios/src/execution/roce.rs:151). The C helper, the flare-roce thread, RoceOneshotLaunch and the 61× wake-gap claim are untestable. Also: a 10-CPU job allocation may already be a single tier, which would make the policy no-op for the wrong reason — a false negative.
cn5 4 × RTX PRO 6000 (SM120), x86_64, 4 GPUs one host The feature is a guaranteed no-op here (no cpu_capacity sysfs). Useful only for the "no regression" claim. It does exercise the same-process TP path (threaded.rs:652) and the flare-model/flare-offload threads, so it is the right box for finding B — but only after the fix.
Both Models: dinov2-base, GLM-5.3-Flash-NVFP4, Qwen3.8-27B-NVFP4/DFlash2, … Neither carries "Inkling 2 Small NVFP4", the recipe behind every number in the PR. No main-vs-head A/B of the claimed figures is possible without new export work.

One genuinely cheap, high-signal observation is available on existing hardware: the PR adds thread names (flare-roce, plus existing flare-model/flare-execution/flare-offload-N/flare-rank-N), so placement is directly readable with ps -L -o comm,psr or taskset -cp. That check is worth 15 minutes — but only against fixed code, and only as a smoke check, not as evidence.


4. What the author must fix before referral

Ordered; items 1–4 are the gate.

  1. Declare or remove the vendored-file divergence. Either pin the upstream revision so the FlashInfer source contains the helper, or update roce_proxy.c:6-8, NOTICE:16-19 and docs/roce-ring.md:355-364 to name the local addition and its removal condition. NOTICE's "unchanged" sentence must change either way.
  2. Delete the C copy and pin from Rust. roce_start's only caller is RoceTransport::connect (helios/src/execution/roce.rs:295) and a new pthread inherits the creator's mask, so one call before roce_start removes ~66 lines and the entire lockstep problem. Keep pthread_setname_np if nsys attribution needs it, marked as a declared exception.
  3. Fix the mask leak (finding B). Either narrow only the execution/replay threads and pin flare-model after the store and image worker are constructed, or restore the original mask on threads that spawn long-lived I/O workers. And measure it — the author's 2-hour soak would not have caught an offload thread landing on a P-core. Update docs/prefix-cache-offload.md:863-867 so code and docs agree.
  4. Make the policy configurable or not-a-default. Give it one of the three sanctioned homes (a typed config field or a flare run/Helios CLI flag taking an explicit CPU set), which also removes the magic 90% and the midpoint fallback. If it stays a heuristic, name the constant and justify the threshold on named hardware.
  5. Stop suppressing errors — return a status/Result (or one startup diagnostic line naming the applied set) so placement is observable, and do not use let _ =.
  6. Test the code that touches the system — factor the sysfs root into a parameter, assert the applied mask with sched_getaffinity, and cover a negative case; add a host-side test for the C helper or state plainly that it is unverified by any automated check.
  7. Move or justify the worker.rs/replay.rs call sites and state the rule ("which threads are critical") rather than a file list; make the flare-rank-{n} coverage explicit.
  8. Report a paired main-vs-head flare run comparison on the same exported core, with launch counts, dispersion, and the recipe/core identity.
  9. Get CI to actually run on the head.

5. Proposed test plan — conditional, for re-review, not for now

Do not run this yet. It is provided so that when the author returns with items 1–6 addressed, testing can start immediately without re-derivation. Estimated cost if the code is fixed and a second GB10 host is made available: ~1.5 days. Without a second GB10 host: ~0.5 day on cn7 + ~2 hours on cn5, and the RoCE half stays unverified (say so in the report; do not pretend otherwise).

Stage 0 — gate (no hardware, ~30 min)

CI green on head (native-serving.yml (not opened)), including cargo test eos. Unit tests for prefer_high_capacity_cpus (mask applied + no-op) and a C helper test present. Docs consistent (NOTICE, roce_proxy.c header, roce-ring.md, prefix-cache-offload.md). Stop here if any fails.

Stage 1 — placement smoke, cn7, ~1 hour (highest value per minute)

  1. Confirm the topology the job actually sees: cat /sys/devices/system/cpu/cpu*/cpu_capacity and taskset -cp $$. If the job cpuset is already a single tier, the test is void — report and stop.
  2. Run a short native serving session on a model present on the host.
  3. ps -L -o comm,psr (or taskset -cp) and record the CPU set for flare-model, flare-execution, and any flare-rank-N.
  4. Assert: each critical thread is confined to the high-capacity tier, and the set is a subset of the original mask.
  5. Run 5 launches, not 1, and record placement per launch — the claim is about variance, so a single launch cannot confirm or refute it.
  6. Observe the leak from finding B: with an offload/vision-enabled configuration, record the CPU set of flare-offload-N and the image-preparation thread. Expected today: they are on the high-capacity tier, contradicting docs/prefix-cache-offload.md:863-867. Expected after the fix: they are not. This is the single most valuable check the PR needs.

Stage 2 — no-op / regression, cn5, ~2 hours

  1. x86_64: confirm a startup session succeeds unchanged and that thread masks equal the inherited process mask (the documented no-op). One session, not a matrix.
  2. Reuse the existing 4-GPU single-host TP path to confirm the same-process flare-rank-N threads and the offload threads still start and serve correctly; run one short standard benchmark against main to catch a regression. Do not run a throughput sweep — x86 is not the target.

Stage 3 — the actual claim (needs 2× GB10 with ConnectX-7; not available today)

  1. Paired A/B: main vs this head, same exported core, flare run --roce-ring, ≥5 launches per arm; report per-launch and dispersion.
  2. Metrics: launch-to-launch CV, RoceOneshotLaunch sum, p90 inter-graph wake gap, decode tok/s.
  3. Separately label a placement A/B (X925 vs A725 of the same binary, forced externally via taskset) — this confirms the mechanism, not the patch. Keep the two A/Bs distinct in the report; conflating them is exactly the flaw in the current evidence (finding E).
  4. One offload-enabled session with an offload/prefix-cache workload, measuring input-upload/completion-download latency and per-token latency against main — this is the measurement docs/prefix-cache-offload.md:866-867 requires before affinity on transfer threads can be justified, and it is the check for the finding-B regression on real serving.
  5. Skip: soak beyond ~1 hour (the author's 2-hour soak is adequate and reruns add little), and any re-run of unit tests already covered by CI.

Explicitly not worth testing, ever, in this PR


6. Bottom line

The problem is real and squarely inside the charter's target hardware (DGX Spark/GB10), the idea is sound, and the author's measurement work is better than the bar this project usually gets. But as submitted the change (a) edits a file three documents promise is unchanged, (b) silently narrows the mask of offload, disk and image-preparation threads against an explicit documented policy, (c) installs an unconfigurable magic-numbered default in shared code, and (d) rests on evidence that never compares against main. Items (a)–(c) will change the code; item (b) is a real regression risk that needs a before/after measurement on hardware we can actually use.

Refer to testing only after the author returns with items 1–6 of §4 addressed. At that point Stage 1 (cn7) and Stage 2 (cn5) are cheap, well-targeted, and Stage 1.6 alone would justify the trip by either confirming or refuting the mask leak. Stage 3 needs a second GB10 host that we do not currently have; flag that dependency at referral time rather than discovering it mid-test.