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]Support PassStopGradients mechanism and Set stop_gradient as True #57255

Merged
merged 7 commits into from
Sep 15, 2023

Conversation

Aurelius84
Copy link
Contributor

@Aurelius84 Aurelius84 commented Sep 13, 2023

PR types

Others

PR changes

Others

Description

Pcard-67164

对于一个Op,只要它其中一个输入的stop_gradient = False,则其输出的stop_gradient 就应该为 False.

TODO: 是否需要特殊处理一批本身无梯度定义的输出,比如Index_xx类的算子,其返回的index本身是没有梯度的。

@paddle-bot
Copy link

paddle-bot bot commented Sep 13, 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.

@Aurelius84 Aurelius84 changed the title [PIR]Set stop_gradient as True and is_persistable as False [PIR]Support PassStopGradients mechanism and Set stop_gradient as True Sep 13, 2023
YuanRisheng
YuanRisheng previously approved these changes Sep 13, 2023
cyber-pioneer
cyber-pioneer previously approved these changes Sep 13, 2023
YuanRisheng
YuanRisheng previously approved these changes Sep 14, 2023
@Aurelius84 Aurelius84 merged commit db55729 into PaddlePaddle:develop Sep 15, 2023
27 checks passed
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
PaddlePaddle#57255)

* [PIR]Set stop_gradient as True and is_persistable as False

* add PassStopGradients for build op

* fix unittest

* fix lint

* fix uint32_t

* fix ut
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