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

Fix dtensor_to_local backward bugs #71232

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

From00
Copy link
Contributor

@From00 From00 commented Feb 21, 2025

PR Category

Auto Parallel

PR Types

Bug fixes

Description

修复dtensor_to_local反向切分标记问题。在之前的实现中,dtensor_to_local反向输出梯度的切分状态与前向的对应输入相同,这在很多场景下是不成立的,例如常见的模型并行场景:

x: Shard(1)
y: Shard(0)

z = matmul(x, y)

x_grad: Partial(sum)
y_grad: Partial(sum)

本PR修改dtensor_to_local实现,允许用户手动标记梯度的切分状态。

Pcard-76459

Copy link

paddle-bot bot commented Feb 21, 2025

你的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.

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.

1 participant