问题描述
Tensorflow 刚刚发布了 Windows 支持.我安装了 gpu 版本和 CUDA 8.0 和 python 3.5.但是,在导入 tensorflow 后,出现以下错误:
>>>导入张量流我c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] 在本地成功打开了CUDA库cublas64_80.dll我 c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:119] 无法打开 CUDA 库 cudnn64_5.dll我 c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_dnn.cc:3459] 无法加载 cuDNN DSO我 c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] 在本地成功打开了 CUDA 库 cufft64_80.dll我c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] 在本地成功打开了CUDA库nvcuda.dll我c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] 在本地成功打开了CUDA库curand64_80.dll有人可以帮忙吗?谢谢!
TL;DR: 要在 TensorFlow 中使用 cuDNN,文件 cudnn64_5.dll
必须位于%PATH%
环境变量中的目录.请注意,cuDNN 是从 CUDA 单独下载的,您必须下载 cuDNN 5.1 版.
首先请注意,cuDNN 并未随 CUDA 工具包的其余部分一起分发,因此您需要从 NVIDIA 网站.在 Windows 上,它作为 ZIP 存档分发,因此您必须解压缩它并找到包含 cudnn64_5.dll
的目录.例如,如果您将其解压缩到 C:\tools\cuda
,则 DLL 将位于 C:\tools\cuda\bin\cudnn64_5.dll
.最后,您可以通过在命令提示符下键入以下内容将其添加到您的路径中:
C:\>设置 PATH=%PATH%;C:\tools\cuda\binC:\>Python...>>>将张量流导入为 tf
Tensorflow just released windows support. I installed the gpu version and CUDA 8.0 and python 3.5. However, after I import the tensorflow I got the following error:
>>> import tensorflow
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library cublas64_80.dll locally
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:119] Couldn't open CUDA library cudnn64_5.dll
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_dnn.cc:3459] Unable to load cuDNN DSO
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library cufft64_80.dll locally
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library nvcuda.dll locally
I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library curand64_80.dll locally
Can someone help? Thanks!
TL;DR: To use cuDNN with TensorFlow, the file cudnn64_5.dll
must be in a directory that is in your %PATH%
environment variable. Note that cuDNN is a separate download from CUDA, and you must download version 5.1 of cuDNN.
First of all, note that cuDNN is not distributed with the rest of the CUDA toolkit, so you will need to download it separately from the NVIDIA website. On Windows, it is distributed as a ZIP archive, so you must extract it and find the directory containing cudnn64_5.dll
. For example, if you extract it to C:\tools\cuda
, the DLL will be in C:\tools\cuda\bin\cudnn64_5.dll
. Finally, you can add it to your path by typing the following at the command prompt:
C:\> set PATH=%PATH%;C:\tools\cuda\bin
C:\> python
...
>>> import tensorflow as tf
这篇关于Windows 上的 TensorFlow:“无法打开 CUDA 库 cudnn64_5.dll"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!