未验证 提交 9859afa9 编写于 作者: W wawltor 提交者: GitHub

fix the state_dict bug for the xpu (#30008)

上级 faf2bb39
......@@ -1262,6 +1262,10 @@ class Layer(core.Layer):
place = core.CPUPlace()
elif p.is_cuda_pinned_place():
place = core.CUDAPinnedPlace()
elif p.is_xpu_place():
p = core.Place()
p.set_place(t._place())
place = core.XPUPlace(p.xpu_device_id())
else:
p = core.Place()
p.set_place(t._place())
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册