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

reduce performance influence by RecordEvent in Python #41822

Conversation

rainyfly
Copy link
Contributor

PR types

Performance optimization

PR changes

Others

Describe

测试发现,python层的RecordEvent在空转情况下,由于使用pybind对C++层的RecordEvent进行了频繁的创建对象,造成了一定的开销。现通过在Python层来加入Flag判断profiler功能是否开启,没开启的话python层的RecordEvent只在Python层空转。

@paddle-bot-old paddle-bot-old bot added contributor External developers status: proposed labels Apr 14, 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 merged commit d3f95e5 into PaddlePaddle:develop Apr 19, 2022
rainyfly added a commit to rainyfly/Paddle that referenced this pull request Apr 19, 2022
…1822)

* reduce performance influence

* add unit test

* fix
XiaoguangHu01 pushed a commit that referenced this pull request Apr 20, 2022
* fix divide zero error when cpu only (#41794)

* reduce performance influence by RecordEvent in Python (#41822)

* reduce performance influence

* add unit test

* fix

* Rebase for profiler statistic ratio (#41939)

* fix according to suggestion

* add kernel summary

* improve coverage
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.

2 participants