This is not repeatable behavior, but I have observed that sometimes after waking up from suspend, torch.cuda.is_available() returns false. If I run nvidia-smi, it detects all GPUs on the system. If I reboot, then torch.cuda.is_available() returns true again.
Is there any way to make torch detect cuda without rebooting?
Some details about the system:
- ubuntu 20.04
- cuda 10.2 (installed via conda)
- nvidia driver 450.66
- gpu is rtx 2080