torch.accelerator.set_device_idx#
- torch.accelerator.set_device_idx(device, /)[source]#
 (Deprecated) Set the current device index to a given device.
- Parameters
 device (
torch.device, str, int) – a given device that must match the current accelerator device type.
Warning
torch.accelerator.set_device_idx()is deprecated in favor oftorch.accelerator.set_device_index()and will be removed in a future PyTorch release.