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

cuda kernel doesn't match during installation of Tensorflow

我正在按照 official page 和 "Validate your installation" 的指示安装 Tensorflow。

>>> 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

这是我尝试开始会话时得到的结果。我不太明白这是怎么回事。请帮忙。谢谢!

我认为该错误与 Tensorflow 无关。你应该得到同样的错误 运行 nvidia-smi.

有没有可能您在安装 CUDA 工具包后更新了 NVIDIA GPU 驱动程序?看起来该工具包需要驱动程序版本 367.57,而您 运行 是更新的版本 375.26。

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

一旦确认预期驱动程序版本不匹配是问题所在,您可以继续使用驱动程序版本 367.57,或者 un-install CUDA 工具包和 cuDNN,将驱动程序更新到 375.26,然后 re-install CUDA 工具包和 cuDNN。