Repository navigation
Treat Max-Q and Workstation Edition device names as one GPU when tuning - #150
Open
brandonmmusic-max wants to merge 1 commit into
Open
brandonmmusic-max wants to merge 1 commit into
brandonmmusic-max wants to merge 1 commit into
Conversation
A TP4 group can mix RTX PRO 6000 Max-Q and Workstation Edition cards: the same GB202 silicon under device names that differ only by "Max-Q". Tuning compared the full name, so the ranks neither sharded nor shared. Each rank raced independently and chose different MoE plans (layer 20 csf_inline_scales), and the compiled forwards, which bind one rank's choices, failed their guards on the other ranks with "BindingMismatch: rank-local forward does not match compiled guards". Compare the device name with the Max-Q token removed. Ranks that agree on that name now adopt rank zero's cached selections, shard new candidate races so every rank takes one winner, and let agree_selections verify agreement before compilation. Ranks whose names still differ after removing the token keep the previous behavior: they shard only on an exact match, and share selections only across hosts. Validation: a new test in tests/preparation/test_tuning.py has rank zero report the Max-Q name and a peer report the same GB202 silicon without the token; the peer adopts rank zero's selections, shards the race, and verifies selections. A GB10 peer does none of these. The test fails on 921afd5 and passes with this change. The new cases and the existing sharding cases pass (18 passed: 2 new, 16 existing). Limits: the unit test covers two device names on one host. The export that motivated the change ran on four GB202 cards, two Max-Q and two Workstation Edition. Other mixed groups, such as Max-Q cards paired with a different SKU, were not exercised. Design-Signed-Off-By: Claude Opus 5.5 (Claude Code); design-review=1c01
This was referenced Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A tensor-parallel group can mix RTX PRO 6000 Blackwell Max-Q Workstation Edition and RTX PRO 6000 Blackwell
Workstation Edition cards: the same GB202 silicon under device names that differ only by "Max-Q". A DeepSeek V4.1
TP4 export on such a group (one PCIe host, two cards of each, 96 GB per card) failed during compiled preparation
with
BindingMismatch: rank-local forward does not match compiled guards. The guard named layer 20's expertsbinding and
execution_plan.decode_config.csf_inline_scales, false on two ranks and true on the other two: theranks had chosen different MoE plans.
RecordedPreparationSession.tunedecides whether to shard tuning and share selections by comparing(device name, local tuning catalog)across ranks. The names differ only by "Max-Q", so the ranks neithersharded nor shared. Each rank raced its own candidates and kept its own winner, and the compiled tensor-parallel
forwards, which bind one rank's selections, failed their guards on the others.
The ranks compare the device name with the Max-Q token removed. Ranks that agree on that name adopt rank
zero's cached selections before tuning, shard candidate races so every rank takes one winner, and
agree_selectionsverifies agreement before compilation. Ranks whose names differ after removing the tokenshard only on an exact name match and share selections only across hosts.
Validation
test_max_q_rank_shares_and_shards_tuning_only_with_same_siliconintests/preparation/test_tuning.pyhas rankzero report the Max-Q name and a peer report the same silicon without it: the peer adopts rank zero's selections,
shards the race, and verifies selections. A peer reporting a GB10 does none of these. The same-silicon case fails
on
a161b17fand passes with this change; all 100 tests in the file pass.25 failed, 4,187 passed, 2,462 skipped on unmodified
a161b17f. The failing ids are identical; no test failsonly with this change.
921afd5c) that also carriedthree local changes this PR does not include: acceptance of the host's CSF checkpoint layout (2-D scale
planes), an OpenAI-compatible serving surface, and an override of torch's compile-package GPU-name check
for the two card names (see Limitations):
mismatch. It then stopped in "Warm compiled forwards" with CUDA out of memory. That failure comes from transient
physical backing retained across the warmup catalog (
a794c99d), not from tuning; pull request Reuse retained warmup mappings across compiled warmup #154 addresses it.and its package booted and passed its quality checks, so no later preparation stage depends on per-rank
selections.
Limitations
names was not run.
forwards require one selection, so agreement is the requirement.
and every rank loads the same artifacts, and torch's compile-package check compares GPU names exactly, so a
rank refuses forwards compiled on the other card name ("Compile package was created with different GPU").
The exports above passed that check only through the local override; a GLM-5.3 Flash TP4 export on the same
group without it stopped there. That check lives in
torch/_dynamo/package.py, outside the files Flare'sbundled patches may modify, so it is not addressed here.
Export evidence (DeepSeek V4.1 TP4, two Max-Q and two Workstation Edition GB202 cards)
Without this change (export rc=1 after 54 minutes):
With this change: no
BindingMismatch;Load compiled forwards. 113/113, thenWarm compiled forwards. 47/113with CUDA out of memory (49 MiB free on GPU 0).
Diagnostic export with this change and immediate release of warmup transient backing:
export rc=0 elapsed 77 min,Load compiled forwards. 113/113,Warm compiled forwards. 113/113, package booted healthy after 200 s, allquality checks passed.