我已经使用CUDA和CuDNN安装了TensorFlow。
为什么我会运行会话我发现以下错误:
```
>>> sess = tf.Session()
E tensorflow/stream_executor/cuda/cuda_driver.cc:491] failed call to cuInit: CUDA_ERROR_INVALID_VALUE
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:153] retrieving CUDA diagnostic information for host: next-gpu1
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:160] hostname: next-gpu1
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:185] libcuda reported version is: 361.93.2
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:347] driver version file contents: """NVRM version: NVIDIA UNIX x86_64 Kernel Module 352.63 Sat Nov 7 21:25:42 PST 2015
GCC version: gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
"""
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:189] kernel reported version is: 352.63.0
E tensorflow/stream_executor/cuda/cuda_diagnostics.cc:296] kernel version 352.63.0 does not match DSO version 361.93.2 -- cannot find working devices in this configuration
I tensorflow/core/common_runtime/gpu/gpu_init.cc:81] No GPU devices available on machine.
```
答案 0 :(得分:2)
驱动程序版本低于cuda dso版本,因此您收到此错误。
您可以下载并安装cuda的新驱动程序
./ NVIDIA-Linux-x86_64-361.93.2.run(可能先停止X窗口)
PS:如果无法解决,请重新安装cuda
答案 1 :(得分:1)
以下在AWS EC2上为我解决了这个问题:
sudo apt-get update -y
sudo apt-get upgrade -y linux-aws
sudo reboot