-
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 RunWithExternalStream contex switch bug #57629
fix RunWithExternalStream contex switch bug #57629
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -71,6 +71,8 @@ class PADDLE_API DeviceContextPool { | |||
|
|||
phi::DeviceContext* GetMutable(const Place& place); | |||
|
|||
void Update(const Place& place); |
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.
如果确实需要增加的话,建议再斟酌一下接口名,仅看代码Update不太清楚是更新了什么,可以具体一点,我理解这里应该是底层的DeviceContext更新了,但是没有同步到API层对吧,所以是不是SyncDeviceContextPointer之类的更准确,仅供参考,根据实际语义命名即可
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.
已修改
* fix RunWithExternalStream contex switch bug
* fix RunWithExternalStream contex switch bug
* fix RunWithExternalStream contex switch bug
PR types
Others
PR changes
Others
Description
Pcard-71501
修复bug:
RunWithExternalStream接口在调用的时候,新建的DeviceContext没有更新在paddle::experimental::DeviceContextPool中,导致在调用empty创建tensor的时候发生core dump。