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

Raw Markdown for agents: https://autobot.eidonix.com/p/0d5ac420-af25-4202-9359-c705e03fdb67.md

Hardware Test Plan — PR #678 fix(ignition): expose current_source_roots and propagate source roots to tuning replicas

Head: 90b0d31 · 5 files, +136/−20 (production +18/−8) · fix/spawn-propagate-source-roots → main


1. Bottom line for the test engineer

Book cn5. Do not book cn7. Total ask: one CPU pass plus two short 2-GPU runs (well under one GPU-hour).

The decisive finding is that there is no speedup to measure. Nothing in this PR touches a hot path, and no performance claim is made anywhere in the PR body. More importantly, the bug it is titled after is already fixed on main:

So the entire behavioral delta of this PR is one thing: tuning_replicas._replica gains a required 8th positional argument and binds source_roots around replica preparation (tuning_replicas.py:142,153,158,174-176,190-194). And the PR itself discloses that this is inert today: _replica calls prepare(..., compile_forwards=False) (:160) and exits on TuningComplete (:162-165), and ForwardCache is constructed only under if compile_decoder: in ignition/preparation/capture.py:117-118. I verified no in-tree replica path reaches ForwardCache, source_identity() or current_source_roots().

Consequence: hardware testing cannot demonstrate that this PR fixes anything, because on main nothing is broken in the paths it touches. Hardware testing can only do two useful jobs: (a) confirm the changed _replica signature does not regress a real spawn with real CUDA/CoreStorage, and (b) confirm no regression in TP-peer compiled-forward reuse end-to-end. That is exactly the scope of the plan below — and it is deliberately small.

2. Machine selection

Machine Verdict Why
cn5 (4 × RTX PRO 6000 Blackwell Max-Q, 96 GiB, 48 CPU, 125 GiB RAM) Use it SM120, inside the supported matrix (AGENTS.md:3: SM103/SM120/SM121; the repo's own ForwardCache test stub uses "SM120"). Four GPUs is exactly enough for either spawn path. Homogeneous SKU, so tuning_devices' same-SKU rule is satisfied.
cn7 (1 × GB10, arm64, 10 CPU, 60 GiB) Skip Both spawn loops are gated on world size. prepare_group spawns peers over range(1, len(config.devices)) (rank_group.py:304) — with one GPU that loop is empty. tuning_devices (ignition/cli/preparation.py:84-107) returns tuning_gpus=() unless there are ≥ 2 × world_size GPUs, and replicas = len(tuning_gpus) // world_size with a spawn loop of range(1, replicas) (tuning_replicas.py:177,187) — so no replica process is ever created. cn7 cannot execute a single line of the changed code.

Also not reproducible on this fleet: the author's "4-GPU mixed-SKU (Max-Q + Workstation)" evidence. cn5's product name is literally "RTX PRO 6000 Blackwell Max-Q Workstation Edition" ×4 — one SKU. If mixed-SKU validation matters it needs a different rig; do not pretend cn5 covers it.

3. The plan

Step 0 — CPU spawn gate (0 GPUs, ~2 min, run on cn5)

No CI run exists on 90b0d31; the "36 passed" figure is author-reported. This is the cheapest check in the whole plan and it covers more of the change than any GPU run.

cd /repo && git checkout 90b0d315953e453c8438f0129cc5173d01fcb731
CUDA_VISIBLE_DEVICES="" .venv/bin/python -m pytest \
  tests/preparation/test_forward_cache_sources.py -q        # the changed tests
CUDA_VISIBLE_DEVICES="" .venv/bin/python -m pytest \
  tests/preparation tests/cli -q                            # blast radius

Must include (do not accept skips silently — per AGENTS.md:306, report a skip as an unrun check):

Why this is not redundant with GPU work: these are the only tests that assert the invariant the PR exists to protect — equal ForwardCache.root across a spawn boundary — and they assert it directly. The GPU runs below cannot assert it cheaply, because no in-tree recipe reads the roots in a replica.

Also confirm the private-symbol claim holds: git grep _EXTRA_ROOTS must show hits only in ignition/preparation/source_identity.py.

Step 1 — TP=2 peer spawn with a real external-recipe CLI (2 GPUs, ~15 min, cn5)

Purpose: end-to-end confirmation that two spawned peers build an identical ForwardCache root with real CUDA/Inductor, i.e. that the accessor swap in aot.py:845-847 did not disturb the copy already merged via #670. Expected to pass on both the PR head and main — this is a no-regression run, not a fix demonstration.

Pre-flight (5 min, no GPU): this bug is only reachable through an external recipe CLI calling ignition.cli.main(..., source_roots=...) (ignition/cli/__init__.py:364-372); core ignition has no in-tree recipes (pyproject.toml does not depend on hyperflare_recipes; AGENTS.md:382-387). So:

  1. Install the external recipe package into the venv and confirm python -c "import hyperflare_recipes" works — mp.get_context("spawn") re-imports the recipe module in the child, so a package visible only through source_roots paths will fail before any GPU work.
  2. rg "_replica|_peer" <recipe-package> — if the external package calls tuning_replicas._replica positionally with 7 args, the new required 8th parameter breaks it with a TypeError. This is the single realistic backward-compat risk in the diff; resolve it on paper, not on GPU.

Run (a minimal driver script is required, since core ignition binds ()):

# external-recipe entrypoint, ~20 lines
from ignition.cli import main
from hyperflare_recipes.recipes import RECIPES            # the real package tuples
raise SystemExit(main(["export", "<model>", "--gpus", "0,1",
                       "--compile-workers", "12"],
                      recipes=RECIPES, prog="hyperflare",
                      source_roots=(("hyperflare_recipes", RECIPE_DIR),)))
export CUDA_VISIBLE_DEVICES=0,1
mkdir -p /scratch/flare/kernels        # cn5 gives only 16 GiB scratch; keep ~/.cache/flare off it
ls /scratch/flare/kernels/forwards 2>/dev/null | wc -l > /tmp/before
bash repro.sh (not opened) 2>&1 | tee /tmp/run1.log
ls /scratch/flare/kernels/forwards | wc -l > /tmp/after

Pass criteria (all boolean, no benchmarking):

  1. Both ranks complete; no FileNotFoundError resolving rank 0's cache-relative paths under a rootless self.root (aot.py:1239), and no "bound source root ... does not exist" (aot.py:848-850).
  2. Exactly one new forwards/<hash> directory appears — a second directory means the ranks hashed different roots. This is the single cheapest, most direct hardware assertion of the property; a divergent root forks the cache.
  3. Repeat the export once against the warm cache: the second launch restores (bound.cache_hit, aot.py:1243) rather than recompiling, and adds no new forwards/<hash> directory.

Step 2 — tuning-replica spawn with the changed signature (2 GPUs, ~20 min, cn5)

Purpose: the only genuinely new code. Confirm the required extra_source_roots argument survives real spawn pickling and that with source_roots(...), CoreStorage(...) around prepare(...) (tuning_replicas.py:158) runs against real CUDA and real CoreStorage — which the CPU test stubs out (test_forward_cache_sources.py:199-207).

Pick the cheapest valid layout: world_size=1, two tuning GPUs. tuning_devices (ignition/cli/preparation.py:94,107) requires the tuning list to start with the serving GPUs and be a whole number of replicas; --gpus 0 --tuning-gpus 0,1 gives replicas=2, so exactly one _replica process spawns (tuning_replicas.py:187). That is all the coverage the change needs.

export CUDA_VISIBLE_DEVICES=0,1
bash repro.sh (not opened) --gpus 0 --tuning-gpus 0,1 2>&1 | tee /tmp/run2.log

Pass criteria:

  1. Exactly one flare-tuning-1 child reaches TuningComplete; parent reports no "tuning replica ... exited with" (tuning_replicas.py:200-202) and no "a tuning replica continued beyond kernel preparation" (:165).
  2. --verbose shows the replica's ForwardCache.root, when it builds one, equal to rank 0's — or, today, simply that the replica prepared without the root-binding path raising.
  3. Child exits 0 under the same source_roots binding; if you can, add a one-line debug print of current_source_roots() in the replica entry and confirm it is non-empty (this is the propagation actually crossing spawn, on real hardware).

If a 4-GPU run is preferred instead, use --gpus 0,1 --tuning-gpus 0,1,2,3 (replicas=2, still one child) — it adds TP=2 + replicas in one shot but costs 4 GPUs for no additional code coverage. Treat this as optional, not the default.

Step 3 — do not run

4. Measurement guidance

There is no speedup claim to validate, so do not build a benchmark. The one quantity worth recording is the cache-fork count from Step 1 (forwards/<hash> directories created per launch), because it is the only directly observable hardware consequence of the property under test — divergent roots fork the cache and silently recompile. Record it as a raw number with the command that produced it (AGENTS.md:512-513); do not produce an audit bundle.

5. Cost and risks

6. What the testing will and will not establish

Will establish: the changed _replica signature works under real spawn with real CUDA and CoreStorage; TP=2 peers still agree on the compiled-forward cache after the accessor swap; no observable regression in the two spawn paths.

Will not establish: that this PR fixes the stated bug — #670 already merged that fix, and the replica-side propagation is inert by the PR's own disclosure. If the team's goal is to validate a fix, the honest answer is that there is nothing left for hardware to fix-verify here, and the merge decision should rest on the CPU tests (90b0d31 has no CI run), the code-encapsulation value, and the ownership/merge-order question against #670 — not on a GPU run.

Recommendation: run Step 0 unconditionally (it is free and its absence is the PR's biggest open gap); run Steps 1–2 only if maintainers want positive evidence for the external-recipe TP and tuning-replica paths before merge. If GPU time is scarce, Step 0 plus Step 2 is the highest-value subset — Step 2 is the only run that touches new behavior.