I am implementing a simple algorithm with PyTorch on Ubuntu. Two times already my NVIDIA drivers got somehow corrupted, such that running an algorithm produces this traceback:
Traceback (most recent call last): File "module.py", line 212, in <module> inputs_tensor = torch.tensor(inputs_train).to(device) File "/home/user/.venv/lib/python3.8/site-packages/torch/cuda/__init__.py", line 172, in _lazy_init torch._C._cuda_init() RuntimeError: No CUDA GPUs are available I reinstalled drivers two times, yet in a couple of reboots they get corrupted again.
$ nvidia-smi NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running. $ grep "X Driver" /var/log/Xorg.0.log [ 43.342] (II) NVIDIA dlloader X Driver 440.100 Fri May 29 08:21:27 UTC 202 Reset to default