-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Add helper function in GradOpDescMakerBase. Make it easier to use. #4551
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
Add helper function in GradOpDescMakerBase. Make it easier to use. #4551
Conversation
paddle/framework/op_info.h
Outdated
| OpCreator creator_; | ||
| std::string grad_op_type_; | ||
| GradOpDescMakerBase* grad_op_maker_{nullptr}; | ||
| std::function<std::vector<OpDescBind>(const OpDescBind&)> grad_op_maker_; |
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.
grad_op_maker_ returns std::vector<OpDescBind>, while in BlockDescBind ops_ is std::deque<std::unique_ptr<OpDescBind>>. So when and how shall we convert OpDescBind to std::unique_ptr<OpDescBind>?
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.
Yes. You are right. grad_op_maker_ should return vector<unique_ptr<OpDescBind>>.
JiayiFeng
left a comment
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.
LGTM, thank you for updating the design doc!
No description provided.