Skip to content

[PIR slice]Change deep_copy to share_buffer in eager backward #72966

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

Merged
merged 2 commits into from
May 29, 2025

Conversation

changeyoung98
Copy link
Contributor

@changeyoung98 changeyoung98 commented May 27, 2025

PR Category

Execute Infrastructure

PR Types

Improvements

Description

pcard-67164
Change deep_copy to share_buffer in eager backward
对于索引体系中单Ellipsis,None,tuple()的getitem 反向计算,由于前向结果与前向输出share buffer且numel一致,因此反向梯度也是与初始梯度numel一致数值一致的tensor,可以不用再进行gpu拷贝构造,使用share buffer进行加速。
该pr可以使这几种情况的加速比从10+降至1以内。

Copy link

paddle-bot bot commented May 27, 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.

@changeyoung98 changeyoung98 merged commit ffd75d1 into PaddlePaddle:develop May 29, 2025
91 of 95 checks passed
@changeyoung98 changeyoung98 deleted the czy-slice branch May 29, 2025 06:05
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