After created tensorflow environment under anaconda, I installed tensorflow-gpu. Then I was trying to import tensorflow to verify if it\'s correctly installed, but got this erro
According to you previous answer, you seem to find out prebuilt tensorflow-gpu 1.5 is not compatible with CUDA 9.0 + CudNN 6.0. There are two possible solutions for your answer, if you want to use tensorflow-gpu 1.5:
1, upgrade your CUDA tool chain to CUDA 9.0 +Cudnn 7.0 (currently Cudnn 7.0.5 for CUDA 9.0).
2, recompile the tensorflow-gpu 1.5 target for CUDA 9.0 + cudnn 6.0.
I suggest choosing the first option for ease. But the official webpage of tensorflow 1.5 dose not deny the possibility of option 2: https://github.com/tensorflow/tensorflow/releases/tag/v1.5.0
Also, I got below error when I installed TensorFlow 1.8
. I have the Anaconda environment.
"ImportError: Could not find 'cudnn64_7.dll'"
But after I installed Nvidia cuDNN v7.1.3
(April 17, 2018), for CUDA 9.0
, everything started to work.
Please note that one needs to sign up as a Nvidia developer to be able to download the installation package(s).
Then, just follow the instructions in the page : cudnn-install
For Windows:
3.3. Installing cuDNN on Windows
The following steps describe how to build a cuDNN dependent program. In the following sections:
-your CUDA directory path is referred to as C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0
-your cuDNN directory path is referred to as <installpath>
Navigate to your <installpath>
directory containing cuDNN
.
Unzip the cuDNN package. -cudnn-9.0-windows7-x64-v7.zip
or -cudnn-9.0-windows10-x64-v7.zip
Copy the following files into the CUDA Toolkit directory.
<installpath>\cuda\bin\cudnn64_7.dll
to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin
.<installpath>\cuda\ include\cudnn.h
to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\include
.<installpath>\cuda\lib\x64\cudnn.lib
to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib\x64
.Set the following environment variables to point to where cuDNN is located. To access the value of the $(CUDA_PATH)
environment variable, perform the following steps:
sysdm.cpl
command.CUDA_PATH
Variable Value: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0
Include cudnn.lib in your Visual Studio project.
right-click
on the project name
.Linker > Input > Additional Dependencies
.cudnn.lib
and click OK.Just fould the solution:
I checked the \tensorflow\python\platform\build_info.py and found:
msvcp_dll_name = 'msvcp140.dll'
cudart_dll_name = 'cudart64_90.dll'
cuda_version_number = '9.0'
nvcuda_dll_name = 'nvcuda.dll'
cudnn_dll_name = 'cudnn64_7.dll'
cudnn_version_number = '7'
It assumes cudnn version is 7. So just need to correct it as:
cudnn_dll_name = 'cudnn64_6.dll'
cudnn_version_number = '6'
In my case i needed to install old cuDNN libraries linked here