CUDA error: all CUDA-capable devices are busy or unavailable
我的系统ubuntu20.4,显卡3080,驱动460,cuda11.0,安装gpu版pytorch,测试后显示:RuntimeError:CUDA error: all CUDA-capable devices are busy or unavailable.
解决方法:nvidia官网下载最新的适配自己显卡的驱动,
安装教程:
https://blog.csdn.net/qq_40773561/article/details/115093692
安装中的选项:
1.The distribution-provided pre-install script failed! Are you sure you want to continue?
“Yes”
2.Would you like to register the kernel module souces with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later?
“No”
3.Nvidia’s 32-bit compatibility libraries?
“No”
4.Would you like to run the nvidia-xconfigutility to automatically update your x configuration so that the NVIDIA x driver will be used when you restart x? Any pre-existing x confile will be backed up.
“Yes”
安装完成后,仍会回到x-server界面,此时挂载NVIDIA驱动:
modprobe nvidia
然后返回图形界面,安装cuda,cudnn