在安装Tensorflow期间,cuda内核不匹配

时间:2017-02-17 02:22:00

标签: python cuda tensorflow gpu cudnn

我按照official page和“验证您的安装”步骤的说明安装Tensorflow。

enter image description here

>>> sess = tf.Session()
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
E tensorflow/stream_executor/cuda/cuda_driver.cc:509] failed call to cuInit: CUDA_ERROR_NO_DEVICE
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:158] retrieving CUDA diagnostic information for host: Shu
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:165] hostname: Shu
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:189] libcuda reported version is: 375.26.0
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:363] driver version file contents: """NVRM version: NVIDIA UNIX x86_64 Kernel Module  367.57  Mon Oct  3 20:37:01 PDT 2016
GCC version:  gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 
"""
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:193] kernel reported version is: 367.57.0
E tensorflow/stream_executor/cuda/cuda_diagnostics.cc:303] kernel version 367.57.0 does not match DSO version 375.26.0 -- cannot find working devices in this configuration

这是我尝试开始会话时得到的。我不太明白发生了什么。请帮忙。谢谢!

1 个答案:

答案 0 :(得分:4)

我不相信这个错误与Tensorflow有关。运行 nvidia-smi 时会出现同样的错误。

安装CUDA工具包后,您是否有可能更新了NVIDIA GPU驱动程序?看起来工具包期望驱动程序版本为367.57,而您运行的是更新版本,375.26。

要快速检查,请尝试恢复到NVIDIA驱动程序版本367.57;您可以从系统设置>执行此操作软件和更新>其他驱动程序

一旦确认预期驱动程序版本不匹配就是问题,您可以使用驱动程序版本367.57,或者卸载CUDA Toolkit和cuDNN,将驱动程序更新到375.26,然后重新安装CUDA Toolkit和cuDNN。 / p>