评价此页

torch.accelerator.current_device_index#

torch.accelerator.current_device_index()[源代码]#

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

返回

当前选定设备的索引。

返回类型

int