Use device_name instead of device index to support other device (#3933)
Create tensor with device=Integer will always choose cuda as its
deivce for current pytorch version(2.1), other device should use
device={device}:{index}.
Change get_accelerator().current_device() to
get_accelerator().current_device_name() to support other devices.
Co-authored-by: NOlatunji Ruwase <olruwase@microsoft.com>
Showing
想要评论请 注册 或 登录