TensorFlow Learning [2]--Enable TensorFlow with GPU support

This series mainly uses the TensorFlow Chinese community as a reference.

Enable TensorFlow with GPU support.

1. Install the VS environment ( VS2015 used in this article )

Just install the C++ components.

2. Install CUDA9.0 (note that version 9.1 is currently not officially compatible, but you can refer to this article to solve this problem)

After the installation is complete , open a command prompt and enter:

nvcc -V

A message similar to the following figure appears to prove that the installation is complete.


3. Next you need to install cuDNN .

Find the corresponding CUDA and system version on this page and download it.


After cuDNN is decompressed, overwrite the contents of the bin, include and lib folders to the Cuda installation directory. The default path is C:\Program Files\NVIDIA GPUComputing Toolkit\CUDA\v9.0 (remember not to replace, but to put Cudnn The .dll file in the file is added to Cuda)

3. Verify that Cuda is successfully installed (compile the Sample file):

Enter the cuda path, the default C:\ProgramData\NVIDIACorporation\CUDA Samples\v9.0 Select the sln file corresponding to the VS version to open.

Select Release, X64 

Right-click 1_Utilities, click build (build) 

Successfully compiled the text below the picture: 5 successful... 

Next, open the "C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.0\bin\win64\Release" folder and two files, deviceQuery and bandwidthTest, will appear.


Next, enter the path through the command prompt, execute deviceQuery.exe, and the following text appears to prove success.

Then in the same path, execute bandwidthTest.exe and the following text appears to prove success.

At this point, the GPU-supported TensorFlow is installed.


This article refers to:  Win10 installation Tensorflow-GPU version tutorial (with CUDA installation could not fine compatible graphic hardware question answer)



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325755180&siteId=291194637