-
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
fix new dygraph record event #41715
fix new dygraph record event #41715
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -2481,7 +2481,7 @@ static std::string GenerateGradNodeHeaderContents( | |||
"%s\n" | |||
" SetIsTensorWrappersCleared(true);\n" | |||
" }\n" | |||
" std::string name() override { return \" GradNode%s \"; } \n " |
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.
- "name()" returns the class name, you should change the class name as well.
- Per coding style, better named as "GradNode%sMid" or so.
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.
Done
@@ -136,7 +136,7 @@ def RemoveConstAndReference(string): | |||
|
|||
|
|||
def GetGradNodeName(string): | |||
return f"FinalGradNode{string}" | |||
return f"{string}_final_grad_node" |
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.
Ditto
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.
Done
@@ -643,7 +643,7 @@ std::vector<paddle::experimental::Tensor> RunBackward( | |||
VLOG(6) << "Running GradNode:" << node->name(); | |||
|
|||
paddle::platform::RecordEvent node_record_event( | |||
std::string(typeid(*node).name()) + " grad_node", |
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.
Some performance analysis script rely on this " grad_node" suffix to identify GradNode runtime. Please keep this suffix unchanged.
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.
Done
* fix new dygraph record event * refine name * fix * fix * fix according to review
PR types
Others
PR changes
Others
Describe