fix the state_dict bug for the xpu (#29888)

fix the state_dict bug for the xpu
revert-31562-mean
wawltor 4 years ago committed by GitHub
parent 121658d251
commit 587b67ef62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1274,6 +1274,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())

Loading…
Cancel
Save