-
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
[XPU] fix recompute not support bug on xpu #54367
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -224,6 +224,8 @@ def _recompute_without_reentrant( | |||
cur_device = paddle.get_device() | |||
if 'gpu:' in cur_device: | |||
fw_cuda_rng_state = paddle.get_cuda_rng_state() | |||
elif 'xpu:' in cur_device: | |||
fw_cuda_rng_state = paddle.get_rng_state() |
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.
需要像下面custom device一样加上cur_device
参数么
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.
试了,不需要
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.
get_rng_state()不传参则里面自动获取device信息
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
你的PR已合入Paddle库,请关注后续测试结果。 |
PR types
Bug fixes
PR changes
Others
Description
fix recompute not support bug on xpu