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

[Inference] Optimize memory_optimize pass #55081

Merged
merged 3 commits into from
Jul 7, 2023

Conversation

iamsonderr
Copy link
Contributor

@iamsonderr iamsonderr commented Jul 3, 2023

PR types

Others

PR changes

Others

Description

P-card-71501
删除了禁止inplace op的输入输出var的函数DelInplaceOpFromPlan和无用函数UpdateOpDescsByReuse,允许inplace op的输入输出var参与显存复用,扩大显存复用的变量范围。

有关此次pr的时间线:

  1. [Inference] Optimize memory_optimize pass. #48476 中取消了通过调用UpdateOpDescsByReuse传递显存复用结果
  2. memorty_optimize remove inplace op #49431 中,由于调用tensor的显存复用函数SharedBufferWith是在op->run之前,开启inpalace op输入输出var的显存复用可能会出现问题,禁用了inpalace op的输入输出var的显存复用。
  3. [Paddle Inference] Decrease peak memory #53930 中,tensor的显存复用函数SharedBufferWith函数已更改为在op->run之后调,可以允许inpalace op的输入输出var的显存复用。

@paddle-bot
Copy link

paddle-bot bot commented Jul 3, 2023

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

@CLAassistant
Copy link

CLAassistant commented Jul 3, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@jiweibo jiweibo left a comment

Choose a reason for hiding this comment

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

LGTM

@jiweibo jiweibo merged commit 0685b3e into PaddlePaddle:develop Jul 7, 2023
@iamsonderr iamsonderr deleted the remove_inplace branch July 7, 2023 02:29
@jiweibo jiweibo changed the title [Paddle Inference]commit [Inference] Optimize memory_optimize pass Jul 7, 2023
cqulilujia pushed a commit to cqulilujia/Paddle that referenced this pull request Jul 24, 2023
…addle#55081)

* commit

* del inplace op in memory_optimize_pass.cc

* check code style
yuanlehome added a commit that referenced this pull request Oct 8, 2023
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.

3 participants