最後就會出現 cuda versio -- 對應的 cuDNN 版本的頁面。
所以 cuDNN 不能亂裝,跟 cuda 的版本有關。
像我的cuda 是 10.2,所以:
Download cuDNN v8.0.5 (November 9th, 2020), for CUDA 10.2 Library for Linux, Ubuntu(x86_64 & PPC architecture) cuDNN Library for Linux (x86) cuDNN Library for Linux(Power) cuDNN Library for Windows10 (x86) cuDNN Runtime Library for Ubuntu18.04 (Deb) cuDNN Developer Library for Ubuntu18.04 (Deb) cuDNN Code Samples and User Guide for Ubuntu18.04 (Deb) cuDNN Runtime Library for Ubuntu16.04 (Deb) cuDNN Developer Library for Ubuntu16.04 (Deb) cuDNN Code Samples and User Guide for Ubuntu16.04 (Deb)所以可以知道..cuda10.2 跟 cuDNN 只有 support 到 ubuntu 18.04
ubuntu20.04 要用 cuda11.x
要選下面:cuDNN Archive,才會有對應Cuda 版本跟各平台的 lib, sample dev 的 deb 可以下載。
下載了 runtime library 跟 developer library
然後下載畫面說,到install guide 去看 cuDNN 安裝說明。
其中 deb 的安裝...
2.3.2. Debian Installation Before issuing the following commands, you'll need to replace x.x and 8.x.x.x with your specific CUDAand cuDNN versions and package date. Procedure: Navigate to your <cudnnpath> directory containing the cuDNN Debian file. Install the runtime library, for example: $ sudo dpkg -i libcudnn8_x.x.x-1+cudax.x_amd64.deb Install the developer library, for example: $ sudo dpkg -i libcudnn8-dev_8.x.x.x-1+cudax.x_amd64.deb Install the code samples and the cuDNN library documentation, for example: $ sudo dpkg -i libcudnn8-samples_8.x.x.x-1+cudax.x_amd64.deb安裝後,驗證測試的方法(一樣是cuDNN官網
Copy the cuDNN samples to a writable path. $cp -r /usr/src/cudnn_samples_v8/ $HOME Go to the writable path. $ cd $HOME/cudnn_samples_v8/mnistCUDNN Compile the mnistCUDNN sample. $make clean && make Run the mnistCUDNN sample. $ ./mnistCUDNN If cuDNN is properly installed and running on your Linux system, you will see a message similar to the following: Test passed!有一個 example 缺 freeimage,所以要 install : libfreeimage3 libfreeimage-dev
ubuntu 18.04 之後的 apt 已經support install local deb.
所以可以用 apt install ./xxx.deb 來安裝,然後一樣,用apt purge 來 remove
另外,caffe 只support cudnn7,用cudnn8 會build error..