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

fix new dygraph record event #41715

Merged

Conversation

rainyfly
Copy link
Contributor

@rainyfly rainyfly commented Apr 12, 2022

PR types

Others

PR changes

Others

Describe

  1. 将新动态图中对Op内部子过程的打点类型更新为OperatorInner,使得统计表单能正常识别Op。

@paddle-bot-old paddle-bot-old bot added contributor External developers status: proposed labels Apr 12, 2022
@paddle-bot-old
Copy link

你的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.

liutiexing
liutiexing previously approved these changes Apr 12, 2022
@@ -2481,7 +2481,7 @@ static std::string GenerateGradNodeHeaderContents(
"%s\n"
" SetIsTensorWrappersCleared(true);\n"
" }\n"
" std::string name() override { return \" GradNode%s \"; } \n "
Copy link
Contributor

@jim19930609 jim19930609 Apr 13, 2022

Choose a reason for hiding this comment

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

  1. "name()" returns the class name, you should change the class name as well.
  2. Per coding style, better named as "GradNode%sMid" or so.

Copy link
Contributor Author

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"
Copy link
Contributor

Choose a reason for hiding this comment

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

Ditto

Copy link
Contributor Author

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",
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@liutiexing liutiexing closed this Apr 13, 2022
@liutiexing liutiexing reopened this Apr 13, 2022
@liutiexing liutiexing merged commit ca4aea2 into PaddlePaddle:develop Apr 13, 2022
rainyfly added a commit to rainyfly/Paddle that referenced this pull request Apr 13, 2022
* fix new dygraph record event

* refine name

* fix

* fix

* fix according to review
XiaoguangHu01 pushed a commit that referenced this pull request Apr 14, 2022
* fix new dygraph record event

* refine name

* fix

* fix

* fix according to review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants