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

【static】modify backward prune logic for EmptygradOpMaker #53746

Merged
merged 31 commits into from
May 16, 2023

Conversation

xiaoguoguo626807
Copy link
Contributor

@xiaoguoguo626807 xiaoguoguo626807 commented May 12, 2023

PR types

Bug fixes

PR changes

Others

Description

pcard-66975
修复静态图 EmptyGradMaker(表示没有反向定义,如fill)与Nullptr(表示未实现,如sigmoid四阶)语义问题,backward逻辑中只剪枝反向是 EmptyGradMaker的op, 反向是nullptr的op将在get_grad_op_desc函数中抛出异常
image

补充composite_double_grad的approve 规则

@paddle-bot
Copy link

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

@paddle-bot
Copy link

paddle-bot bot commented May 12, 2023

❌ The PR is not created using PR's template. You can refer to this Demo.
Please use PR's template, it helps save our maintainers' time so that more developers get helped.

@xiaoguoguo626807 xiaoguoguo626807 changed the title modify gradOpMaker 【static】modify backward prune logic for EmptygradOpMaker May 12, 2023
@cxxly
Copy link
Contributor

cxxly commented May 12, 2023

增加代码生成逻辑对EmptyGradOpMaker的适配

Comment on lines +1363 to +1369
VLOG(3) << "Prim Flag Close: Runing origin grad fun for "
<< op_desc.Type();
grad_op_descs = grad_op_maker(
op_desc, no_grad_set, &grad_to_var, grad_sub_block);
} else {
VLOG(3) << "Prim Flag Close: Runing composite grad fun for "
<< op_desc.Type();
Copy link
Contributor

Choose a reason for hiding this comment

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

这个LOG级别再降一些把,3 有点高,容易影响到其他地方的调试

Copy link
Contributor Author

@xiaoguoguo626807 xiaoguoguo626807 May 16, 2023

Choose a reason for hiding this comment

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

next pr will modify #53874

Comment on lines +480 to 481
{% elif "forward" in op %}
{% else %}
Copy link
Contributor

Choose a reason for hiding this comment

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

这里的 else 是不忘删了?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

下面还有emptyGradOpMaker的生成分支

@xiaoguoguo626807 xiaoguoguo626807 merged commit 69161a9 into PaddlePaddle:develop May 16, 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.

4 participants