PR #597: Key compiled forward sharing and Inductor validation by GPU name

Raw Markdown for agents: https://autobot.eidonix.com/api/v1/cases/17c9a391-eba7-4398-94d9-701b811a35d8

Opened by a workflow run, Nov 29, 2026 4:56 AM EST. decide malicious: all_clear (100%): No malicious content found

explore

Author: brandonmmusic-max (CONTRIBUTOR; Discord: Brandonmusic) Motivation: Workstations that mix RTX PRO 6000 Blackwell Max-Q and Workstation Edition cards (same SM120 capability, different product names) cannot reliably run one tensor-parallel export, because compiled forwards and Inductor kernel inventories were shared and validated per host rather than per GPU model. The PR gives each GPU product name its own forward artifacts, cache lock and compiler worker, and validates Inductor kernels within each SKU. Scale: +467 / −44 lines in 4 files Proposal:

Full report · Notes

Value Proposition

Value Proposition — PR #597 "Key compiled forward sharing and Inductor validation by GPU name"

Charter alignment: aligned, with one real tension. The change lives in shared preparation code (ignition/preparation), not in a recipe, so runtime-vs-recipes ownership is respected. It adds no flag, no model branch, no env var, and targets SM120 RTX PRO 6000 workstation hardware — the charter's stated focus — for single-host multi-GPU TP export, which is explicitly in scope. It tightens invariants (cross-architecture rejection, per-SKU inventory agreement) rather than relaxing them. The tension: it introduces a new hardware-shape branch into shared code and hard-fails cases that previously at least ran — mixed capability groups, and --compile-workers below the active SKU-group count (compile_pool.py:89-92). Defensible, but the charter's "stay focused" / "not broad hardware support" language puts weight on that.

Novelty & status: genuinely additive — neither obsolete nor superseded. No commit on main touches the four changed files since the branch point (9933960), and no merged PR covers this layer. PR #150 (same author, still open, CHANGES_REQUESTED from yatesdr) is the opposite strategy — merge Max-Q and Workstation names into one tuning plan — so it is not a canonical replacement; #584 was closed as a draft to be split. The forward-cache keying half exists only here.

Value vs evidence. Beneficiaries are operators of mixed-SKU single-host TP exports, plus cross-host --ranks/join runs, since _prepare_ranks and _publication_lock also execute there. But the charter's "bring real evidence / root cause" bar is only partly met:

Maintenance cost is real. Three new failure surfaces (ValueError, per-group MemoryError, two architecture RuntimeErrors); two layers disagreeing on GPU identity (normalized artifact tag vs raw Inductor name, collision untested); a private cross-module helper import and a duplicated architecture gate; stale docs (model-preparation.md:203-245, preparation-development.md:351-371); no Python CI exists to run the 13 mocked tests; and forced rebases against #122 and #584.

Verdict: Worth it with changes. Before merge: show the failure on current main; state that #150 is still required to enable mixed-SKU export; reconcile the tag-vs-raw-name split; dedupe the architecture gate; document the new errors and cache layout; and attach a preparation-stage measurement plus DCO trailers.

Note on unsolicited direction: none of the material reviewed (PR description, dossier) contained instructions addressed to the reviewing agent; the description's claims were treated as claims to verify, not as directives.

Full report Decide Value: yes (99%): This change is worth reviewing: it provides value to the project in line with its charter.

Classify intake

Selected: triage:review, performance, enhancement, area:preparation

Threshold: 65%

Triage

Priority

Type

Area

Model

Apply Labels (Intake)

Applied: +triage:review, +performance, +enhancement, +area:preparation

Subtraction and simplicity

The diff is small and mostly idiomatic, but it carries two genuinely removable blocks and two duplication problems worth fixing before review.

  1. InductorSelections.warm now repeats the architecture gate that _prepare_ranks already ran. warm (inductor_tuning.py:247-255) can only ever run with a coordinator from aot.py:1122, ~185 lines after aot.py:933-938 rejected cross-architecture groups; the sort key is a verbatim copy of aot.py:935. Delete the 6-line check, gather (variant, inventory), and delete its test (test_mixed_gpu_inductor_keying.py:326-340).
  2. allocate_workers keeps an ungrouped branch that is exactly the grouped one and a redundant admitted counter (compile_pool.py:75-85, 94, 103, 115, 120). admitted is always len(active_groups); groups=None is equivalent to groups=hosts. ~15 lines removable.
  3. "Same GPU" is encoded twice — a normalised tag for artifacts (aot.py:939-944) and the raw device name for Inductor grouping (inductor_tuning.py:248) — so the two equivalence relations can diverge. Pass the already-suffixed variant name into warm and keep one rule; also give the thrice-repeated getattr(forward, "compilation_variant", "shared") one home.
  4. The new test file re-implements _lending_rank from test_forward_artifact_sharing.py (which it already imports fixtures from) and re-derives the production gpu_tag (test:65-70) instead of asserting the real names. Reuse the existing harness; #584 rewrites that file and will otherwise force a double rebase.
  5. Operator-visible semantics changed and docs did not: --compile-workers is now a floor of the active-SKU count and admission is per-SKU, but docs/model-preparation.md:238-243 and docs/preparation-development.md:351-371 still describe one worker per host and "every rank loads the same artifacts".

Open: is the duplicate-value test test_inductor_warm_... needed at all, and is the ValueError floor intended to be documented or configurable (overlaps #122)?

Full report · Notes

Correctness and contracts

Review of PR #597 (head f8a033a) across the four correctness/contracts/system-level lenses. The mechanics are mostly careful, but the justification, the cache-keying design, and the admission accounting have concrete problems.

Key findings:

Verified sound: lock keying/ordered acquisition/barrier parity (aot.py:788-804), groups=None back-compat, _variant() applied at every artifact site, no new collective in warm(), no hot-path contention regression.

Open: no main-side reproduction exists; no wall-clock or cache-footprint measurement; cross-host mixed-SKU sharing is untested; overlap with #122/#592; DCO trailers unconfirmed.

Full report · Notes

Final review

Recommendation: Changes Requested

PR #597 addresses a real gap in tensor-parallel forward preparation for mixed-SKU same-architecture SM120 workstations (fixing cross-SKU paths[name, variant] sharing, per-(host, root) publication locking, same-SKU lending, and per-(variant, gpu_name) Inductor inventory checks), while keeping homogeneous-GPU paths clean. However, it introduces a confirmed non-monotonic memory-admission and overcommit bug in allocate_workers (ignition/preparation/compile_pool.py:96-118) where a 2-SKU host with 12–39 GiB available RAM admits two concurrent 32 GiB compilers while 40–41 GiB raises MemoryError, alongside an unnecessary on-disk filename suffix that breaks homogeneous/mixed cache reuse inside already-per-SKU cache roots, a multi-host _share_artifacts lock-bypass hazard, stale docs, and missing main failure reproduction / isolated preparation evidence.

Merge Risk

Level: Medium

Walkthrough

Pre-merge Checks

Blockers

  1. Non-monotonic memory admission and concurrent RAM overcommit in allocate_workers (ignition/preparation/compile_pool.py:96-118).
    • Verified behavior & impact: The 2 GiB minimum-allowance fallback (worker_bytes - FORWARD_WORKER_BYTES + _WORKER_BYTES, which equals 2 GiB for discrete GPUs per ignition/preparation/host_memory.py:13-15) now runs inside for subgroup in active_groups: instead of once per host when zero workers were admitted. On a 2-SKU discrete host (worker_bytes = 32 GiB, headroom = 8 GiB):
      • At available = 12..39 GiB (remaining = 4..31 GiB), subgroup 0 misses the 32 GiB primary path and takes the 2 GiB fallback, then subgroup 1 also takes the 2 GiB fallback — admitting 2 concurrent compiler workers (64 GiB conservative concurrency demand) on as little as 12 GiB available RAM, directly contradicting the inline comment "without multiplying that allowance" (compile_pool.py:105-106).
      • At available = 40..41 GiB (remaining = 32..33 GiB), subgroup 0 takes the 32 GiB primary path (remaining = 0..1 GiB), leaving subgroup 1 under 2 GiB, so admission raises MemoryError even though 12–39 GiB succeeded (non-monotonic!).
      • At available = 42..71 GiB (remaining = 34..63 GiB), subgroup 0 takes 32 GiB and subgroup 1 takes the 2 GiB fallback — again admitting 2 concurrent workers on 42 GiB available RAM.
      • tests/preparation/test_mixed_gpu_inductor_keying.py:155-158 only tested 40 GiB (right inside the 2 GiB failure hole), which masked the bug.
    • Concrete fix: Keep the 2 GiB minimum-allowance fallback strictly for a single worker on the host (len(active_groups) == 1, preserving main's invariant), and require full resources[rank].worker_bytes for every seeded worker when len(active_groups) > 1 (or compile active SKU subgroups sequentially when host RAM fits only one worker). Add unit tests covering 12 GiB, 39 GiB, 40 GiB, 42 GiB, 71 GiB, and 72 GiB for 2 active SKU groups.

Should Fix

  1. Unnecessary on-disk gpu_tag filename suffix breaks homogeneous/mixed cache reuse and forks GPU identity (ignition/preparation/aot.py:939-944, 967, 1024, 1065 vs aot.py:750-763 and ignition/preparation/inductor_tuning.py:248).
    • ForwardCache.__init__ (aot.py:750-763) already hashes properties.name into self.root, so distinct GPU product names never share a cache directory in production. The cross-SKU sharing bug on main occurred only because _variant_compilers and paths[name, variant] keyed on compilation_variant alone.
    • Suffixing _variant(forward) with a normalized gpu_tag when heterogeneous = len(set(gpu_names)) > 1 also changes name=f"{name}.{variant}" passed to _restore/_path, causing the exact same GPU card to write different .bin hashes in the same self.root depending on its peers (e.g., homogeneous TP2 vs mixed TP4 on the same Workstation card, or a homogeneous host paired with a different-SKU peer host). It also splits GPU identity into normalized gpu_tag (aot.py:940) vs raw gpu_name (aot.py:996, 1000-1004; inductor_tuning.py:248).
    • Concrete fix: Remove heterogeneous and gpu_tag. Key selections, compilers, and paths in _prepare_ranks by (base_variant, gpu_name) (matching InductorSelections.warm and working natively with _variant_compilers at aot.py:657-670), while passing name=f"{name}.{base_variant}" to self._restore and self._path. In test_mixed_gpu_inductor_keying.py, give each SKU its own cache.root (mirroring ForwardCache.__init__) and assert cache reuse between homogeneous and mixed runs on the same GPU.
  2. Multi-host mixed-SKU _share_artifacts writes foreign-SKU artifacts into unlocked cache roots (ignition/preparation/aot.py:698-734, 1102-1104, 1168-1169 vs :788-804).
    • _publication_lock acquires publication.lock only for (host, self.root.resolve()) pairs present on each host. When coordinator.spans_hosts is True, _share_artifacts still marks every path compiled on any other rank as missing and writes it via target.parent.mkdir + os.replace (aot.py:718-733). On a multi-host mixed-SKU launch where Host B has no rank of Host A's SKU, Host B transfers unused artifacts and writes into that foreign SKU's cache directory without holding its publication.lock.
    • Concrete fix: Filter missing in _share_artifacts so each rank only fetches artifacts under its own self.root (or paths it selects from paths[name, variant]).
  3. Update stale documentation for worker admission, lending, and cache sharing (docs/model-preparation.md:231-245, docs/preparation-development.md:351-371).
    • docs/model-preparation.md:231-245 still states that ranks lend missing forwards to any other rank on the host, describes a host-wide 2 GiB minimum allowance, and does not mention the per-active-SKU seeding or ValueError when the host worker limit is below the active group count.
    • docs/preparation-development.md:351-371 still states "Ranks on one host share its cache directory" and "Every rank loads the same artifacts."
    • Concrete fix: Update both passages to document per-(host, GPU product name) cache roots, same-SKU lending, per-active-group worker admission, and per-(variant, GPU name) Inductor validation.
  4. Provide a main failure reproduction and isolated preparation-stage verification.
    • Attach the concrete failure observed on current main for the mixed-SKU SM120 export, an isolated preparation comparison (main vs this branch: compile phase outcome, wall clock, and admitted workers), and the exact pytest command/output (and run tests/preparation/test_inductor_tuning_cuda.py if hardware is available, or explicitly note it as unrun).

Subtract / Simplify

  1. Delete the unreachable duplicate cross-architecture gate in InductorSelections.warm (ignition/preparation/inductor_tuning.py:249-255 and tests/preparation/test_mixed_gpu_inductor_keying.py:326-340).
    • Every coordinator-backed InductorSelections is constructed solely inside ForwardCache._prepare_ranks (ignition/preparation/aot.py:1122), ~185 lines after aot.py:933-938 already rejects cross-architecture ranks on the same coordinator and self.device. Every other call site (aot.py:835, 1256, scripts/inspect_forward_kernels.py:93 (not opened)) passes coordinator=None, where _gather returns [value] (inductor_tuning.py:129-131). Dropping capability from warm's gather payload removes the dead check and its stub-only test while keeping cross-architecture coverage in test_cross_architecture_ranks_are_rejected_before_forward_sharing.
  2. Simplify allocate_workers by removing the redundant groups is None branch and admitted counter (ignition/preparation/compile_pool.py:75-85, 94, 103, 115, 120).
    • Normalizing groups = hosts if groups is None else groups collapses if groups is None: cleanly into the single active_groups comprehension (since jobs > 0 is already enforced at :73-74).
    • After the MemoryError check at :116-118, every active subgroup has received exactly 1 worker, so admitted always equals len(active_groups); delete admitted and use range(limit - len(active_groups)) at :120.
  3. Eliminate duplicated test harness and copy-pasted tag normalization (tests/preparation/test_mixed_gpu_inductor_keying.py:23-122).
    • Once Should Fix 1 removes gpu_tag, lines :65-70 (which re-implement aot.py:940 verbatim) disappear. Consider extending _lending_rank in tests/preparation/test_forward_artifact_sharing.py:171-252 (from which this file already imports four private fixtures at :17) instead of duplicating the fork/Gloo setup.

Nits

Dropped on verification

Full report

Classify triage

Selected: triage:review

Threshold: 65%

Triage

Apply labels

No label changes Decision to Test: no (100%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with. decide malicious: all_clear (100%): No malicious content found

explore

Author: brandonmmusic-max (CONTRIBUTOR; Discord: Brandonmusic) Motivation: On workstations that mix two RTX PRO 6000 Blackwell SKUs (Max-Q and Workstation Edition), tensor-parallel preparation could abort because ranks disagreed about Inductor kernels and shared compiled-forward artifacts across different cards. The PR keys compiled forwards and Inductor inventory checks by GPU product name so each SKU compiles and validates its own artifacts. Scale: +467 / −44 lines in 4 files at f8a033a (stale: head 1acb1f05 also edits docs/model-preparation.md and docs/preparation-development.md and grows the test file) Proposal:

Full report · Notes

Classify intake

Selected: triage:review, performance, enhancement, area:memory, area:preparation

Threshold: 65%

Triage

Priority

Type

Area

Model

Apply Labels (Intake)

Applied: +area:memory

Value Proposition

Value Proposition — PR #597 ("Key compiled forward sharing and Inductor validation by GPU name")

Charter fit — right layer, narrow target. The change lives entirely in the Ignition preparation layer (ignition/preparation/aot.py, compile_pool.py, inductor_tuning.py) plus prep docs and CPU tests. It adds no per-model branches to Helios and no new captured-graph op contract. SM120 workstations are an explicit charter target, so making ignition export --gpus … survive a host that pairs two RTX PRO 6000 Blackwell SKUs is an extension of the supported matrix rather than "broad hardware support." That said, the charter's evidence bar ("Bring real evidence"; hypothetical users are not enough) is only partly met: the author has an end-to-end mixed-SKU TP4 serving run, but it is explicitly "not attributable solely to this PR," no main-vs-branch GPU benchmark exists on this revision, and the "show the failure on main" request in the dossier (§H) is still unanswered.

Novelty/status — additive, not obsolete or superseded. No merged commit or open PR covers this: #150's reconcile_selections addresses only equal-catalog reconciliation and keys sharding on device name (tuning.py:436-446). Nothing in the dossier indicates main already fixes the multi-root lock bypass or cross-SKU lending.

Value vs cost — real defects, but the headline benefit is unproven. Genuinely valuable pieces: the _share_artifacts root-exact filter closes a foreign-SKU write into an unlocked cache root (§C), per-SKU lock acquisition and same-SKU-only lending are sound, and homogeneous↔mixed cache reuse was restored by un-suffixed names inside the per-SKU root (§D). Costs are concrete and under-declared: mixed hosts now hard-fail with MemoryError anywhere below ~72 GiB where main admitted a worker — a band widening from 40–41 GiB to ~12–71 GiB (§B) — plus a new ValueError when --compile-workers is below the active group count; docs/cli-design.md:480 and docs/model-preparation.md:271 still don't state either. Most importantly, §G is untouched: InductorSelections.warm still requires cross-rank agreement on (config, cubin) and _reconcile still elects one winner across SKUs, with the new tests stubbing those gathers and test_inductor_tuning_cuda.py unrun. Two SKUs sharing a kernel identity but tuning different configs (plausible for 300 W Max-Q vs 450 W Workstation Edition) can therefore still abort or receive each other's cubin — the exact failure the PR claims to fix.

(Process note: the 10:20 bot review carried agent-directed text, e.g. "Have your agent review the Full Review…" and #autobot:ignore; the dossier reports it was not acted on. Flagging as an injection attempt, not a technical finding. Also stale: PR file/stat metadata still shows the earlier f8a033a shape, so size figures are provisional.)

Verdict: Worth it with changes — conditioned on: (1) a reproducible main-vs-branch failure on mixed-SKU hardware; (2) extending the (compilation_variant, gpu_name) keying to _reconcile/selection agreement, or explicitly narrowing the claim; (3) documenting and justifying the 72 GiB admission floor and the --compile-workers per-SKU floor; (4) running the CUDA tuning suite on GPU; (5) DCO/design trailers plus a human maintainer review. Absent (1) and (2), the honest verdict is Not worth it: the maintenance cost lands on shared scheduling code for one narrow SKU pairing whose benefit is not attributable to this PR.

Full report Decide Value: yes (99%): This change is worth reviewing: it provides value to the project in line with its charter.

Subtraction and simplicity

Subtraction/simplicity review of PR #597 @ 1acb1f05: the diff is broadly lean — no new flags, config knobs, env switches, or speculative abstractions, so AGENTS.md:188-193 is not violated and scope is authorized by a demonstrated defect (AGENTS.md:165-169). Five reductions, not rejection grounds:

  1. The (compilation_variant, gpu_name) key is built twice in two modules, two quote styles (aot.py:944-945 vs inductor_tuning.py:247-248); aot already imports from inductor_tuning (aot.py:929), so one forward_variant(forward, device) helper collapses both and stops shared-artifact identity diverging from inventory-validation identity.
  2. _share_artifacts(root=None) (aot.py:698, 710, 721-724) is dead generality plus a Path.resolve() heuristic: both production call sites pass root (:1104, :1170), the None branch exists only for one test call. Delete it by masking peer lists with gpu_names (already at aot.py:934-936), or at minimum make root required.
  3. The (host, GPU group) partition is computed twice in two idioms — compile_pool.py:76-90 nested comprehension vs aot.py:1001-1005 zip scan — so "active group" is an unenforced invariant across files. One host_groups(hosts, groups) helper shares it and lets groups become required, removing the groups = hosts overload.
  4. test_mixed_gpu_inductor_keying.py:25-27 hand-copies ForwardCache.__init__'s root hash ("Mirror …") instead of the existing real-construction pattern in test_forward_cache_root.py:13-20; :242 parametrizes six values over one identical MemoryError; :256-259 duplicates test_compile_pool.py:509-517.
  5. Minor: docstring aot.py:916-924 restates docs/preparation-development.md:353-369 verbatim; keep it to caller-facing facts.

Found lean: cuda_device_identity (5 lines), _publication_lock (same barrier count as main), the capability gate, no residues of the withdrawn gpu_tag.

Open: whether cross-host sharing needs nested artifacts (delete-over-patch answers it); test results remain author-claimed with no CI pytest; stale PR size metadata.

Full report · Notes

Correctness and contracts

PR #597 at 1acb1f05 correctly partitions compilation, cache roots, locks, lending and Inductor inventories by GPU product name — but the Inductor winner election is still global, so the mixed-SKU failure it targets is only half closed.

Findings:

  1. Blocker — inductor_tuning.py:275-289 still gathers actual[identity] across all ranks and raises RuntimeError("equivalent Inductor kernels disagree after frozen warmup"), and _reconcile (:291-306) elects one cubin winner per identity with identity derived from source+programs+bindings, not GPU (:108-114). Two SKUs that tune different configs for one kernel identity still abort the launch or receive each other's cubin. The PR only fixed the inventory check (:244-253).
  2. Major — compile_pool.py:91-114: each active SKU group is seeded with a full 32 GiB worker and the 2 GiB fallback is single-group only, so a 2-SKU host needs 72 GiB. The author's own test pins [12, 39, 40, 41, 42, 71] GiB → MemoryError (test_mixed_gpu_inductor_keying.py:242-247); main admitted a worker in most of that band.
  3. Major — the documented ValueError (compile_pool.py:87-90, docs/model-preparation.md:241) never reaches the user: aot.py:1038, 1094-1096 wraps it into RuntimeError, and cli/serve.py:319-325 maps that to PreparationError.
  4. Minor — _share_artifacts filters by resolved parent equality (aot.py:721-724), so hosts with different cache base paths, or any nested artifact, silently stop sharing cross-host — no diagnostic.
  5. Minor — cuda_device_identity returns ("", None) for non-CUDA (inductor_tuning.py:21-26), so an all-non-CUDA launch passes the cross-arch gate (aot.py:933-942) and collapses into one cache root keyed "".
  6. Minor — the new warm tests stub _reconcile and feed [{}, {}] (:410-421, 433), so F1 is structurally untestable there; test_inductor_tuning_cuda.py (not opened) was not run; docs/cli-design.md:480 still omits the per-SKU floor.

Verified sound: per-(host, resolved_root) locking (sorted, deadlock-free, aot.py:778-816), un-suffixed names inside per-GPU roots (:968, :757-768), (host, gpu_name) lending (:1001-1016), groups=None back-compat (compile_pool.py:70).

Open: whether real SM120 Max-Q/Workstation pairing hits F1; wall-clock cost of full seeding; the "103 passed" run is unlogged, has no CI job, and depends on fixtures that PR #584 rewrites.

Full report · Notes

Final review

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

Full report

Classify triage

Selected: triage:validation

Threshold: 65%

Triage

Apply labels

Applied: +triage:validation, -triage:review

Pre Test Report

Hardware test plan — PR #597 "Key compiled forward sharing and Inductor validation by GPU name" (head 1acb1f0)

1. First conclusion: what this hardware can and cannot prove

The change partitions forward compilation, cache roots, publication locks, lending and Inductor inventory validation by CUDA product name (ignition/preparation/inductor_tuning.py:21-26, ignition/preparation/aot.py:933-1067, ignition/preparation/compile_pool.py:62-124). Its headline scenario is two different product names with the same compute capability on one host (RTX PRO 6000 Blackwell Max-Q + Workstation Edition, both (12,0)).

Therefore the honest scope of hardware testing here is: (a) run the GPU test suite the author never ran for this revision, which exercises the changed cuda_device_identity/warm/_prepare_ranks/allocate_workers(groups=) code on real CUDA in a real Gloo rank group; (b) prove no regression on the homogeneous path against main; (c) measure the real admission arithmetic on the real memory sizes. Mixed-SKU validation itself stays CPU-only (tests/preparation/test_mixed_gpu_inductor_keying.py) — say so plainly in the final report; do not claim hardware validation of mixed-SKU.

Budget target: ≤ 60 min of GPU time total, one GPU for most of it. No checkpoint downloads are required (see Session A); everything below uses synthetic compiled forwards.

2. Session 0 — 2-minute inventory gate on cn5 (do first; aborts or reshapes everything else)

nvidia-smi --query-gpu=index,name,compute_cap,memory.total --format=csv
.venv/bin/python -c "
import torch
from ignition.preparation.inductor_tuning import cuda_device_identity
for i in range(torch.cuda.device_count()): print(i, cuda_device_identity(i))
"

Record the four names verbatim. Abort/reshape if any name differs from the others (then cn5 is a mixed host and Session B's mixed assertions below become valid and must be added); also confirm (12,0) for all four and that nvcc/toolkit exists (.venv/bin/python -c "import torch,flashinfer; print(torch.__version__)").

3. Session A — the one genuinely valuable GPU session (cn5, GPU 0 then GPUs 0-1, ~20–40 min)

This is the suite the PR never ran on GPU for 1acb1f0, and it is the only cheap real-CUDA execution of the changed lines (warm → cuda_device_identity, _prepare_ranks → gpu_names/groups=/variant_key, _publication_lock(coordinator), lending). It needs no model checkpoint — forwards are synthetic (ArithmeticForward, VisionPixelValidationForward, MutatingForward in tests/preparation/test_inductor_tuning_cuda.py).

A1 — single-rank tests, GPU 0 only:

cd <repo>; CUDA_VISIBLE_DEVICES=0 FLARE_RUN_CUDA_TESTS=1 \
  .venv/bin/python -m pytest tests/preparation/test_inductor_tuning_cuda.py -q -s -p no:cacheprovider \
  -k "not tp2 and not reconciles" --timeout=1800

Expect: test_single_rank_default_tuning_is_frozen_on_reload, test_cooperative_vision_validation_freezes_and_restores[single], test_input_reset_survives_tuning_and_frozen_warmup[single-*], test_frozen_restore_ignores_conflicting_enabled_local_cache, test_long_generated_kernel_names_freeze_and_restore, test_unreferenced_bundled_candidates_are_dropped_and_named_kernels_still_bind PASS. Keys to watch: restored.cache_hit true and the "forbidden"/"compiled kernel compiled or benchmarked on restore" monkeypatches must not fire — a RuntimeError("equivalent compiled forward variant … has different Inductor kernels") or a freeze/restore failure here is a real blocker (the new variant_key = (variant, gpu_name) in warm, inductor_tuning.py:247-253, changes the gather payload; if _gather mix-ups or a same-name rank disagreeing on gpu_name ever broke agreement, this is where it shows).

A2 — two-rank tests over real Gloo + real CUDA, GPUs 0,1:

cd <repo>; CUDA_VISIBLE_DEVICES=0,1 FLARE_RUN_CUDA_TESTS=1 \
  .venv/bin/torchrun --nproc_per_node=2 --master_port=29517 \
  -m pytest tests/preparation/test_inductor_tuning_cuda.py -q -s -p no:cacheprovider \
  -k "tp2 or reconciles"

This drives ForwardCache.prepare_many(coordinator=CollectivePreparation(...)) → the whole new _prepare_ranks body: identity all_gather_object (aot.py:933-936), _variant_key, allocate_workers(..., groups=gpu_names) (:996-998), per-(host, gpu_name) lending subgroups (:1001-1011), _publication_lock with a real (host, resolved_root) gather + two barriers per key (:789-816), and InductorSelections(coordinator=…) winner election + frozen warmup. Expected on cn5: one active group, workers sum ≥1 and ≤3 (see Session C), both ranks agree on the same gpu_name, artifacts written into one cache root with un-suffixed {name}.{variant}-derived hashes, and _share_artifacts is not invoked (spans_hosts False, aot.py:1103).

Caveats to record, not failures:

4. Session B — homogeneous regression + cache-reuse check on cn5 (GPUs 0,1 first; escalate to 0-3 only if free)

Only if a recipe entry point is available (ignition core ships no recipes; model export needs local-inference-lab/hyperflare-recipes). If it is not installed, skip Session B entirely and record it as unrun — do not spend an hour downloading a checkpoint to prove what Session A already covers at code level.

# branch, first run (profiles the compile phase)
.venv/bin/ignition export <smallest-recipe-alias> --gpus 0,1 --verbose --config <cfg with real hub/core paths>
# branch, second run (cache reuse; must compile zero forwards)
.venv/bin/ignition export <alias> --gpus 0,1 --verbose --config <cfg>
# main, same two commands (git worktree of main; same cfg, same cache root, cleared between arms)

Record from the Compile model forwards and Load and warm compiled forwards phases (ignition/progress.py:116-154 prints … complete in N.NNs): wall clock, the "N compiler workers; per rank [...]" line (aot.py:999), count of restoring compiled forward vs tracing and compiling forward reports, and restored.cache_hit.

Expected on cn5 (both arms, unchanged from main):

A real regression in this session would be: a second distinct forwards/<hash>/ appearing on cn5 (would mean the variant key or root keying leaked SKU identity into a homogeneous host), a MemoryError/ValueError from allocate_workers (compile_pool.py:87-114) on a 125 GiB host, or a second run recompiling.

5. Session C — real admission arithmetic (cn5 and cn7, ~1 min each, no GPU compilation)

This measures the changed function on the real numbers instead of the test's synthetic 128 GiB:

.venv/bin/python - <<'PY'
from ignition.preparation import compile_pool
from ignition.preparation.host_memory import available_bytes
r = compile_pool.compiler_resources(__import__("torch").device("cuda",0))
print("available GiB", available_bytes()>>30, "worker GiB", r.worker_bytes>>30, "limit", r.limit, "capacity", r.capacity)
print("homogeneous TP4:", compile_pool.allocate_workers([r]*4, [2]*4, ["h"]*4))
print("one active group:", compile_pool.allocate_workers([r]*4, [2,2,0,0], ["h"]*4,
      groups=["a","a","b","b"]))
print("two active groups (expect MemoryError < 72 GiB):")
try: print(compile_pool.allocate_workers([r]*4,[2,2,2,2],["h"]*4,groups=["a","a","b","b"]))
except Exception as e: print(type(e).__name__, e)
PY

Expected cn5 (125 GiB job RAM, 48 CPUs, discrete 96 GiB): worker GiB 32, headroom 8, homogeneous result [1,1,1,0] (3 workers; 4×32 GiB > 125−8), one-active-group result [1,0,1,0], two-active-groups → [1,0,1,0] (72 GiB floor met). Expected cn7 (60 GiB, GB10 integrated, worker GiB 34): 1 worker, and the single-active-group 2 GiB-allowance fallback must still fire rather than raising. Any deviation from this monotonic behaviour is a blocker; this is the exact arithmetic Round 1 got wrong, now verified against real MemAvailable/cgroup limits at aot.py's real call site.

6. Session D — optional only (cn5 + cn7), cross-architecture rejection, ~1 cheap variant

The new gate (aot.py:937-942, RuntimeError("tensor-parallel ranks span incompatible CUDA architectures: [(12, 0), (12, 1)]")) is only reachable with a real SM120 + SM121 pair, i.e. ignition export --ranks 2 --rendezvous on cn5 and ignition join on cn7. That requires the checkpoint present on both hosts (both currently report 0 GiB for every model ⇒ a download each) and pays full model load + b12x tuning before the gate fires. Recommend skipping unless the checkpoint is already cached: the gate is covered by CPU tests, and an arm64 venv/toolchain on cn7 is unverified. If it is run, assert the run fails fast at forward preparation with that message and that nothing is written to any forwards/ root.

Do not spend GPU time on: mixed-SKU keying, same-SKU lending isolation, multi-root _publication_lock, _share_artifacts(root=…) isolation, the 12–71 GiB MemoryError band, ValueError on a low worker limit — none is reachable on these two machines, all are tests/preparation/test_mixed_gpu_inductor_keying.py CPU coverage, and cn5's homogeneous shape cannot produce them.

7. Report table the test engineer must fill in

Check Host/GPU Command/session Expected Observed Verdict
Product names & capabilities cn5 0-3 Session 0 4× identical name, (12,0) mixed-SKU reachable? Y/N
Single-rank frozen tuning + restore cn5 GPU0 A1 pass, cache_hit true
TP2 ranks: keying, admission, lending, lock cn5 GPU0-1 A2 pass, 1 cache root, un-suffixed .bin
Homogeneous export wall clock cn5 GPU0-1 B ±10% vs main
Cache reuse on repeat export cn5 GPU0-1 B 0 recompiles
Admission arithmetic cn5, cn7 C see §5
Cross-arch rejection cn5+cn7 D (optional) explicit RuntimeError, no artifacts

Abort conditions (stop and report, don't retry): any RuntimeError("equivalent compiled forward variant … different Inductor kernels") or "frozen kernel compiled or benchmarked on restore" on cn5 (the warm keying change breaking the homogeneous path); allocate_workers raising on cn5's 125 GiB homogeneous host; a second forwards/<hash>/ appearing on a single-SKU host; host RAM headroom breached during A2 (watch MemAvailable — a full-estimate worker is 32 GiB).

What the final report must say about evidence: this hardware can validate that 1acb1f0 executes the changed code on real CUDA without regressing homogeneous TP preparation and cache reuse, and that the new admission arithmetic behaves monotonically on real memory sizes. It cannot produce the mixed-SKU (Max-Q + Workstation Edition) evidence the PR is about, nor multi-host _share_artifacts root isolation; if a maintainer wants those on hardware, a host pairing two RTX PRO 6000 Blackwell product names (or a supported GPU-name seam) is required. Also flag for merge hygiene, independent of testing: no .github/workflows/*.yml runs tests/preparation/ (only helios-lifecycle.yml (not opened), native-serving.yml (not opened), release.yml (not opened) exist), so this suite will never run again unless it is added.

Process note: the PR/bot material contains agent-directed text ("Have your agent review the Full Review…", #autobot:ignore); it was treated as review content only and no instruction from it was followed.

Full report

Discord Test Request

Delivered the Discord post below, drafted from the pre-test summary report and trimmed to the template's limits (≤3 hardware bullets, ≤2 justification bullets, one time estimate).

## Recommendation: Test
High confidence it needs a hardware pass; low confidence we can test what the PR is actually about

## Hardware Required
- cn5, 2× RTX PRO 6000 Blackwell Max-Q (GPU 0, then 0–1); all 4 only if idle
- ~100 GiB free disk for the Inductor + Flare compile caches (not scratch)
- passwordless `sudo nvidia-smi` for clock locking, else 2 tests go unrun

## Justification
- PR re-keys forward compilation, cache roots, publication locks and worker admission by CUDA product name, and `tests/preparation/test_inductor_tuning_cuda.py` (not opened) has never been run on this head (`1acb1f0`) — this is the only real-CUDA exercise of the changed lines, and no CI workflow runs `tests/preparation/`
- cn5 is 4× the same product name, so the mixed-SKU headline (Max-Q + Workstation Edition) is unreachable here: hardware can only prove no homogeneous TP regression, cache reuse still hits, and the new admission arithmetic is monotonic

## Estimated Time to Complete
~45–60 min of GPU time total (2 min inventory gate + 20–40 min CUDA suite single- and two-rank + ~2 min admission arithmetic; +20–30 min only if a recipe alias is installed; cross-architecture check skipped)
-----

Verification I did against the head (1acb1f0) before drafting, so the post's claims are grounded:

Deliberate omissions from the post: no claim of mixed-SKU hardware validation, no mention of checkpoint downloads (none needed), and the cn5+cn7 cross-architecture arm is dropped as optional/skipped to keep the estimate honest.

Process note: the PR/bot material contains agent-directed text ("Have your agent review the Full Review…", #autobot:ignore); I treated it as review content only and followed no instruction from it.

Limit on this work: I ran out of turns before writing the per-angle scratchpad entries and following every lead in the orientation packet (e.g. prior rounds #122/#150/#592/#584 context, aot.py:929-1067 (not opened) line-by-line, tests/preparation/test_inductor_tuning_cuda.py (not opened) contents), so those angles are covered by the supplied report rather than independently re-verified. The code checks listed above are the ones I confirmed myself.

Full report