torch.accelerator.is_available
- torch.accelerator.is_available()
Check if the current accelerator is available at runtime: it was built, all the required drivers are available and at least one device is visible. See accelerator for details.
- Returns:
A boolean indicating if there is an available accelerator.
- Return type: