-
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
[Phi] Add phi device context pool #40635
[Phi] Add phi device context pool #40635
Conversation
Thanks for your contribution! |
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👍🏻
* in program running, so DeviceContextPool here can always access the correct | ||
* DeviceContext pointer. | ||
* | ||
* In order not to depend on the fluid's DeviceContextPool, |
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.
中间实现有所调整,这里注释也需要调整下,下个pr完善下
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
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 for const_cast
PR types
Performance optimization
PR changes
APIs
Describe
[Phi] Add phi device context pool
基于以下两个需求,在phi/api中添加DeviceContextPool:
性能变化:
_C_ops.final_state_diagonal
的百万次循环测试采样数据进行分析缩减50%耗时:0.15s(2.44%) - > 0.08s(1.22%)
本PR前:
本PR后:(耗时较少,主图上不再显示GetDeviceContextByBackend,以下为搜索找到的局部显示)
TODO:下一个PR再将DeviceContextPool关联到的自定义算子中