评价此页

device#

class torch.xpu.device(device)[source]#

更改选定设备的上下文管理器。

参数

device (torch.device or int or str) – device index to select. It’s a no-op if this argument is a negative integer or None.