NVIDIA Cuda error "all CUDA-capable devices are busy or unavailable" on Linux server

Viewed 50

I am trying to install torch package and the verification code runs successfully as follows:

Results of import torch

I am trying to run the model, the output is the runtime error ("all CUDA-capable devices are busy or unavailable")

My setup is the following:

Ubuntu 18.04.6 LTS (GNU/Linux 5.4.0-122-generic x86_64)

enter image description here

I tried many solutions from the stack overflow, but it didn't work. I don't want to reboot every time it happens.

This is an example of code that may fail.

enter image description here

I don't know what is wrong. How does one use Pytorch (+ cuda) with an A100 GPU? If you have experience installing in a similar development environment, please give me some advice....

0 Answers
Related