Skip to content

conduct stop_gradient for pylayer output when not_inplace#64567

Merged
wanghuancoder merged 1 commit into
PaddlePaddle:developfrom
wanghuancoder:conduct_stopgrad
May 24, 2024
Merged

conduct stop_gradient for pylayer output when not_inplace#64567
wanghuancoder merged 1 commit into
PaddlePaddle:developfrom
wanghuancoder:conduct_stopgrad

Conversation

@wanghuancoder
Copy link
Copy Markdown
Contributor

@wanghuancoder wanghuancoder commented May 24, 2024

PR Category

Execute Infrastructure

PR Types

Bug fixes

Description

PyLayer在input作为output时,会被认为inplace。如果需要不被inplace,需要标记mark_not_inplace。此时,PyLayer会复制一份input给output。复制时,需要同时复制stop_gradient。

Pcard-67164

@paddle-bot
Copy link
Copy Markdown

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

@wanghuancoder wanghuancoder merged commit 5b79bca into PaddlePaddle:develop May 24, 2024
chen2016013 pushed a commit to chen2016013/Paddle that referenced this pull request May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants