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] Throw error when OP has no grad OP #63914

Merged

Conversation

SigureMo
Copy link
Member

@SigureMo SigureMo commented Apr 26, 2024

PR Category

Execute Infrastructure

PR Types

Improvements

Description

在添加反向 OP 时,如果找不到 grad OP,应该直接报错,而不是报 warning

closes #63908

PCard-66972

Copy link

paddle-bot bot commented Apr 26, 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.

@SigureMo SigureMo changed the title [WIP][PIR] Throw error when OP has no grad OP [PIR] Throw error when OP has no grad OP Apr 26, 2024
@@ -55,6 +55,78 @@
"""
__all__ = ['grad', 'calc_gradient', 'calc_gradient_helper']

# TODO: Consider a better way to mark these ops has no grad op.
Copy link
Contributor

Choose a reason for hiding this comment

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

这个list 加到backward_utils.py里面吧

Copy link
Member Author

Choose a reason for hiding this comment

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

嗯嗯,移好了~

Copy link
Contributor

@xiaoguoguo626807 xiaoguoguo626807 left a comment

Choose a reason for hiding this comment

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

LGTM

@SigureMo SigureMo merged commit 7f38646 into PaddlePaddle:develop Apr 28, 2024
29 of 30 checks passed
@SigureMo SigureMo deleted the pir/throw-error-when-op-has-no-grad-op branch April 28, 2024 10:23
iosmers pushed a commit to iosmers/Paddle that referenced this pull request Apr 28, 2024
runzhech pushed a commit to runzhech/Paddle that referenced this pull request Apr 30, 2024
runzhech pushed a commit to runzhech/Paddle that referenced this pull request Apr 30, 2024
co63oc pushed a commit to co63oc/Paddle that referenced this pull request May 6, 2024
hxzd5568 pushed a commit to hxzd5568/Paddle that referenced this pull request May 8, 2024
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