Repository navigation
[moe][compile] Turn capture_scalar_outputs off by default - #1649
Merged
Merged
Conversation
[ghstack-poisoned]
xmfan
marked this pull request as ready for review
August 28, 2025 06:58
xmfan
requested review from
fegin,
tianyu-l,
wconstab and
wwwjn
as code owners
August 28, 2025 06:58
Contributor
|
lgtm, when testing with torchao I found a new different issue, created: #1651 |
tianyu-l
approved these changes
Aug 29, 2025
| @@ -107,7 +107,6 @@ def parallelize_llama( | |||
| # turn on per-TransformerBlock compile after AC wrapping and before FSDP | |||
| if model_compile_enabled: | |||
| # NOTE: needed for torch.compile to work with dynamic shapes in token-choice MoE | |||
wwwjn
pushed a commit
that referenced
this pull request
Sep 3, 2025
FIXES #1640, some ranks are hanging during compilation on MoE, not sure why yet. But disabling it because it's just an unstable flag that we really need CI runs in both pytorch core and torchtitan repos to ensure EP configs work. `NGPU=4 CUDA_VISIBLE_DEVICES="0,1,2,3" CONFIG_FILE="./torchtitan/experiments/llama4/train_configs/debug_model.toml" tlp ./run_train.sh --training.steps=50 --parallelism.data_parallel_shard_degree=4 --parallelism.expert_parallel_degree=4 --compile.enable` with compile: MFU ~27% https://gist.github.com/xmfan/f0a96e1116d507bb4aed8e661ec141f7 without compile: MFU ~25% https://gist.github.com/xmfan/de15d487dda6ee962645c5047ee1348e tlparses: https://manifold.edge.x2p.facebook.net/v0/read/tree/logs/xmfan/643f743e-b4a3-4568-b91f-766024ca10c6/custom/rank_0/index.html?bucketName=tlparse_reports&apiKey=tlparse_reports-key&withPayload=1&timeoutMsec=10000 https://manifold.edge.x2p.facebook.net/v0/read/tree/logs/xmfan/643f743e-b4a3-4568-b91f-766024ca10c6/custom/rank_1/index.html?bucketName=tlparse_reports&apiKey=tlparse_reports-key&withPayload=1&timeoutMsec=10000 https://manifold.edge.x2p.facebook.net/v0/read/tree/logs/xmfan/643f743e-b4a3-4568-b91f-766024ca10c6/custom/rank_2/index.html?bucketName=tlparse_reports&apiKey=tlparse_reports-key&withPayload=1&timeoutMsec=10000 https://manifold.edge.x2p.facebook.net/v0/read/tree/logs/xmfan/643f743e-b4a3-4568-b91f-766024ca10c6/custom/rank_3/index.html?bucketName=tlparse_reports&apiKey=tlparse_reports-key&withPayload=1&timeoutMsec=10000 @danielvegamyhre grouped_mm is still captured in graph 5/0 so i think torchao will still be compiled? as for comms, i'm not too worried about perf since the eager code is using synchronous collectives atm Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #1649
xrsrke
pushed a commit
to NousResearch/torchtitan
that referenced
this pull request
Feb 13, 2026
FIXES pytorch#1640, some ranks are hanging during compilation on MoE, not sure why yet. But disabling it because it's just an unstable flag that we really need CI runs in both pytorch core and torchtitan repos to ensure EP configs work. `NGPU=4 CUDA_VISIBLE_DEVICES="0,1,2,3" CONFIG_FILE="./torchtitan/experiments/llama4/train_configs/debug_model.toml" tlp ./run_train.sh --training.steps=50 --parallelism.data_parallel_shard_degree=4 --parallelism.expert_parallel_degree=4 --compile.enable` with compile: MFU ~27% https://gist.github.com/xmfan/f0a96e1116d507bb4aed8e661ec141f7 without compile: MFU ~25% https://gist.github.com/xmfan/de15d487dda6ee962645c5047ee1348e tlparses: https://manifold.edge.x2p.facebook.net/v0/read/tree/logs/xmfan/643f743e-b4a3-4568-b91f-766024ca10c6/custom/rank_0/index.html?bucketName=tlparse_reports&apiKey=tlparse_reports-key&withPayload=1&timeoutMsec=10000 https://manifold.edge.x2p.facebook.net/v0/read/tree/logs/xmfan/643f743e-b4a3-4568-b91f-766024ca10c6/custom/rank_1/index.html?bucketName=tlparse_reports&apiKey=tlparse_reports-key&withPayload=1&timeoutMsec=10000 https://manifold.edge.x2p.facebook.net/v0/read/tree/logs/xmfan/643f743e-b4a3-4568-b91f-766024ca10c6/custom/rank_2/index.html?bucketName=tlparse_reports&apiKey=tlparse_reports-key&withPayload=1&timeoutMsec=10000 https://manifold.edge.x2p.facebook.net/v0/read/tree/logs/xmfan/643f743e-b4a3-4568-b91f-766024ca10c6/custom/rank_3/index.html?bucketName=tlparse_reports&apiKey=tlparse_reports-key&withPayload=1&timeoutMsec=10000 @danielvegamyhre grouped_mm is still captured in graph 5/0 so i think torchao will still be compiled? as for comms, i'm not too worried about perf since the eager code is using synchronous collectives atm Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ pytorch#1649
xrsrke
pushed a commit
to NousResearch/torchtitan
that referenced
this pull request
Feb 25, 2026
FIXES pytorch#1640, some ranks are hanging during compilation on MoE, not sure why yet. But disabling it because it's just an unstable flag that we really need CI runs in both pytorch core and torchtitan repos to ensure EP configs work. `NGPU=4 CUDA_VISIBLE_DEVICES="0,1,2,3" CONFIG_FILE="./torchtitan/experiments/llama4/train_configs/debug_model.toml" tlp ./run_train.sh --training.steps=50 --parallelism.data_parallel_shard_degree=4 --parallelism.expert_parallel_degree=4 --compile.enable` with compile: MFU ~27% https://gist.github.com/xmfan/f0a96e1116d507bb4aed8e661ec141f7 without compile: MFU ~25% https://gist.github.com/xmfan/de15d487dda6ee962645c5047ee1348e tlparses: https://manifold.edge.x2p.facebook.net/v0/read/tree/logs/xmfan/643f743e-b4a3-4568-b91f-766024ca10c6/custom/rank_0/index.html?bucketName=tlparse_reports&apiKey=tlparse_reports-key&withPayload=1&timeoutMsec=10000 https://manifold.edge.x2p.facebook.net/v0/read/tree/logs/xmfan/643f743e-b4a3-4568-b91f-766024ca10c6/custom/rank_1/index.html?bucketName=tlparse_reports&apiKey=tlparse_reports-key&withPayload=1&timeoutMsec=10000 https://manifold.edge.x2p.facebook.net/v0/read/tree/logs/xmfan/643f743e-b4a3-4568-b91f-766024ca10c6/custom/rank_2/index.html?bucketName=tlparse_reports&apiKey=tlparse_reports-key&withPayload=1&timeoutMsec=10000 https://manifold.edge.x2p.facebook.net/v0/read/tree/logs/xmfan/643f743e-b4a3-4568-b91f-766024ca10c6/custom/rank_3/index.html?bucketName=tlparse_reports&apiKey=tlparse_reports-key&withPayload=1&timeoutMsec=10000 @danielvegamyhre grouped_mm is still captured in graph 5/0 so i think torchao will still be compiled? as for comms, i'm not too worried about perf since the eager code is using synchronous collectives atm Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ pytorch#1649
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.
FIXES #1640, some ranks are hanging during compilation on MoE, not sure why yet. But disabling it because it's just an unstable flag that we really need CI runs in both pytorch core and torchtitan repos to ensure EP configs work.
NGPU=4 CUDA_VISIBLE_DEVICES="0,1,2,3" CONFIG_FILE="./torchtitan/experiments/llama4/train_configs/debug_model.toml" tlp ./run_train.sh --training.steps=50 --parallelism.data_parallel_shard_degree=4 --parallelism.expert_parallel_degree=4 --compile.enablewith compile: MFU ~27%
https://gist.github.com/xmfan/f0a96e1116d507bb4aed8e661ec141f7
without compile: MFU ~25%
https://gist.github.com/xmfan/de15d487dda6ee962645c5047ee1348e
tlparses:
https://manifold.edge.x2p.facebook.net/v0/read/tree/logs/xmfan/643f743e-b4a3-4568-b91f-766024ca10c6/custom/rank_0/index.html?bucketName=tlparse_reports&apiKey=tlparse_reports-key&withPayload=1&timeoutMsec=10000
https://manifold.edge.x2p.facebook.net/v0/read/tree/logs/xmfan/643f743e-b4a3-4568-b91f-766024ca10c6/custom/rank_1/index.html?bucketName=tlparse_reports&apiKey=tlparse_reports-key&withPayload=1&timeoutMsec=10000
https://manifold.edge.x2p.facebook.net/v0/read/tree/logs/xmfan/643f743e-b4a3-4568-b91f-766024ca10c6/custom/rank_2/index.html?bucketName=tlparse_reports&apiKey=tlparse_reports-key&withPayload=1&timeoutMsec=10000
https://manifold.edge.x2p.facebook.net/v0/read/tree/logs/xmfan/643f743e-b4a3-4568-b91f-766024ca10c6/custom/rank_3/index.html?bucketName=tlparse_reports&apiKey=tlparse_reports-key&withPayload=1&timeoutMsec=10000
@danielvegamyhre grouped_mm is still captured in graph 5/0 so i think torchao will still be compiled?
as for comms, i'm not too worried about perf since the eager code is using synchronous collectives atm
Stack from ghstack (oldest at bottom):