Case file — PR #597 "Key compiled forward sharing and Inductor validation by GPU name"
Author: brandonmmusic-max (CONTRIBUTOR; Discord: Brandonmusic). Branch mixed-gpu-inductor-keying → main, head f8a033a, opened 2026-11-29 09:56, open, ready for review, 0 reviews, 0 comments, no labels, no CI checks. Size: 4 files, +467/−44.
Key findings
- The cache directory was never shared across SKUs.
ForwardCache.roothas always hashed the CUDA product name —ignition/preparation/aot.py:750-763builds the key fromproperties.name, properties.major, properties.minor, properties.multi_processor_count. On a mixed host, ranks already wrote to different roots. What was shared was the host-wide lending/assignment loop (aot.py:1000-1010on main) and one host-widepublication.lock. The description's "shared compiled forward artifacts" is loose; the actual new artifact keying is a file-name suffix ({compilation_variant}.{gpu_tag},aot.py:940-944). - Two layers now disagree about what "same GPU" means. Artifact names use a normalized tag (
aot.py:940: non-alnum →_, stripped, lowercased); Inductor inventory grouping uses the rawtorch.cuda.get_device_name(inductor_tuning.py:21-26, 247-249). Two names that normalize identically would share artifact file names but be separate Inductor groups. No test covers a normalization collision (tests only assert substrings"max_q"/"blackwell_workstation_edition",tests/preparation/test_mixed_gpu_inductor_keying.py:145-146). - Three new failure modes, only partially declared. (a)
ValueErrorwhen a host's worker limit is below the number of active GPU groups (compile_pool.py:89-92) — limit ismin(jobs, min(rank limit))where rank limit comes from--compile-workers/compile_threads(compile_pool.py:42-44), so a mixed host with--compile-workers 1that used to run (slowly) now errors; (b)MemoryErrorcondition moved from "no worker on host" to "any active group has no worker" (compile_pool.py:116-118), i.e. the 32 GiB estimate must cover one worker per SKU; (c) two new cross-architectureRuntimeErrors (aot.py:934-938,inductor_tuning.py:250-255). - Cache naming is decided by the group, not the card.
heterogeneous = len(set(gpu_names)) > 1(aot.py:939) gates the suffix, so the same RTX PRO 6000 Workstation Edition card writes{name}.shared.binin a homogeneous TP2 run and{name}.shared.nvidia_rtx_pro_6000_blackwell_workstation_edition.binin a mixed TP4 run, in the same root. Mixed and homogeneous runs can never reuse each other's forward cache; each mixed host compiles and stores a full catalog per SKU (tests expect 8 artifacts vs 4,test_mixed_gpu_inductor_keying.py:143-146, 171, 262-263). - Sibling PR #150 (same author, still open) is an alternative answer to the same host, not a stack. #150 "Treat Max-Q and Workstation Edition device names as one GPU when tuning" makes the two names share one tuning plan and a local
aot.pyGPU-name override; #597 instead gives each SKU its own artifacts and validation. #150's own Limitations section names "main's compiled-forward cache key (ignition/preparation/aot.py, which includes the device name)" as unresolved; #597 addresses that layer. #150 carries CHANGES_REQUESTED from yatesdr (2026-11-18) demanding "show the failure on main", and a flare-autobot "Review Stopped — already fixed another way" (2026-11-26). Nothing ties #597's merge to #150's state. - The motivating abort has no linked reproduction. No issue or PR in the searchable window reports the Inductor-inventory mismatch or cross-SKU lending abort. The only documented mixed-SKU failure is #150's
BindingMismatch: rank-local forward does not match compiled guards(layer 20csf_inline_scales2/2 split), which is a tuning-agreement failure, not what #597 fixes. #597 supplies no "failure on main" log — exactly what the reviewer rejected #150 for. - No CI would ever run this.
.github/workflows/contains onlyhelios-lifecycle.yml(not opened),native-serving.yml,release.yml; searching.githubforpytest,tests/preparationorunittestreturns nothing. The Python test suites are not wired into CI, so "no checks" is structural, not incidental. - Docs describing the replaced behavior were not updated.
docs/model-preparation.md:203-209(shared race presupposes identical GPUs),:231-245(worker budget per host, one worker per host under the 2 GiB allowance, lending to "other ranks on that host"),docs/preparation-development.md:351-371("Ranks on one host share its cache directory… select a variant key throughcompilation_variant"). None of the new per-group baseline, per-SKU lending, variant suffixing, or new errors is documented.
The change
Verified against the diff (f8a033a) and head files:
ignition/preparation/inductor_tuning.py(+18/−1): new_cuda_device_identity(device)→(product_name, tuple(compute_capability)), or("", None)for non-CUDA/no-CUDA (inductor_tuning.py:21-26).InductorSelections.warmnow gathers((compilation_variant, gpu_name), capability, inventory)(:247-249), raisesRuntimeError("Inductor warmup spans incompatible CUDA architectures: …")on a capability split, withNoneordered last (:250-255), and enforces identical inventories per(variant, gpu_name)(:256-260, message unchanged but now prints a tuple).ignition/preparation/aot.py(+59/−28):_publication_lockgathers(host, str(root.resolve()))per rank,holder = gathered.index(key) == index, and locks once per distinct sorted pair, with adist.barrierper key (aot.py:773-810) — one extraall_gather_objectand one barrier per distinct(host, root)instead of per host._prepare_ranksgathers(gpu_name, capability)(:929-933), rejects cross-architecture groups (:934-938), computesheterogeneousandgpu_tag, defines local_variant()(:939-944), uses it for the variant gather (:947), passesgroups=gpu_namestoallocate_workers(:995-997), keys lending on(host, gpu_name)(:1000-1010), and applies_variant()at:1112,:1131,:1152.ignition/preparation/compile_pool.py(+50/−15):allocate_workers(..., groups=None); active subgroups per host,ValueErrorwhenlimit < len(active_groups)(:89-92), one seeded worker per active group with a sub-estimate fallback (:96-115),MemoryErrorif any active group is still empty (:116-118), surplus only across active members (:119-125).tests/preparation/test_mixed_gpu_inductor_keying.py(new, +340): 13 CPU tests. They spawnmultiprocessing.get_context("fork")gloo groups (:229,:99), monkeypatchinductor_tuning._cuda_device_identity(:52),compile_pool.compiler_resources(:49-51),aot.ForwardCache._load/_path/_allocation_sizes(:54-58), and replaceCompilePoolwith a recording pool (:36-45). They import private fixtures from another test module:from tests.preparation.test_forward_artifact_sharing import _Artifact, _Forward, _Pool, _replace_gpu_preparation(:17).
Undeclared in the description: the ValueError/MemoryError semantics shift; the extra per-key barriers; gpu_tag normalization and its collision potential; the group-wide (not per-card) cache-naming split; the fact that the Inductor key deliberately uses the raw variant while artifacts use the suffixed one; aot.py now imports a private helper from a sibling module (from .inductor_tuning import InductorSelections, _cuda_device_identity, aot.py:925).
Declared but worth checking: "restrict host-local compilation lending to matching (host, gpu_name) peers" is real (aot.py:1000-1010) and the same members list feeds _balance_compilations, whose MemoryError("no rank on this host has room for a forward compiler") (aot.py:681-682) now fires per SKU subgroup rather than per host.
No proto, manifest, core-format or artifact-format change; serving untouched; no new flag, setting or environment variable (charter forbids per-model flags).
The why
- Stated problem: mixed-SKU SM120 workstations (RTX PRO 6000 Blackwell Max-Q + Workstation Edition, both
(12, 0)) can compile different Inductor Triton inventories for the same logicalcompilation_variant; tensor-parallel preparation "aborted on mismatched Inductor kernel inventories or cross-SKU artifact sharing". - The abort has no linked issue or PR. Searches for the failure signature and for issues/PRs describing it returned nothing in the searchable window. The only documented mixed-SKU abort is PR #150's
BindingMismatch: rank-local forward does not match compiled guards(DeepSeek V4.1 TP4, 2 Max-Q + 2 Workstation, layer 20execution_plan.decode_config.csf_inline_scalesfalse on two ranks and true on two, 2026-10-30). That is tuning disagreement, which main'sreconcile_selections(b3bf45f9,ignition/preparation/tuning.py:500-508,ignition/preparation/collectives.py:397(not opened)) targets. - The invariant #597 relaxes was introduced deliberately by cb6187bf ("Agree and freeze Inductor kernels before graph capture", 2026-10-27): cross-rank inventory agreement on
compilation_variant. #268 (closed issue) and #183/#185 are the prior art for that check's error paths. - Longevity: the mixed-SKU thread has run since 2026-10-30 (#150 opened; #163 recorded a TP4 export on four RTX PRO 6000 cards that carried a local "override of torch's compile-package GPU-name comparison"), and #154 (merged 2026-11-03) notes its own export carried "#150, an override of torch's compile-package GPU-name check". So the author has been carrying a local workaround for this exact GPU-name comparison across at least three PRs — #597 is the in-tree version of the forward-cache half.
- Breadth: the change is conditional on hardware shape; homogeneous hosts are untouched in naming and admission.
Related work
- #150 (open, same author,
area:preparation/bug/model:deepseek-v4.1/priority:P2/triage:review, +51/−2,ignition/preparation/tuning.py,tests/preparation/test_tuning.py(not opened)) — the tuning-side counterpart and alternative direction (merge the names) for the identical host. yatesdr's CHANGES_REQUESTED (2026-11-18): (1) show the failure on main now thatreconcile_selectionsexists; (2) the PR leaves mixed-card export failing at the compile-package/cache-key GPU-name check; (3)docs/model-preparation.md:219limits shared tuning to identical GPUs and no measured comparison was posted; (4) missingSigned-off-by. flare-autobot then halted its review (2026-11-26) as "already fixed another way". #150's Limitations explicitly flags theaot.pydevice-name cache key that #597 changes. - #584 (draft, closed 2026-11-29 04:33 by FujitsuPolycom, "Accelerate Ignition forward compilation, kernel tuning, and warmup", +4283/−264) — same three files (
aot.py +868/−124,compile_pool.py +245/−22,inductor_tuning.py +267/−58) plus a wholesale rewrite oftests/preparation/test_forward_artifact_sharing.py(+1463/−4) andtest_compile_pool.py(+451). Closed to be split into smaller PRs. #597's new tests import private helpers from exactly the file #584 rewrites (test_mixed_gpu_inductor_keying.py:17), and voipmonitor's #584 review flagged theforkstart-method test pattern that #597 also uses (:229,:99). Whichever lands first forces the other to rebase. - #122 (open, javieratomic) — makes the compiler memory headroom a preparation setting, editing
compiler_resources/admission incompile_pool.pyandaot.py(+7/−4). #597's per-group seeding consumesresources[rank].worker_bytes/headroom(compile_pool.py:97-114), so the 32 GiB and 8 GiB constants #597 now multiplies per SKU become configurable; textual conflict incompile_pool.pyis likely. - #592 (open, kbenkhaled, SM110/Jetson Thor + Breeze) — touches
aot.py(+12) andcompile_pool.py(+4) as an architecture-admission change, which will interact with #597's cross-architecture rejection. flare-autobot halted its review as "low value or does not align with the project charter". - #512 (closed, FujitsuPolycom) — same three files, forward compilation/warmup progress + pre-GPU export metadata validation; historical overlap only.
- Merged history in the touched code: f377dc85/#543 removed grouped AOT forward compilation (
ForwardCache.bind_group), i.e. the last alternative sharing path; b0d35934/#509 and #474 fixed thecompile_poolworker startup path; ea756eef/#425 introduced the largest-allocation warmup ordering_prepare_ranksstill uses; cb4b55ca/#367 and #242 surface compile-phase failures; 3e2fcd27/#559 GC at phase boundaries; b4196955/#185 Inductor bundle entries; e60bb3bc/#110 and #248 the tuning paths; c8d4c324 createdallocate_workers; 84c1c0a1 created host-local lending; b3bf45f9 addedreconcile_selections. - Adjacent issues that shaped these paths: #183/#185 (unbound static Inductor kernels), #268/#412 (warmup failure surfaced through
InductorSelections.warm→_check), #187/#154 (warmup OOM), #242/#270/#73 (forward-compilerMemoryErrorconditions).
Recent activity
- No commits on
maintouch the four changed files since the PR branched at9933960(orientation packet). The last commits inignition/preparationon main are a39f6777 (2026-11-28, AOT lowering/zero-init corruption), 85de9eae, d3d0e783, 7745deea, c9935887, 3e2fcd27/#559, 4d957175 — so #597 is not building on a fresh conflict patch, but it does sit on code that changed substantially during November (cb6187bf 10-27, c8d4c324 11-09, b3bf45f9 11-11, f9aec99c). - #597's
_prepare_ranksgathers identities before the existing "ranks prepared different forward catalogs" check (aot.py:929-950) and duplicates an architecture check thatInductorSelections.warmalso performs — a deliberate second gate, not a shared helper. - The PR was opened and never edited or commented on (updated == opened == 2026-11-29 09:56).
People
- author brandonmmusic-max, CONTRIBUTOR, not one of the charter's named priority contributors (voipmonitor, original-el8, lukealonso). Last 180 days: merged #154 (retained warmup mappings) and #162 (reasoning close-delimiter); closed #163 (GLM-5.3 Flash TrellisMX, split into #475 + hyperflare-recipes#6), #468, #215; open #480, #475, #458, #457, #150. Pattern: an SM120 4-card workstation owner who contributes both allocator/kernel work and serving surfaces, carrying the mixed-SKU thread since 2026-10-30.
- who owns these areas (180 days):
ignition/preparation— Luke Alonso 156 commits, Martin Vit 52, Eugene Rakhmatulin 36;tests/preparation— Luke Alonso 204, Martin Vit 34, jasonc 23. - reviewers so far: none on #597. yatesdr is the reviewer who engaged on #150 with a substantive CHANGES_REQUESTED; FujitsuPolycom authored the overlapping #584; voipmonitor reviewed #584; kbenkhaled owns #592; javieratomic owns #122.
Community
Zero comments, zero reviews, zero reactions, no labels on #597. The repo's flare-autobot bot posts on PRs (#150, #122, #592) but had not posted on #597 at snapshot time, so its 90-minute-after-push auto-review had not fired. The description carries the required Discord line (AGENTS.md:142-153). Trailer evidence (Signed-off-by, Design-Signed-Off-By) is not visible in the material available — and #150 was rejected partly for exactly that (CONTRIBUTING.md, docs/design-review.md).
Project fit
- Aligned: the change is in shared preparation code (
ignition/preparation), not a recipe; adds no flag, model branch, environment variable or per-model special case; targets SM120 RTX PRO 6000 workstation hardware, the charter's stated focus (charter: prepare recipes and serve captured CUDA graphs on SM103/SM120/SM121); single-host multi-GPU TP preparation is explicitly in scope; it adds guards rather than relaxing capability invariants, matching "reject weakened guarantees". - Tensions: it is a new hardware-shape branch in shared code, and the charter's non-goal is broad coverage across arbitrary GPUs; and it hard-fails mixed-architecture groups that previously could in principle have agreed by luck. More importantly the charter's "bring real evidence… bug fixes must address the root cause" is only partly met: the evidence is whole-pipeline serving numbers the description itself says are "not attributable solely to this PR", with no isolated before/after for the preparation step it changes; and
AGENTS.md:497-500asks for the shared-component blast radius to be checked across recipes, while the evidence covers DeepSeek V4.1 Flash and GLM-5.3 Flash only. - Docs drift: see Key finding 8 — descriptions of the exchanged behavior in
docs/model-preparation.md:203-209, 231-245anddocs/preparation-development.md:351-371are now stale, and no TODO entry was added. (docs/multi-host.md:286anddocs/orbit.md:214-217refuse "ambiguous mixed hardware" in Orbit placement, unrelated; noted so it is not read as an existing mixed-SKU guarantee.)
Claims and evidence
| Claim | What backs it |
|---|---|
| "96 passed in 46.13s" across 5 test files | No log or command attached; not reproducible here (no execution tool). Files exist on main; the five named suites are real. Unit-level only, all CPU/mocks. |
Mixed-SKU TP4 export + flare run of DeepSeek-V4.1-Flash: 135 CUDA graphs/rank, 38,944 kernels, 72.8 GiB / 21,058,816 KV tokens, 62 s startup, prefill 37,671→43,134 tok/s, decode 377.4→1,185.8 tok/s C1–C8, 6/6 needle, 21/21 chat/tool, 5/5 edge, 1/1 OCR, 0 errors |
Description only. Explicitly "combined-stack end-to-end serving checks… not attributable solely to this PR". No baseline run on main, no isolated compile-time/worker-shape/cache-layout measurement. The named flags (--mla-compute-mode bf16, --expert-scale-compression native, --embedding-table-storage ram) are outside this diff. |
Mixed-SKU TP4 + gb202 GLM-5.3 Flash revision: 49,868 kernels, 121 graphs/rank, 24/24 trials, 0 errors |
Same status. |
Homogeneous TP2 + gb202-tp2: 256.9 tok/s C1, 1,428.9 C32, 10.38M KV tokens, 24/24 chat, 2/2 vision, 0 errors |
Same status; the equivalent regression evidence is cheaper in the unit test test_homogeneous_gpus_preserve_unsuffixed_forward_sharing (test_mixed_gpu_inductor_keying.py:252-263). |
| Cross-architecture rejection verified by CPU unit tests only | Accurate and disclosed (:266-274, :326-340). |
| Rust tests not run because only Python changed | Accurate — the diff is three Python modules plus one test file. |
| Implicit: "enables TP preparation on mixed-SKU same-architecture SM120 hosts" | Depends on the tuning half, which is #150 (still open, CHANGES_REQUESTED); #597 itself does not make tuning agree across SKUs. The description never says so. |
Unit-test coverage is real but narrow: the warm tests stub self._gather with a scripted reply list (test_mixed_gpu_inductor_keying.py:281-288), so they assert the ordering of gathered values, not real distributed behaviour on GPUs; the _prepare_ranks tests replace _load/_path/_allocation_sizes and the compile pool (:49-58), so nothing exercises real artifacts, real Triton inventories, or a real per-SKU root with real sizes.
Reach
- Operators: multi-GPU single-host TP exports (
ignition export --gpus …) with mixed card models; also cross-host (--ranks/join), where_prepare_ranksand_publication_lockalso run. --compile-workersbecomes a floor: must be ≥ the number of active GPU groups on a host or export raisesValueError(compile_pool.py:89-92). On the PR's own 4-card host that is ≥ 2; a low-RAM host set to 1 now fails where it previously got one worker.docs/model-preparation.md:231-236still describes it as a per-host budget only.- Memory: the 32 GiB-per-worker estimate plus 2 GiB minimum allowance now applies per SKU subgroup (
compile_pool.py:116-118,docs/model-preparation.md:241-243unchanged). - Time and disk: each SKU (and each heterogeneous run layout) compiles and stores a full catalog. 2× work and roughly 2× forward-cache footprint on mixed hosts; no homogeneous/mixed cache reuse (Key finding 4). No wall-clock comparison is given.
- Compatibility: no artifact/proto/manifest format change; previously exported cores unaffected; serving and Rust untouched; no new dependency. New error surfaces appear as
preparation failed:at export time: cross-architectureRuntimeError(aot.py:934-938,inductor_tuning.py:250-255),ValueError(compile_pool.py:89-92), per-groupMemoryErrorand_balance_compilations'MemoryError(aot.py:681-682). - Documentation: not updated anywhere (Key finding 8); no release note or TODO entry.
Process
Open and self-described ready for review, one day old at snapshot, no draft status, no labels, no reviewers requested, no CI checks (and no Python CI exists to produce them — .github/workflows/ has only helios-lifecycle.yml (not opened), native-serving.yml, release.yml), no bot run, no DCO/design-acknowledgment trailer confirmed.
Open questions / not found
- Does the Inductor-inventory mismatch or the cross-SKU lending abort actually reproduce on current
main? No log, issue or link shows it; #150's reviewer asked the identical question and #150 still has no answer. - Do the two device names in question ever normalize (
aot.py:940) to the samegpu_tagwhile differing raw? Untested; a collision would silently re-share artifact file names while keeping separate Inductor groups. - Are
Signed-off-by/Design-Signed-Off-Bytrailers onf8a033a? Not visible in available material; required byCONTRIBUTING.mdanddocs/design-review.md, and cited against #150. - Is the "96 passed in 46.13s" run reproducible, and does the new test file survive #584's rewrite of
tests/preparation/test_forward_artifact_sharing.py, whose private fixtures it imports? - Whether the per-SKU worker seeding (one worker per active group before surplus) costs measurable wall-clock on a 4-GPU mixed host versus the old one-worker-per-host admission — no measurement given.
- Interaction with #122 (configurable headroom) and #592 (architecture admission) in
compile_pool.py/aot.pyis unaddressed; whichever lands first forces a rebase.