torch.accelerator.current_device_index¶ torch.accelerator.current_device_index()[源][源]¶ 返回当前加速器当前选定设备的索引。 返回 当前选定设备的索引。 返回类型 int