torch.accelerator.current_accelerator
- torch.accelerator.current_accelerator(check_available=False)
Return the device of the accelerator available at compilation time. If no accelerator were available at compilation time, returns None. See accelerator for details.