NVIDIA: "RuntimeError: no hay GPU CUDA disponibles"

NVIDIA: "RuntimeError: no hay GPU CUDA disponibles"

Estoy implementando un algoritmo simple con PyTorch en Ubuntu. Ya dos veces mis controladores NVIDIA se corrompieron de alguna manera, de modo que ejecutar un algoritmo produce este rastreo:

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

Reinstalé los controladores dos veces, pero en un par de reinicios se corrompen nuevamente.

$ 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

información relacionada