Change mosaic_group_id in case of GPUs/CPUs#3041
Merged
copybara-service[bot] merged 1 commit intoAI-Hypercomputer:mainfrom Feb 2, 2026
Merged
Change mosaic_group_id in case of GPUs/CPUs#3041copybara-service[bot] merged 1 commit intoAI-Hypercomputer:mainfrom
copybara-service[bot] merged 1 commit intoAI-Hypercomputer:mainfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
gobbleturk
approved these changes
Jan 29, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
NuojCheng
approved these changes
Jan 30, 2026
0a39e70
into
AI-Hypercomputer:main
48 of 65 checks passed
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.
Description
On multi-process GPU/CPU runs,
random.randint()generates differentmosaic_fusion_groupIDs per process. This causes HLO fingerprint to diverge across all the processes. The XLA Autotuner then deadlocks because each process wait for autotune results, keyed by fingerprints that other processes do not have.The fix here allows to have a deterministic group ID,
'0', for GPU/CPU, and keep it random for TPUs.The parent code originated from this PR
Tests
To test the changes I have run
llama4-17b-16emodel with the following specifications:The above was in deadlock state when running without the mosaic modification, e.g. last line of the log
Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.