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