Skip to content

[DTensor] insert Replicate at the begining for matmul single dim#172150

Closed
weifengpy wants to merge 20 commits intogh/weifengpy/47/basefrom
gh/weifengpy/47/head
Closed

[DTensor] insert Replicate at the begining for matmul single dim#172150
weifengpy wants to merge 20 commits intogh/weifengpy/47/basefrom
gh/weifengpy/47/head

Conversation

@weifengpy
Copy link
Copy Markdown
Contributor

@weifengpy weifengpy commented Jan 10, 2026

Stack from ghstack (oldest at bottom):

gen_einsum_strategies inserts replicate strategy first:

placement_list: list[Placement] = [Replicate()] * (len(input_dims) + 1)
strategies_over_one_mesh_dim.append(placement_list)

_select_min_cost_strategy choose Replicate at equal cost

This PR makes sure consistent matmul results after switching to single dim strategy #170359

[ghstack-poisoned]
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Jan 10, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/172150

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 3 New Failures

As of commit 335aedf with merge base 9f5d6ec (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

weifengpy added a commit that referenced this pull request Jan 10, 2026
ghstack-source-id: ce85ae5
Pull Request resolved: #172150
[ghstack-poisoned]
weifengpy added a commit that referenced this pull request Jan 12, 2026
ghstack-source-id: 33fad11
Pull Request resolved: #172150
@pytorch-bot pytorch-bot Bot added the release notes: distributed (dtensor) release notes category label Jan 12, 2026
[ghstack-poisoned]
weifengpy added a commit that referenced this pull request Jan 12, 2026
ghstack-source-id: d0a84f6
Pull Request resolved: #172150
[ghstack-poisoned]
weifengpy added a commit that referenced this pull request Jan 12, 2026
ghstack-source-id: d0a84f6
Pull Request resolved: #172150
[ghstack-poisoned]
weifengpy added a commit that referenced this pull request Jan 12, 2026
ghstack-source-id: ca976b1
Pull Request resolved: #172150
[ghstack-poisoned]
weifengpy added a commit that referenced this pull request Jan 12, 2026
ghstack-source-id: 2058d49
Pull Request resolved: #172150
[ghstack-poisoned]
weifengpy added a commit that referenced this pull request Jan 12, 2026
ghstack-source-id: 9575242
Pull Request resolved: #172150
[ghstack-poisoned]
weifengpy added a commit that referenced this pull request Jan 12, 2026
ghstack-source-id: 5f229fb
Pull Request resolved: #172150
[ghstack-poisoned]
weifengpy added a commit that referenced this pull request Jan 12, 2026
ghstack-source-id: 89e6922
Pull Request resolved: #172150
[ghstack-poisoned]
weifengpy added a commit that referenced this pull request Jan 12, 2026
ghstack-source-id: 61f0cee
Pull Request resolved: #172150
[ghstack-poisoned]
weifengpy added a commit that referenced this pull request Jan 12, 2026
ghstack-source-id: 7eed38e
Pull Request resolved: #172150
[ghstack-poisoned]
weifengpy added a commit that referenced this pull request Jan 12, 2026
ghstack-source-id: 324dfa9
Pull Request resolved: #172150
[ghstack-poisoned]
…le dim"


gen_einsum_strategies inserts replicate strategy first:
https://github.com/pytorch/pytorch/blob/74b6a0efa359722def4b585d9d91fbc3a4bfa530/torch/distributed/tensor/_ops/_einsum_strategy.py#L121-L122

_select_min_cost_strategy choose Replicate at equal cost

This PR makes sure consistent matmul results after switching to single dim strategy #170359

[ghstack-poisoned]
weifengpy added a commit that referenced this pull request Jan 13, 2026
strategy

ghstack-source-id: 824df02
Pull Request resolved: #172150
…le dim"


gen_einsum_strategies inserts replicate strategy first:
https://github.com/pytorch/pytorch/blob/74b6a0efa359722def4b585d9d91fbc3a4bfa530/torch/distributed/tensor/_ops/_einsum_strategy.py#L121-L122

_select_min_cost_strategy choose Replicate at equal cost

This PR makes sure consistent matmul results after switching to single dim strategy #170359

[ghstack-poisoned]
weifengpy added a commit that referenced this pull request Jan 13, 2026
strategy

ghstack-source-id: 077fc01
Pull Request resolved: #172150
…le dim"


gen_einsum_strategies inserts replicate strategy first:
https://github.com/pytorch/pytorch/blob/74b6a0efa359722def4b585d9d91fbc3a4bfa530/torch/distributed/tensor/_ops/_einsum_strategy.py#L121-L122

_select_min_cost_strategy choose Replicate at equal cost

This PR makes sure consistent matmul results after switching to single dim strategy #170359

[ghstack-poisoned]
@weifengpy
Copy link
Copy Markdown
Contributor Author

@pytorchmergebot merge

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jan 13, 2026
@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

…le dim"


gen_einsum_strategies inserts replicate strategy first:
https://github.com/pytorch/pytorch/blob/74b6a0efa359722def4b585d9d91fbc3a4bfa530/torch/distributed/tensor/_ops/_einsum_strategy.py#L121-L122

_select_min_cost_strategy choose Replicate at equal cost

This PR makes sure consistent matmul results after switching to single dim strategy #170359

[ghstack-poisoned]
…le dim"


gen_einsum_strategies inserts replicate strategy first:
https://github.com/pytorch/pytorch/blob/74b6a0efa359722def4b585d9d91fbc3a4bfa530/torch/distributed/tensor/_ops/_einsum_strategy.py#L121-L122

_select_min_cost_strategy choose Replicate at equal cost

This PR makes sure consistent matmul results after switching to single dim strategy #170359

[ghstack-poisoned]
@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge failed

Reason: New commits were pushed while merging. Please rerun the merge command.

Details for Dev Infra team Raised by workflow job

@weifengpy
Copy link
Copy Markdown
Contributor Author

@pytorchmergebot merge -f "unrelated CI errors"

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

mattteochen pushed a commit to mattteochen/pytorch that referenced this pull request Jan 15, 2026
…orch#172150)

gen_einsum_strategies inserts replicate strategy first:
https://github.com/pytorch/pytorch/blob/74b6a0efa359722def4b585d9d91fbc3a4bfa530/torch/distributed/tensor/_ops/_einsum_strategy.py#L121-L122

_select_min_cost_strategy choose Replicate at equal cost

This PR makes sure consistent matmul results after switching to single dim strategy pytorch#170359
Pull Request resolved: pytorch#172150
Approved by: https://github.com/wconstab
SergeyTyshkevich pushed a commit to SergeyTyshkevich/chart2 that referenced this pull request Jan 19, 2026
SergeyTyshkevich pushed a commit to SergeyTyshkevich/chart2 that referenced this pull request Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request Merged release notes: distributed (dtensor) release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants