Explore scratchpad · NVIDIA/hyperflare-inference #597

Raw Markdown for agents: https://autobot.eidonix.com/p/6b3bcb1d-6248-49b9-ac1f-3c4236e67b1d.md

#1 [high] Change: what #597 does, size, files

PR #597 "Key compiled forward sharing and Inductor validation by GPU name", author brandonmmusic-max (CONTRIBUTOR), branch mixed-gpu-inductor-keying -> main, head f8a033a, opened 2026-11-29 09:56, open, ready for review, no reviews, no CI checks, 0 comments. Size: 4 files, +467/-44.

What it does (verified in diff):

Not documented in description but present in code: (a) the cross-architecture RuntimeError messages/shape in both aot.py and inductor_tuning.py; (b) _prepare_ranks computes gpu_tag unconditionally and lowercases/strips; (c) the MemoryError now fires per active group rather than per host; (d) the ValueError is a new hard failure for small writer/worker limits that previously just under-provisioned.

#2 [high] Related work: #150 is the same author's open precursor/alternative for the same mixed-SKU host

#150 (open PR, same author brandonmmusic-max, opened 2026-10-30, updated 2026-11-26, labels area:preparation, bug, model:deepseek-v4.1, priority:P2, triage:review) "Treat Max-Q and Workstation Edition device names as one GPU when tuning", branch mixed-sku-tuning-agreement, +51/-2, files ignition/preparation/tuning.py (+11/-2) and tests/preparation/test_tuning.py.

It is the tuning-side counterpart of #597 and the same underlying hardware situation: TP4 group of 2x RTX PRO 6000 Blackwell Max-Q + 2x RTX PRO 6000 Blackwell Workstation Edition on one PCIe host, SM120. On 2026-10-29 base the export failed with BindingMismatch: rank-local forward does not match compiled guards (csf_inline_scales False on two ranks, True on two) because RecordedPreparationSession.tune compares (device name, local tuning catalog) and the names differ by the "Max-Q" token; ranks neither sharded nor shared tuning.

#150's own Limitations section (verbatim relevance): "Agreement on tuning is necessary but not sufficient for these groups: tensor-parallel forwards compile once and every rank loads the same artifacts, and both main's compiled-forward cache key (ignition/preparation/aot.py, which includes the device name) and torch's compile-package check compare GPU names exactly. The 2026-10-29 exports below passed that check only through a local change to ignition/preparation/aot.py that treats the two names as one GPU."

So #150 is an explicitly stacked precursor: #597 (per-SKU keying, i.e. the opposite direction: let each SKU have its own artifacts) replaces the "treat the two names as one GPU" local hack. Note the design direction differs: #150 makes the two SKUs share one tuning plan; #597 makes each SKU compile and bind its own forwards. That is a tension worth flagging (they are not simply stacked; #150's approach and #597's approach are alternative answers to the same mixed-SKU host).

Status of #150: review CHANGES_REQUESTED by yatesdr 2026-11-18 (asked to show the failure on main since main now has reconcile_selections in tuning.py:560 from b3bf45f9; noted description concedes main's compiled-forward cache key includes the device name at aot.py:696-697; asked for measured comparison since docs/model-preparation.md:219 limits shared tuning to identical GPUs; asked for Signed-off-by). Then 2026-11-26 flare-autobot: "## Review Stopped — Auto-Review halted due to finding: It was already fixed another way (merged or on the main branch), or is no longer needed for another reason." #150 is still open with no CI-green resolution and no maintainer approval.

#3 [high] The why: no linked issue reproduces the Inductor-mismatch abort; the documented mixed-SKU abort is #150's BindingMismatch

The claimed motivating failure ("On mixed-SKU SM120 hosts, tensor-parallel preparation aborted on mismatched Inductor kernel inventories or cross-SKU artifact sharing") has a documented prior instance: PR #150's description (2026-10-30) records a DeepSeek V4.1 TP4 export on 2x Max-Q + 2x Workstation Edition SM120 GPUs failing with BindingMismatch: rank-local forward does not match compiled guards, naming layer 20's experts binding and execution_plan.decode_config.csf_inline_scales false on two ranks / true on the other two. That failure is a tuning-agreement failure, not the Inductor-inventory mismatch #597 fixes; #597's runtime of the mixed-SKU host is evidenced only by its own end-to-end serving runs, not by a linked issue reproducing the Inductor mismatch.

Search results for issues/PRs describing the #597 failure signature (Inductor kernels disagree, different Inductor kernels, equivalent compiled forward variant) returned no matches in the searchable window — so #597 does not cite or link any issue that reports the abort it fixes.

dfea2875/#110 (2026-10-27, "Agree and freeze Inductor kernels before graph capture") is the commit that introduced the cross-rank Inductor inventory agreement in InductorSelections; the "equivalent compiled forward variant ... has different Inductor kernels" RuntimeError is at ignition/preparation/inductor_tuning.py:259 (old line 253 in #268's traceback).

#4 [high] Project fit: docs describe the pre-change host-wide sharing that #597 replaces, and were not updated

Docs that describe the exact behaviors #597 changes, unchanged by the PR (docs are not in the diff):

#5 [high] Change: ForwardCache.root already hashed the GPU name; the shared thing was lending, not the directory

#6 [high] Change: behaviors the description does not state (new hard failures, extra barriers, tag normalization)

Verified by reading the diff and resulting code:

#7 [high] Claims: what the tests do and do not establish; no baseline failure shown for the abort this fixes

#11 [high] Reach: mixed-SKU and cross-host TP exports, --compile-workers floor, doubled cache/compile work, no artifact format change

Who/what the change reaches, with citations:

#12 [high] Research summary

Case file prepared for PR #597 (Key compiled forward sharing and Inductor validation by GPU name, brandonmmusic-max, +467/−44, 4 files, no reviews, no CI, 0 comments). Eleven scratchpad entries cover all nine angles.

Key findings a reader could not get from the description: (1) ForwardCache.root already hashed the GPU product name (aot.py:750-763), so mixed-SKU ranks never shared a cache directory — what they shared was the lending/assignment logic and one host-wide publication.lock; the description's "shared compiled forward artifacts" premise is loose. (2) Three new hard failures the description only partly declares: a ValueError when a host's worker limit is below the number of active GPU groups (compile_pool.py:89-92), a MemoryError whose condition moved from one-worker-per-host to one-worker-per-GPU-group (compile_pool.py:116-118), and two new cross-architecture RuntimeErrors (aot.py:934-938, inductor_tuning.py:250-255); plus extra per-(host,root) barriers and an unguarded gpu_tag normalization that could collide. (3) Docs describing exactly the replaced behavior (docs/model-preparation.md:203-209, 238-245; docs/preparation-development.md:351-371) were not updated. (4) The sibling PR #150 by the same author is an alternative answer for the same mixed Max-Q/Workstation TP4 host (make the two names one GPU rather than give each its own artifacts), is still open with CHANGES_REQUESTED from yatesdr, and its Limitations section names the very aot.py GPU-name cache key this PR changes. (5) No issue or PR in the searchable window reproduces the Inductor-inventory abort this PR fixes; the only documented mixed-SKU abort is #150's BindingMismatch, and the reviewer's demand there was "show the failure on main" — which #597 also does not supply. (6) Test evidence is mock-level CPU only, no workflow in .github runs Python tests at all, and the new test file imports private fixtures from test_forward_artifact_sharing.py — the file that closed draft #584 was rewriting. (7) Core impact: --compile-workers becomes a per-SKU floor, and a mixed host now compiles and caches a full catalog per SKU.

Also recorded: recent activity in these files (cb6187bf introduced the Inductor agreement, b3bf45f9 added reconcile_selections as main's own answer, c8d4c324 created allocate_workers, 84c1c0a1 the lending path, f377dc85/#543, b0d35934/#509, a39f6777, #559), the people owning ignition/preparation (Luke Alonso, Martin Vit, Eugene Rakhmatulin), the author's SM120 mixed-SKU series (#150, #154, #163, #475, #480), charter alignment and tensions (shared code, no flags, but a new hardware-shape branch and whole-pipeline-only evidence), and reach/compatibility (no proto/manifest/artifact change; serving untouched).

#13 [high] Related work: overlapping and superseded PRs on the same three files (#584, #512, #592, #122) and merged history

Catalog of other work on the same code, with what each means for #597:

#14 [high] Claims: each stated result and what backs it (or does not)

Each claim in #597's description, with what backs it:

  1. "Unit tests: 96 passed in 46.13s" across test_mixed_gpu_inductor_keying.py (13 tests) + test_forward_artifact_sharing.py + test_inductor_prepared_winners.py + test_compile_pool.py + test_core_boundary.py. Backing: none attached (no log, no command); unverified here (no execution tool). Plausible in kind — those files all exist on main. No CUDA test run; nothing on a GPU.
  2. "Mixed-SKU TP4 export and flare run of DeepSeek-V4.1-Flash on 4 SM120 cards (2 Max-Q 300 W + 2 Workstation 450 W), 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 8K→128K, decode 377.4 tok/s C1 → 1,185.8 C8, 6/6 needle, 21/21 chat/tool, 5/5 edge, 1/1 OCR, 0 errors." Backing: description only; explicitly conceded as "combined-stack end-to-end serving checks" and "not attributable solely to this PR". No before/after on main; no isolated measurement of the preparation step (compile time, worker shape, cache layout) that the PR actually changes. The named flags (--mla-compute-mode bf16, --expert-scale-compression native, --embedding-table-storage ram) are recipe/CLI settings outside this diff.
  3. "Mixed-SKU TP4 + gb202 revision of brandonmusic/glm-5.3-flash-exl3-tr3-2.375bpw-flare: 49,868 kernels, 121 graphs/rank, 24/24 trials, 0 errors." Same status: combined-stack, no baseline.
  4. "Homogeneous TP2 + gb202-tp2 revision: 256.9 tok/s C1, 1,428.9 C32, 10.38M KV tokens, 24/24 chat, 2/2 vision, 0 errors." Same status; its purpose is regression evidence that homogeneous paths still work, which the unit test test_homogeneous_gpus_preserve_unsuffixed_forward_sharing also covers cheaply.
  5. "Cross-architecture rejection verified by CPU unit tests rather than a mixed-architecture multi-GPU host" — accurate and disclosed.
  6. "Rust crate tests were not run because this PR modifies Python preparation and test files only" — accurate (diff is 3 Python modules + 1 test file); note cargo CI would have run regardless on push.
  7. Implicit claim "enables tensor-parallel preparation on mixed-SKU same-architecture SM120 hosts": the enabling chain in the author's stack is #150 (tuning agreement) + #154 (warmup retention, merged) + #597; #163 (2026-11-01) records a TP4 run on four RTX PRO 6000 Blackwell GPUs carrying the same local "override of torch's compile-package GPU-name comparison" — i.e. earlier mixed-SKU runs already needed a GPU-name workaround that #597 now replaces in the forward-cache layer. Nothing in the description ties #597 to #150's merge state.

#8 [medium] People: author's SM120 mixed-SKU series and the maintainers who own ignition/preparation

brandonmmusic-max, GitHub association CONTRIBUTOR (not one of the three priority contributors named in the charter: @voipmonitor, @original-el8, @lukealonso). Last-180-day record per the orientation packet and items read:

#9 [medium] Community & process: no reviews, no CI, no bot run; DCO/design acknowledgment unverified

#10 [medium] Project fit: matches the SM120 focus and avoids flags, but is a new hardware-shape branch and its evidence is whole-pipeline

Charter lines (read_charter): goals are preparing supported recipes and serving captured CUDA graphs on SM103/SM120/SM121; non-goals are broad production coverage across arbitrary models/GPUs/deployment setups; "Solve the right problem in the right place... Look for the smallest footprint in shared code"; "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over main on a served workload (#210). Bug fixes need to address the root cause"; "No per-model special cases or flags: Keep shared runtime layers general"; PR descriptions must have the four parts. Alignment: