-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
【static】modify backward prune logic for EmptygradOpMaker #53746
Conversation
… silu_double_grad
… silu_double_grad
你的PR提交成功,感谢你对开源项目的贡献! |
❌ The PR is not created using PR's template. You can refer to this Demo. |
增加代码生成逻辑对EmptyGradOpMaker的适配 |
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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个LOG级别再降一些把,3 有点高,容易影响到其他地方的调试
There was a problem hiding this comment.
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
{% elif "forward" in op %} | ||
{% else %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的 else 是不忘删了?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
下面还有emptyGradOpMaker的生成分支
PR types
Bug fixes
PR changes
Others
Description
pcard-66975
修复静态图 EmptyGradMaker(表示没有反向定义,如fill)与Nullptr(表示未实现,如sigmoid四阶)语义问题,backward逻辑中只剪枝反向是 EmptyGradMaker的op, 反向是nullptr的op将在get_grad_op_desc函数中抛出异常
补充composite_double_grad的approve 规则