Windows 10 installation cuda10.1 and various problems encountered by cudnn

To learn tensorflow, you need to use Nvidia's cuda package, and then I haven't finished it for two hours. It is all a problem. When encountering difficulties, I sleep decisively and sleep for five hours! ! !
Insert picture description here
Let me talk about the problems I encountered:

  1. My NVIDIA CUDA version is 9.1 and I want to use 10.1, mine is too old, I need to upgrade
    windows10 to install cuda10.2
    win10 to install cuda10.1+cudnn760
  2. After downloading CUDA10.1, I couldn't find the NVINIA GPU Computing Toolkit folder, so I installed it three times, only to find the problem
    Windows10 -64 installation tensorflow encountered: the installation file directory cannot be found after cuda installation
    Insert picture description here

Preface

After tensorflow1.12, gpu uses the driver corresponding to cuda10.0, it is not required to install cuda, [but pytorch requires the installation of cuda and cudnn (not sure)], if the driver version of this machine is less than the driver version corresponding to cuda10.0, it is recommended to install cuda10.x driver to overwrite the driver of this machine, no need to uninstall and install the driver

One, install CUDA

Download links for each version of NVIDIA CUDA (updated to 2019-12-11, including the latest 10.2 version)
1. Check the cuda version supported by your computer: open the NVIDIA control panel, click the system information in the help, click the component, and see NVCUDA.DLL. There is the cuda version number supported by your computer on the right side of the line. Mine is 9.1. The
Insert picture description here
driver needs to be upgraded to 10.1. The driver is cuda9.0. You need to overwrite this driver when installing cuda 10.2

Installation process

There is this step at the beginning, so you must not change it! ! ! Use temporary decompression path

Insert picture description here

If you choose custom installation, you can choose to install the driver, overwrite the driver of the machine
Insert picture description hereand read the tutorial.
Don’t choose Visual Studio Integration. Even if you choose it, you can’t successfully install it
Insert picture description hereunder the CUDA node. Cancel the "Visual Studio Integration" item; Under the "Driver components" node, compare the version number "Current Version" of the graphics card driver "Display Driver" currently installed on the computer with the version number of the graphics card driver "New Version" that comes with CUDA, if "Current Version" is greater than "New Version" , You need to uncheck "Display Driver", if it is less than or equal to, then check it by default

Insert picture description hereRemember the installation location, tensorflow requires the configuration environment to be configured
Insert picture description hereafter the installation is complete. Path needs to manually add the following path, corresponding to the installation path
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\lib\x64
C: \Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\extras\CUPTI\lib64
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v10 .2\bin\win64
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v10.2\common\lib\x64
Insert picture description hereInsert picture description here

Two, install cudnn

First look at the corresponding version number of cudnn.
I found a Baidu cloud cudnn myself . This is a 64-bit version. Please work hard for a 32-bit version .
After downloading, unzip, rename the file (cuda) to cudnn760, and put it in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\ This directory, you will need administrator rights, and then add it to the system environment variables C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\cudnn760\bin

verification

Finally, open the command window cmd, enter the verification command nvcc -V and
Insert picture description here
output the above information to indicate that the installation is successful!
It's finally good. Everyone encountered other problems during installation. You can
send me a private message or comment below ღ (´・ᴗ・`)
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_44145452/article/details/112908797