Add addtional config to import xla flags directly to compile()#3570
Open
Add addtional config to import xla flags directly to compile()#3570
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
gobbleturk
requested changes
Apr 4, 2026
Collaborator
gobbleturk
left a comment
There was a problem hiding this comment.
I think this only supports OSS usage (which is kind of already supported since you can export these before running train_compile). Have you tested this internally - I don't think this will work
0d2ca8a to
58918e8
Compare
khatwanimohit
approved these changes
Apr 6, 2026
gobbleturk
requested changes
Apr 6, 2026
src/maxtext/configs/base.yml
Outdated
| # internal_compile allows bypassing open-source topology name mappings when using internal topologies directly via get_topology_desc. | ||
| internal_compile: False | ||
| internal_compile_num_devices: -1 # You must specify the number of devices when using internal_compile. | ||
| internal_compile_libtpu_flags: "" # Compiler options for internal compilation only |
Collaborator
There was a problem hiding this comment.
note there is no libtpu internally, libtpu is only used in cloud/OSS environments.
I also think this should work for both internal and OSS? Does it not work for OSS? If it works for both, we could call this compile_xla_flags
58918e8 to
dcf2450
Compare
dcf2450 to
9ce6019
Compare
gobbleturk
approved these changes
Apr 6, 2026
src/maxtext/configs/base.yml
Outdated
| # internal_compile allows bypassing open-source topology name mappings when using internal topologies directly via get_topology_desc. | ||
| internal_compile: False | ||
| internal_compile_num_devices: -1 # You must specify the number of devices when using internal_compile. | ||
| compile_xla_flags: "" # Compiler options for compilation only |
Collaborator
There was a problem hiding this comment.
can you show an example value here to help users format correctly?
9ce6019 to
78c0122
Compare
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
Add an additional flag
compile_xla_flagsto import libtpu flags for internal compilation usage.Tests
bash experimental/users/chengnuojin/maxtext-compile/deepseek3-671b/ds-pp8-ep8-fsdp128.sh. The compilation succeed (otherwise got vmem oom error if flags are not imported properly)Checklist
Before submitting this PR, please make sure (put X in square brackets):
gemini-reviewlabel.