Shortcuts

torch.xpu.current_device

torch.xpu.current_device()[源代码]

返回当前选定设备的索引。

Return type

int