How to verify CuDNN installation?

前端 未结 9 933
余生分开走
余生分开走 2020-11-29 15:02

I have searched many places but ALL I get is HOW to install it, not how to verify that it is installed. I can verify my NVIDIA driver is installed, and that CUDA is installe

9条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-29 15:29

    The installation of CuDNN is just copying some files. Hence to check if CuDNN is installed (and which version you have), you only need to check those files.

    Install CuDNN

    Step 1: Register an nvidia developer account and download cudnn here (about 80 MB). You might need nvcc --version to get your cuda version.

    Step 2: Check where your cuda installation is. For most people, it will be /usr/local/cuda/. You can check it with which nvcc.

    Step 3: Copy the files:

    $ cd folder/extracted/contents
    $ sudo cp include/cudnn.h /usr/local/cuda/include
    $ sudo cp lib64/libcudnn* /usr/local/cuda/lib64
    $ sudo chmod a+r /usr/local/cuda/lib64/libcudnn*
    

    Check version

    You might have to adjust the path. See step 2 of the installation.

    $ cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
    

    Notes

    When you get an error like

    F tensorflow/stream_executor/cuda/cuda_dnn.cc:427] could not set cudnn filter descriptor: CUDNN_STATUS_BAD_PARAM
    

    with TensorFlow, you might consider using CuDNN v4 instead of v5.

    Ubuntu users who installed it via apt: https://askubuntu.com/a/767270/10425

提交回复
热议问题