torch.accelerator.current_device_idx
- torch.accelerator.current_device_idx()
(Deprecated) Return the index of a currently selected device for the current accelerator.
- Returns:
the index of a currently selected device.
- Return type:
(Deprecated) Return the index of a currently selected device for the current accelerator.
the index of a currently selected device.