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

[CustomOp] Add context pool unittests #41085

Merged
merged 9 commits into from
Apr 12, 2022

Conversation

chenwhql
Copy link
Contributor

@chenwhql chenwhql commented Mar 29, 2022

PR types

New features

PR changes

Others

Describe

[CustomOp] Add context pool unittests

部分高阶用户需要在自定义算子中获取内部DeviceContext,使用内部Context的一些handle,确保自定义算子存储管理与框架一致,避免自定义算子内频繁发生内存申请释放操作从而影响性能,因此本PR将DeviceContextPool作为experimental API暴露到自定义算子体系中

相关前序PR:#40635

不过2.3版本开始,更推荐用对外包装好的C++运算API组合实现算子,写法更简单,同时也不会有以上问题

@paddle-bot-old
Copy link

paddle-bot-old bot commented Apr 6, 2022

Sorry to inform you that d622be8's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

Copy link
Contributor

@XieYunshen XieYunshen left a comment

Choose a reason for hiding this comment

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

LGTM
设置单测时间

Copy link
Contributor

@Aurelius84 Aurelius84 left a comment

Choose a reason for hiding this comment

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

LGTM

@chenwhql chenwhql merged commit 59ec959 into PaddlePaddle:develop Apr 12, 2022
chenwhql added a commit to chenwhql/Paddle that referenced this pull request Apr 13, 2022
* add context pool unittests

* fix timeout

* polish details

* change option pos

* add dll decl for wndows

* fix pre-commit error

* move dll_decl and export DeviceContext

* replace lost dll_decl.h
chenwhql added a commit to chenwhql/Paddle that referenced this pull request Apr 14, 2022
* add context pool unittests

* fix timeout

* polish details

* change option pos

* add dll decl for wndows

* fix pre-commit error

* move dll_decl and export DeviceContext

* replace lost dll_decl.h
phlrain pushed a commit that referenced this pull request Apr 14, 2022
* add context pool unittests

* fix timeout

* polish details

* change option pos

* add dll decl for wndows

* fix pre-commit error

* move dll_decl and export DeviceContext

* replace lost dll_decl.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants