1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > 无法连接NVIDIA驱动:NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver

无法连接NVIDIA驱动:NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver

时间:2019-02-21 16:11:01

相关推荐

无法连接NVIDIA驱动:NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver

NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver

重启服务器之后就出现连接不上NVIDIA驱动的情况。这个时候tensorflow还是可以运行的,但只是在用cpu跑。安装gpu版的TensorFlow时,也显示已安装。

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.

1

我们在终端输入 nvcc -V 发现驱动也在。

这就很魔性了。。。查找了很多方法之后,发现下面这个最简便,只需要两步,而且还不用重启,哈哈。

step1:sudo apt-get install dkms

step2: sudo dkms install -m nvidia -v 390.59

再次输入nvidia-smi时,你熟悉的界面就会回来啦。

(虽然使用率显示为99%,但并不影响我们使用)

其中step2 中的410.79是NVIDIA的版本号,当你不知道的时候,进入/usr/src目录中,可以看到里面有nvidia文件夹,后缀就是其版本号

cd /usr/src

OK,到此我们就轻松愉快的解决了这个问题。(Yeah!)

另:怎么查看TensorFlow是gpu版本还是cpu版本

from tensorflow.python.client import device_lib

print(device_lib.list_local_devices())

---------------------

作者:W&J

来源:CSDN

原文:/hangzuxi8764/article/details/86572093

版权声明:本文为博主原创文章,转载请附上博文链接!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。