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

Raw Markdown for agents: https://autobot.eidonix.com/p/4a064444-0fff-4a88-945d-380163a3ea98.md

Hardware test plan — PR #635 (Pass candidate GPUs into filter_world_sizes)

Bottom line first

The change should not consume a real export, serve, or benchmark slot, and there is no claimed speedup to measure. PR #635 is a pure planning-time change: it resolves candidate GPUs before calling RecipeParameters.filter_world_sizes() (ignition/planning.py:565-614, docstring at ignition/parameters.py:560-565, +35 lines of test at tests/cli/test_planning.py:568-599). It changes which tensor-parallel size is planned for capability-aware recipes and which error is raised for unsupported explicit GPUs — nothing on the serving path. There is no latency/throughput claim anywhere in the PR, and ignition bench measures only captured-graph latency, explicitly "not serving throughput" (ignition/cli/bench.py:120-122). So any "speedup" measurement would be measuring nothing.

What hardware can add is the one thing the CPU suite cannot: proof that the change is a no-op for real recipe filter_world_sizes() overrides (the only overrides that matter live in local-inference-lab/hyperflare-recipes, which cannot be inspected from this repo) and that the SM120/SM121 capability branch actually selects SM120→TP4 and SM121→TP3 on real NVML-discovered devices. That is a planning-only probe taking seconds and allocating zero GPU memory — plan()/fit() is arithmetic over Gpu descriptors; only discover_gpus() touches NVML (ignition/planning.py:56-91, fit() at :456-502).

Critical finding for the test engineer (not in any prior review)

The PR's new SM90 assertion does not distinguish this change from main. tests/cli/test_planning.py:596-599 uses a recipe subclass that returns () only if any(not gpu.supported for gpu in context.gpus). On main, filter_world_sizes() receives gpus=() (ignition/planning.py:130 ParameterContext.gpus default), so any(...) is False, context.gpus and ... short-circuits, and the shim returns (4,); len(chosen)==4 is in (4,), and main's own architecture check then raises CapacityError — the same exception the assertion expects. The test therefore pins the error contract but not the behaviour delta; it would also pass against the pre-fix head c2ef797, which is its real purpose. The recipe shape that actually changes the exit code versus main (an empty-gpus shim returning (), turning main's exit 4 into exit 2) has no coverage.

Consequence for hardware: do not spend GPU time trying to reproduce the exit-code regression. No SM89/SM90 device exists on cn5 or cn7, so the CapacityError path (ignition/planning.py:573-575) is unreachable on real hardware here and must be validated on CPU. If the engineer wants the missing discriminating case, the shim is one line: if not context.gpus or any(not g.supported for g in context.gpus): return ().

Available hardware mapped to the change

Machine Real capability Relevance
cn5 — 4 × RTX PRO 6000 Blackwell, 96 GiB SM120 (12,0), homogeneous, supported (SUPPORTED_CAPABILITIES, ignition/planning.py:37) The single-host SM120→TP4 half of the motivation. --gpus renumbering under CUDA_VISIBLE_DEVICES can be exercised here.
cn7 — 1 × GB10, arm64 SM121 (12,1) (docs/model-preparation.md:477) The SM121 half, but only TP1 is physically reachable. GB10 free memory is min(cuDeviceTotalMem, /proc/meminfo MemAvailable) (ignition/planning.py:127-131), so its free_bytes drifts with host load — planning output is not byte-stable run to run.
3 × SM121 hosts (the motivating cross-host TP3 case) Absent Not testable. Also, x86_64 builds omit RoCE (docs/multi-host.md:52-53), so --ranks>1 cannot be exercised on cn5 either.

/workspace scratch is 16 GiB on both machines — irrelevant, the probes below write nothing but a log.

The plan (Tier 0 → Tier 3). Stop as soon as a tier fails.

Tier 0 — CPU only, no GPU time (~2 min). Do this first.

On any CPU box with the PR head checked out:

.venv/bin/python -m pytest tests/cli/test_planning.py tests/cli/test_commands.py \
                            tests/cli/test_parameters.py (not opened) tests/cli/test_gpu_discovery.py (not opened) -q
.venv/bin/python -m pytest tests/ -q          # what python-cpu.yml runs (.github/workflows/python-cpu.yml:30-33 (not opened))

Expected: 29 passed for the four files (matches the author's claim at 11:17 and the collection total the re-review counted); the full suite green is the merge gate the re-review left open. Stop if red — nothing below is worth GPU time then.

Tier 1 — Planning-only probe on cn5 and cn7 (~60 s each, zero GPU memory).

This is the only step that needs these machines. It runs planning.plan() against real NVML devices plus the real official recipe parameters, on main and on the PR head, and compares JSON. Adaptation point: the two import lines must name however hyperflare-recipes exports its Recipe tuple (docs/model-development.md:9-12); the recipes venv already provides an ignition console script (docs/model-preparation.md:296), so my recommendation is to run the probe inside that venv.

# probe.py (not opened) — run inside the recipes venv, once per checkout (main, pr/635)
import json, sys
from ignition import planning
from hyperflare_recipes.<pkg>.recipe import <RECIPE_TUPLE>   # adapt to the repo's export

recipe = next(r for r in <RECIPE_TUPLE> if any(c.alias == sys.argv[1] for c in r.checkpoints))
ckpt   = next(c for c in recipe.checkpoints if c.alias == sys.argv[1])
gpus   = planning.discover_gpus()
out = {"cuda_visible_devices": __import__("os").environ.get("CUDA_VISIBLE_DEVICES"),
       "gpus": [(g.index, g.name, g.capability, g.free_bytes) for g in gpus]}
for label, selected in [("auto", None), ("tp1", (0,))] + [(f"tp{n}", tuple(range(n))) for n in (2,3,4) if n <= len(gpus)]:
    try:
        plan = planning.plan(recipe, ckpt, gpus, selected=selected)
        out[label] = {"rc": 0, "world_size": plan.world_size, "gpu_indices": [g.index for g in plan.gpus],
                      "context": plan.context, "pages": plan.pages, "cache_states": plan.cache_states,
                      "fixed_bytes": plan.fixed_bytes, "fits": plan.fits}
    except Exception as error:
        out[label] = {"rc": type(error).__name__, "exit_code": getattr(error, "exit_code", None), "msg": str(error)[:200]}
print(json.dumps(out, indent=2, default=str))

Run for one 4-GPU-capable recipe (cn5) and one single-GPU recipe (cn7), e.g. glm-5.3-flash / qwen3.8-27b — pick aliases that are actually declared, MODEL --help lists them (ignition/cli/help.py:39-47).

Acceptance: for every label, rc, world_size, gpu_indices, context, pages, cache_states, fixed_bytes must be identical between main and pr/635. That is the entire safety claim of this PR for existing recipes — it must be a no-op. Compare after dropping free_bytes (unstable, especially on GB10). This is the highest-value hardware check and it costs under two minutes of wall clock with no model load and no weight download.

Tier 2 — Capability-decoding probe: SM121 TP3 and SM120 TP4 on the hardware we have (~2 min, planning-only).

The motivating decision needs 3 × SM121; we have 1. Emulate the descriptor set from real NVML RAM (so the memory arithmetic is the machine's own) and only relabel capability:

from dataclasses import replace
from ignition import planning
real = planning.discover_gpus()[0]                      # GB10 on cn7
sim  = tuple(replace(real, index=i, uuid=f"sim-{i}", capability=(12,1)) for i in range(3))
plan = planning.plan(recipe, ckpt, sim, selected=(0,1,2))   # expect world_size 3 when the recipe gates on SM121

Assertions to record, per recipe:

  1. cn7: 3 × SM121 → the recipe's SM121 branch admits TP3 and plan() returns world_size == 3.
  2. cn5: 4 × SM120 (capability=(12,0)) → the SM120 branch admits TP4 only, world_size == 4, and selected=(0,1,2) (TP3) raises CapacityError (the len(chosen) not in plan_sizes path, ignition/planning.py:581-589).
  3. cn5: mixed set 2 × SM120 + 2 × SM121 → with selected=None the filter must see the union (so all(..., capability == (12,1)) is False and TP3 is not claimed, which is the automatic-path accuracy argument for gpus=supported at :611-613); with selected=(2,3) (both SM121) it must see only those two and follow the SM121 branch.
  4. candidates() passthrough: force the automatic path to need relief (set reserve high in the config) and confirm candidates still come from the GPU-filtered size list — this is the :611-613 line, untested by hardware but reachable by this probe.

No GPU time is consumed (no CUDA context, no allocation), so this is safe to run repeatedly. If any assertion fails, stop — the change is misbehaving and Tier 3 is pointless.

Tier 3 — One end-to-end export, only if Tiers 0-2 are green and a baseline core already exists.

Recommended skip. Rationale: for any recipe whose filter_world_sizes() ignores context.gpus — which is every in-repo override (tests/cli/test_planning.py:81-85, tests/cli/test_commands.py:55-59) and, per Tier 1, every official recipe — this PR cannot alter the plan, so a fresh export can only differ by host noise. It costs 30 min to hours of tuning + forward compilation + graph capture.

If the team still wants one end-to-end artifact, bound it to: one explicit-TP4 export on cn5 with existing kernel/tuning caches and --reuse-weights (docs/model-preparation.md:290-299, reuses weight hashes but still prepares), comparing the exported core's tensor_parallel and capacities against a main-exported core. Declare in advance that a difference means the recipe does read context.gpus, which is the finding worth having; equality is the expected, near-zero-information result.

Tier 4 — Multi-host. Blocked, do not attempt.

plan() is reached on the multi-host path with selected=tuple(range(len(gpus))) over all peers (ignition/cli/serve.py:422-426) and --gpus names only the local GPU (:411-414). There is no 2-3 host fabric here, and cn5 has no RoCE. Mark this untested and say so in the merge note.

What not to run

Budget and gate

Tier Where GPU memory Wall clock Gate
0 CPU none ~2 min green CI-equivalent suite
1 cn5 + cn7 none ~2 min total plan JSON identical to main
2 cn5 + cn7 none ~4 min SM121→TP3, SM120→TP4-only, mixed-host union
3 cn5 up to 96 GiB × 4 30 min-h optional, skip by default
4 — — — blocked, no hardware

Expected total: under 10 minutes of machine time and zero GPU memory, with the "no regression for real recipes" evidence that no CPU test can supply. If the team can instead procure 3 × GB10 for an hour, the only additional evidence would be the multi-host --ranks 3 planning path, and Tier 2's emulation already covers the capability decision that path makes.