torch.accelerator.current_device_idx#
- torch.accelerator.current_device_idx()[原始碼]#
(已棄用) 返回當前為 accelerator 選擇的裝置的索引。
- 返回
當前選定裝置的索引。
- 返回型別
警告
torch.accelerator.current_device_idx()已棄用,推薦使用torch.accelerator.current_device_index(),並將在未來的 PyTorch 版本中移除。