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 RunWithExternalStream contex switch bug #57629

Merged
merged 3 commits into from
Sep 25, 2023

Conversation

ming1753
Copy link
Contributor

PR types

Others

PR changes

Others

Description

Pcard-71501

修复bug:
RunWithExternalStream接口在调用的时候,新建的DeviceContext没有更新在paddle::experimental::DeviceContextPool中,导致在调用empty创建tensor的时候发生core dump。

@paddle-bot
Copy link

paddle-bot bot commented Sep 22, 2023

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

@@ -71,6 +71,8 @@ class PADDLE_API DeviceContextPool {

phi::DeviceContext* GetMutable(const Place& place);

void Update(const Place& place);
Copy link
Contributor

Choose a reason for hiding this comment

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

如果确实需要增加的话,建议再斟酌一下接口名,仅看代码Update不太清楚是更新了什么,可以具体一点,我理解这里应该是底层的DeviceContext更新了,但是没有同步到API层对吧,所以是不是SyncDeviceContextPointer之类的更准确,仅供参考,根据实际语义命名即可

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已修改

chenwhql
chenwhql previously approved these changes Sep 22, 2023
@Wangzheee Wangzheee merged commit 50bb3e1 into PaddlePaddle:develop Sep 25, 2023
27 of 28 checks passed
Frida-a pushed a commit to Frida-a/Paddle that referenced this pull request Oct 14, 2023
* fix RunWithExternalStream contex switch bug
jiahy0825 pushed a commit to jiahy0825/Paddle that referenced this pull request Oct 16, 2023
* fix RunWithExternalStream contex switch bug
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
* fix RunWithExternalStream contex switch bug
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