torch.accelerator.current_device_idx#
- torch.accelerator.current_device_idx()[source]#
 (Deprecated) Return the index of a currently selected device for the current accelerator.
- Returns
 the index of a currently selected device.
- Return type
 
Warning
torch.accelerator.current_device_idx()is deprecated in favor oftorch.accelerator.current_device_index()and will be removed in a future PyTorch release.