評價此頁

torch.xpu.set_device#

torch.xpu.set_device(device)[原始碼]#

設定當前裝置。

引數

device (torch.deviceintstr) – 選定的裝置。如果此引數為負數,則此函式無效。