Revert getitem sibling clustering (#445) and support kwargs inputs matching TorchTitan to fix CI#451
Merged
Merged
Conversation
115bb07 to
ed31dca
Compare
Revert the graph clustering behavior introduced by 51f2f67 because the bridge-group recovery can reuse an already cluster-linked node as the root of another cluster group. The sharding optimizer treats cluster-linked nodes as not owning PuLP variables, so later flow constraints can resolve a linked key through cluster_links to a root key that was never materialized in pulp_variables. DeepSeek V3 placement then fails before solving with KeyError on the resolved cluster key. Keep the later DeepSeek V3 clustering coverage, but remove the getitem-specific expectations that depended on the reverted bridge-group behavior. Make both the DS3 local_map example and DS3 clustering coverage use the TorchTitan debug shape, so a future reintroduction of getitem sibling recovery has to handle the graph that exposed the bug. Also allow AutoParallel generated forward wrappers to accept kwargs by flattening (args, kwargs) when positional flattening does not match the traced input arity. TorchTitan GraphTrainer can pass model inputs by keyword, so the generated wrapper needs to preserve that call shape while keeping the positional-only path unchanged. stack-info: PR: #451, branch: sanketpurandare/stack/7
ed31dca to
68e6513
Compare
xmfan
approved these changes
May 8, 2026
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.
Stacked PRs:
Revert getitem sibling clustering and support kwargs inputs
Revert the graph clustering behavior introduced by 51f2f67 because the bridge-group recovery can reuse an already cluster-linked node as the root of another cluster group. The sharding optimizer treats cluster-linked nodes as not owning PuLP variables, so later flow constraints can resolve a linked key through cluster_links to a root key that was never materialized in pulp_variables. DeepSeek V3 placement then fails before solving with KeyError on the resolved cluster key.
Keep the later DeepSeek V3 clustering coverage, but remove the getitem-specific expectations that depended on the reverted bridge-group behavior. Make both the DS3 local_map example and DS3 clustering coverage use the TorchTitan debug shape, so a future reintroduction of getitem sibling recovery has to handle the graph that exposed the bug.
Also allow AutoParallel generated forward wrappers to accept kwargs by flattening (args, kwargs) when positional flattening does not match the traced input arity. TorchTitan GraphTrainer can pass model inputs by keyword, so the generated wrapper needs to preserve that call shape while keeping the positional-only path unchanged.