Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Auto Parallel] Add a case when the target shape is 1 in reshape spmd rule. #63681

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

pkuzyc
Copy link
Contributor

@pkuzyc pkuzyc commented Apr 19, 2024

PR Category

Auto Parallel

PR Types

Bug fixes

Description

Pcard-76459
Cover the following case in reshape spmd rule:
shape: [1, 512, 4096] --> [1, 2, 256, 4096],
input dims_mapping: [0, 1, -1]
expected output dims_mapping: [0, 1, -1, -1] (not [-1, 1, -1,-1])

In this case, the dim0 in target shape is 1 and it is from dim0 in source shape. make the dim0's transformation be InputDim rather than Singleton so that the sharding status can be propagated.

Copy link

paddle-bot bot commented Apr 19, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhiqiu zhiqiu merged commit d725a5e into PaddlePaddle:develop Apr 19, 2024
29 of 30 checks passed
@pkuzyc pkuzyc deleted the fix_reshape_spmd branch May 20, 2024 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants