torch.xpu.current_device torch.xpu.current_device() Return the index of a currently selected device. Return type: int