Repository navigation
Fix how SimpleFSDP get the nD mesh - #1959
Merged
Merged
Conversation
[ghstack-poisoned]
tianyu-l
reviewed
Oct 29, 2025
[ghstack-poisoned]
ruisizhang123
pushed a commit
that referenced
this pull request
Oct 29, 2025
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.12.0) (oldest at bottom): * #1960 * #1959 * __->__ #1963 pytorch/pytorch#166130 changes the configs and this PR adopts the new configs Squash and Merge button won't work for this PR. I'll merge by myself.
[ghstack-poisoned]
fegin
added a commit
that referenced
this pull request
Oct 29, 2025
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.12.0) (oldest at bottom): * #1960 * #1959 * __->__ #1965 **Squash and Merge button won't work for this PR. I'll merge by myself.** #1963 was accdientally merge with Squash and Merge button. This is a reland PR.
tianyu-l
approved these changes
Oct 30, 2025
lw
approved these changes
Oct 30, 2025
| assert inner_mesh.mesh_dim_names is not None | ||
| submesh_names = outer_mesh.mesh_dim_names + inner_mesh.mesh_dim_names | ||
| spanned_mesh = outer_global_mesh[submesh_names] | ||
| spanned_mesh = DeviceMesh._concatenate((outer_mesh, inner_mesh)) |
There was a problem hiding this comment.
Nice!
One nit: isn't the argument supposed to be a list, and not a tuple?
If so, how come there is no type checking or other linting to catch this?
Note that we've already observed TorchTitan being somewhat incorrect with types, e.g., it passes lists to init_device_mesh instead of tuples.
Contributor
Author
There was a problem hiding this comment.
Good point, I believe we have not enabled type checking for TorchTitan, which we should.
fegin
added a commit
that referenced
this pull request
Oct 30, 2025
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.12.0) (oldest at bottom): * __->__ #1960 * #1959 As title, no logic change. **Squash and Merge button won't work for this PR. I'll merge by myself.**
jquesnelle
pushed a commit
to NousResearch/torchtitan
that referenced
this pull request
Nov 10, 2025
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.12.0) (oldest at bottom): * pytorch#1960 * pytorch#1959 * __->__ pytorch#1965 **Squash and Merge button won't work for this PR. I'll merge by myself.** pytorch#1963 was accdientally merge with Squash and Merge button. This is a reland PR.
jquesnelle
pushed a commit
to NousResearch/torchtitan
that referenced
this pull request
Nov 10, 2025
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.12.0) (oldest at bottom): * pytorch#1960 * __->__ pytorch#1959 This is the recommended way to get the nD mesh now that DeviceMesh has _concatenate(). **Squash and Merge button won't work for this PR. I'll merge by myself.**
jquesnelle
pushed a commit
to NousResearch/torchtitan
that referenced
this pull request
Nov 10, 2025
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.12.0) (oldest at bottom): * __->__ pytorch#1960 * pytorch#1959 As title, no logic change. **Squash and Merge button won't work for this PR. I'll merge by myself.**
xrsrke
pushed a commit
to NousResearch/torchtitan
that referenced
this pull request
Feb 13, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.12.0) (oldest at bottom): * pytorch#1960 * pytorch#1959 * __->__ pytorch#1965 **Squash and Merge button won't work for this PR. I'll merge by myself.** pytorch#1963 was accdientally merge with Squash and Merge button. This is a reland PR.
xrsrke
pushed a commit
to NousResearch/torchtitan
that referenced
this pull request
Feb 13, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.12.0) (oldest at bottom): * pytorch#1960 * __->__ pytorch#1959 This is the recommended way to get the nD mesh now that DeviceMesh has _concatenate(). **Squash and Merge button won't work for this PR. I'll merge by myself.**
xrsrke
pushed a commit
to NousResearch/torchtitan
that referenced
this pull request
Feb 13, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.12.0) (oldest at bottom): * __->__ pytorch#1960 * pytorch#1959 As title, no logic change. **Squash and Merge button won't work for this PR. I'll merge by myself.**
xrsrke
pushed a commit
to NousResearch/torchtitan
that referenced
this pull request
Feb 25, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.12.0) (oldest at bottom): * pytorch#1960 * pytorch#1959 * __->__ pytorch#1965 **Squash and Merge button won't work for this PR. I'll merge by myself.** pytorch#1963 was accdientally merge with Squash and Merge button. This is a reland PR.
xrsrke
pushed a commit
to NousResearch/torchtitan
that referenced
this pull request
Feb 25, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.12.0) (oldest at bottom): * pytorch#1960 * __->__ pytorch#1959 This is the recommended way to get the nD mesh now that DeviceMesh has _concatenate(). **Squash and Merge button won't work for this PR. I'll merge by myself.**
xrsrke
pushed a commit
to NousResearch/torchtitan
that referenced
this pull request
Feb 25, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.12.0) (oldest at bottom): * __->__ pytorch#1960 * pytorch#1959 As title, no logic change. **Squash and Merge button won't work for this PR. I'll merge by myself.**
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.
Stack from ghstack (oldest at bottom):
This is the recommended way to get the nD mesh now that DeviceMesh has _concatenate().
Squash and Merge button won't work for this PR. I'll merge by myself.