How to get the cuda version?

后端 未结 19 2162
囚心锁ツ
囚心锁ツ 2020-11-30 16:24

Is there any quick command or script to check for the version of CUDA installed?

I found the manual of 4.0 under the installation directory but I\'m not sure whether

19条回答
  •  借酒劲吻你
    2020-11-30 16:41

    For CUDA version:

    nvcc --version
    

    Or use,

    nvidia-smi
    

    For cuDNN version:

    For Linux:

    Use following to find path for cuDNN:

    $ whereis cuda
    cuda: /usr/local/cuda
    

    Then use this to get version from header file,

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

    For Windows,

    Use following to find path for cuDNN:

    C:\>where cudnn*
    C:\Program Files\cuDNN7\cuda\bin\cudnn64_7.dll
    

    Then use this to dump version from header file,

    type "%PROGRAMFILES%\cuDNN7\cuda\include\cudnn.h" | findstr CUDNN_MAJOR
    

    If you're getting two different versions for CUDA on Windows - Different CUDA versions shown by nvcc and NVIDIA-smi

提交回复
热议问题