Final review report · NVIDIA/hyperflare-inference #597

Raw Markdown for agents: https://autobot.eidonix.com/p/0fd73c64-7cf8-4cc7-819a-9b35a25e2671.md

Recommendation: Ready To Merge

Head 1acb1f0 cleanly resolves the Round 1 blocker and all Round 1 code/doc review items: allocate_workers is now strictly monotonic without multi-group RAM overcommit, on-disk filenames stay un-suffixed inside each SKU's GPU-partitioned ForwardCache.root (preserving homogeneous↔mixed cache reuse), _share_artifacts isolates multi-host mixed-SKU roots via root=self.root, _publication_lock acquires per-(host, resolved_root) locks in deterministic sorted order, and both preparation docs are updated. No new correctness, concurrency, or homogeneous-path regressions were introduced. Because no Python CI workflow runs tests/preparation/ and tests/preparation/test_inductor_tuning_cuda.py was not run on GPU for this CPU-only follow-up revision, a maintainer should confirm GPU test coverage / hardware evidence before pressing merge if desired.

Merge Risk

Level: Low

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

None.

Subtract / Simplify

  1. Deduplicate (compilation_variant, gpu_name) tuple construction (ignition/preparation/aot.py:944-945, ignition/preparation/inductor_tuning.py:247-248): Both modules independently construct (getattr(..., "compilation_variant", "shared"), gpu_name) (in different quote styles). A small 2-line helper forward_variant(forward, gpu_name) next to cuda_device_identity in inductor_tuning.py keeps both contracts locked together without adding repeated CUDA queries.

Nits

  1. Cross-SKU Inductor winner persistence (ignition/preparation/inductor_tuning.py:291-323, ignition/preparation/aot.py:1154-1159): InductorSelections._reconcile still elects one canonical winner per identity across all ranks. Because _reconcile runs before the frozen warmup check (:264 vs :267-289) and identity hashes the generated Triton source including DeviceProperties (device_binding.py:69-74), this cannot crash or install an incompatible cubin across SM120 GPUs. However, if two same-DeviceProperties SKUs (e.g., 300 W Max-Q at rank 0 and 450 W Workstation at rank 1) share an exact generated kernel identity, rank 0's tuned config will be adopted by rank 1 and persisted into Workstation's cached .bin on disk at aot.py:1158. If per-SKU Triton winner isolation is desired later, key owners in _reconcile and agreed in warm by (gpu_name, identity) (leaving process-local self.winners keyed by identity).
  2. CLI-visible error type in docs (docs/model-preparation.md:241): allocate_workers raises ValueError, but ForwardCache._prepare_ranks (ignition/preparation/aot.py:1038-1039, 1094-1096) catches admission/compilation exceptions into a collective RuntimeError (as it already does for MemoryError), which ignition/cli/serve.py:321-325 surfaces as PreparationError. Phrasing docs/model-preparation.md:241 as "Forward compilation fails (ValueError from worker admission)..." would match the observable CLI behavior more precisely.
  3. Surplus worker cap per subgroup (ignition/preparation/compile_pool.py:115-123): When one active SKU group on a host has fewer missing forwards than ranks (e.g., 1 missing forward across 2 ranks) while another SKU group has many missing forwards, the surplus loop over active_members can assign a 2nd worker slot to the 1-job subgroup (consuming 32 GiB of budget without spawning a worker because CompilePool is lazy). Capping surplus eligibility to subgroups where sum(workers[r] for r in subgroup) < subgroup_jobs avoids wasting a worker slot in that edge case.

Dropped on verification