[Auto Parallel] Add spmd_rule about sharding on the same tensor dim by many mesh dim for reshape#74352
Merged
zhiqiu merged 7 commits intoPaddlePaddle:developfrom Aug 12, 2025
Merged
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
512ab0f to
e3a415f
Compare
e3a415f to
096843e
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #74352 +/- ##
==========================================
Coverage ? 95.15%
==========================================
Files ? 3
Lines ? 165
Branches ? 0
==========================================
Hits ? 157
Misses ? 8
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
463d98f to
92c910e
Compare
liufengwei0103
approved these changes
Aug 11, 2025
Contributor
Author
|
/re-run all-failed |
From00
previously approved these changes
Aug 11, 2025
Contributor
Author
|
/re-run all-failed |
zhiqiu
approved these changes
Aug 12, 2025
maxiaolong001
pushed a commit
to maxiaolong001/Paddle
that referenced
this pull request
Aug 12, 2025
…y many mesh dim for reshape (PaddlePaddle#74352) * Add spmd_rule about sharding on the same tensor dim by many mesh dim for reshape * Fix order * refine code && tests case * fix typos * fix typos * Fix paddle::get usage
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.
PR Category
Auto Parallel
PR Types
New features
Description
目前在合并的时候,是把最左边的相邻切分合并到第一个维度进行切分,如果第一个维度不够切,就后续就进行复制,现在的处理是遇到输入切多刀的时候,不够切对应 mesh shape 的乘积,就整个维度的切分不保留,进行复制,就算够切多刀其中的一个维度,{{0},{1,2}} 的时候, 0,1 够切最左边的维度,0,1,2 切不了,现在就会是 {{0}, {}}。
拆分和合并的逻辑相同,都是在多刀在最左边的维度,其余复制,还需要考虑 split 切成的维度够不够切和是否能整除。