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 device id issue for xpu eager mode #48076

Merged
merged 3 commits into from
Nov 18, 2022

Conversation

XiaociZhang
Copy link
Contributor

@XiaociZhang XiaociZhang commented Nov 17, 2022

PR types

Bug fixes

PR changes

Others

Describe

xpu device id is not correctly set in eager mode, thus vars are on dev0 unless XPUDeviceGurad is called, leading to this error message for all nodes that devid != 0:
"NotImplementedError: (Unimplemented) Place Place(xpu:0) is not supported."

xpu device id is not correctly set in eager mode, thus vars are on dev0 unless
XPUDeviceGurad is called, leading to this error message for all node rank != 0:
"NotImplementedError: (Unimplemented) Place Place(xpu:0) is not supported."
@paddle-bot
Copy link

paddle-bot bot commented Nov 17, 2022

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

@paddle-bot paddle-bot bot added contributor External developers status: proposed labels Nov 17, 2022
@XiaociZhang XiaociZhang changed the title fix device id issue for xpu eager fix device id issue for xpu eager mode Nov 17, 2022
ykkk2333
ykkk2333 previously approved these changes Nov 17, 2022
Copy link
Contributor

@ykkk2333 ykkk2333 left a comment

Choose a reason for hiding this comment

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

LGTM

if (paddle::platform::is_xpu_place(place)) {{
#if defined(PADDLE_WITH_XPU)
phi::backends::xpu::SetXPUDeviceId(place.device);
VLOG(1) <<"CurrentDeviceId: " << phi::backends::xpu::GetXPUCurrentDeviceId() << " from " << (int)place.device;
Copy link
Contributor

Choose a reason for hiding this comment

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

VLOG级别为 1 有些高,建议和前面的VLOG级别保持一致

@XiaociZhang XiaociZhang requested review from zyfncg and ykkk2333 and removed request for zyfncg and ykkk2333 November 18, 2022 01:40
Copy link
Contributor

@zyfncg zyfncg 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

@ykkk2333 ykkk2333 left a comment

Choose a reason for hiding this comment

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

LGTM

@QingshuChen QingshuChen merged commit 3b18d96 into PaddlePaddle:develop Nov 18, 2022
@paddle-bot
Copy link

paddle-bot bot commented Nov 18, 2022

你的PR已合入Paddle库,请关注后续测试结果。
Your PR has been merged into the repository. An official integration test will be conducted later. Stay tuned.

@XiaociZhang XiaociZhang deleted the pgroup branch November 18, 2022 06:45
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.

4 participants