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

[PIR] Add yield instruction #64234

Merged
merged 5 commits into from May 13, 2024

Conversation

huangjiyi
Copy link
Member

@huangjiyi huangjiyi commented May 12, 2024

PR Category

Others

PR Types

Others

Description

  • 之前 YieldOp 的执行是通过在包含 YieldOp 的 If, While 等 Op 的 Instruction 中进行变量的 Copy 过程实现的,导致 YieldOp 的输入变量需要跳过 GC 以避免在 Copy 之前被 GC 掉,但是这引发了内存泄露问题,详见 [PIR] Fix memory leak when training models containing if control flow #64130 ,为了彻底解决该问题,本 PR 为 YieldOp 实现了 YieldInstruction,使 YieldOp 的输入变量自动加入到 Interpreter 的 GC 机制

Copy link

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

@paddle-bot paddle-bot bot added the contributor External developers label May 12, 2024
@chen2016013 chen2016013 merged commit b26d872 into PaddlePaddle:develop May 13, 2024
30 of 31 checks passed
co63oc pushed a commit to co63oc/Paddle that referenced this pull request May 13, 2024
* add yield_instruction

* rm CopyBranchOutput

* fix while_instruction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants