torch.accelerator.current_device_index
- torch.accelerator.current_device_index()
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.