torch.accelerator.current_device_idx¶
- torch.accelerator.current_device_idx()[source]¶
Return the index of a currently selected device for the current accelerator.
- Returns
the index of a currently selected device.
- Return type
Return the index of a currently selected device for the current accelerator.
the index of a currently selected device.