1

我已经安装了 tensorflow 的 gpu 版本,但是当我尝试导入它时,我收到以下错误消息:

I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcublas.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcudnn.so.5 locally
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcufft.so.8.0 locally
I tensorflow/stream_executor/dso_loader.cc:116] Couldn't open CUDA library libcuda.so.1. LD_LIBRARY_PATH: usr/local/cuda-8.0/lib64
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:165] hostname: sep-GS60-2QE
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:189] libcuda reported version is: Not found: was unable to find libcuda.so DSO loaded into this program
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:193] kernel reported version is: Permission denied: could not open driver version path for reading: /proc/driver/nvidia/version
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1066] LD_LIBRARY_PATH: usr/local/cuda-8.0/lib64
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1067] failed to find libcuda.so on this system: Failed precondition: could not dlopen DSO: libcuda.so.1; dlerror: libnvidia-fatbinaryloader.so.367.57: cannot open shared object file: No such file or directory
I tensorflow/stream_executor/dso_loader.cc:125] successfully opened CUDA library libcurand.so.8.0 locally

我已按照 tensorflow 网站上的安装指南进行操作,并确保我已正确安装了 Cuda 和 CudNN。

我已经尝试libcuda.so按照 nvidia 网站上其他帖子的建议,从我在系统中找到的 a 创建符号链接到 cuda 目录,但它们没有帮助。

我还将 ~/.bashrc 中的参数设置为export LD_LIBRARY_PATH="usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"export CUDA_HOME="/usr/local/cuda"但仍然没有运气:(。

如果有人可以帮助我对此进行排序,那将是最有帮助的,因为在我的 gpu 上运行代码是我项目的关键部分。

4

1 回答 1

1

您输入的内容中有错字LD_LIBRARY_PATH,并且 tensorflow 已阅读。我看到你有usr/local/cuda...而不是/usr/local/cuda(注意/路径开头的)

通常,对我来说,在使用 nvidia 的运行文件安装程序安装 cuda 后,以下 LD_LIBRARY_PATH 就足够了。 export LD_LIBRARY_PATH=/usr/local/cuda:/usr/local/cuda/lib64:$LD_LIBRARY_PATH

于 2017-01-24T23:10:52.990 回答