Repository navigation
make get tp mesh optional in llama4 parallelize - #2185
Merged
Merged
Conversation
danielvegamyhre
requested review from
fegin,
tianyu-l,
wconstab and
wwwjn
as code owners
December 29, 2025 21:34
Contributor
Author
tianyu-l
approved these changes
Dec 29, 2025
tianyu-l
left a comment
Contributor
There was a problem hiding this comment.
sg, do we need to modify other moe models as well? Qwen, gpt-oss, deepseek v3
fegin
approved these changes
Dec 29, 2025
fegin
left a comment
Contributor
There was a problem hiding this comment.
Thanks for catching the bug. @tianyu-l yes, other models with EP supported need the same change. I can do this or @danielvegamyhre if you are able to fix it before landing, that also be good.
| @@ -135,7 +135,7 @@ def parallelize_llama( | |||
|
|
|||
| # tp_mesh might have been set above if tp_enabled, otherwise get it here | |||
| if tp_mesh is None: | |||
Contributor
There was a problem hiding this comment.
You can also remove line 136 and line 137.
Contributor
Author
There was a problem hiding this comment.
updated and applied fix to qwen3 as well. dsv3 and gpt-oss both seem to use get_optional_mesh() already
xrsrke
pushed a commit
to NousResearch/torchtitan
that referenced
this pull request
Feb 13, 2026
Fixes pytorch#2184 get_mesh() throws an exception if the mesh dim is none, so the current code implicitly requires TP > 1. we should use get_optional_mesh() so the user isn't required to use TP.
TXacs
pushed a commit
to McmillanTAC/torchtitan
that referenced
this pull request
Apr 13, 2026
Fixes pytorch#2184 get_mesh() throws an exception if the mesh dim is none, so the current code implicitly requires TP > 1. we should use get_optional_mesh() so the user isn't required to use TP.
ACharacterInASimulation
pushed a commit
to ACharacterInASimulation/torchtitan
that referenced
this pull request
Apr 21, 2026
Fixes pytorch#2184 get_mesh() throws an exception if the mesh dim is none, so the current code implicitly requires TP > 1. we should use get_optional_mesh() so the user isn't required to use TP.
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 #2184
get_mesh() throws an exception if the mesh dim is none, so the current code implicitly requires TP > 1.
we should use get_optional_mesh() so the user isn't required to use TP.