Ubuntu 16.04, CUDA 8 - CUDA driver version is insufficient for CUDA runtime version

前端 未结 9 752
孤街浪徒
孤街浪徒 2020-12-08 04:15

I\'ve installed the latest nvidia drivers (375.26) manually, and installed CUDA using cuda_8.0.44_linux.run (skipping the driver install there, since the bundled drivers are

9条回答
  •  不知归路
    2020-12-08 04:59

    During my experiments(Ubuntu 18.04 LTS - on Thinkpad 470s - NVIDIA GeForce 940MX), what I learned is that Table 2. CUDA Toolkit and Compatible Driver Versions from this release notes section of the website (https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html) is the most important information that you need to keep in mind while installing CUDA drivers.

    Also, you can compare whether your NVIDIA Driver version and the table is in Sync by checking with the command

    $nvidia-smi

    The output will look something like this for the latest

    NVIDIA-SMI 450.66 Driver Version: 450.66 CUDA Version: 11.0

    Once everything is in place, you can get it working by copying the samples and run them as follows,

    $ cp -r /usr/src/cudnn_samples_v8/ .
    $ cd cudnn_samples_v8/
    $ cd mnistCUDNN/
    $ make clean && make
    $ ./mnistCUDNN
    

    You'll get the results as ...

    Executing: mnistCUDNN cudnnGetVersion() : 8003 , CUDNN_VERSION from cudnn.h : 8003 (8.0.3) Host compiler version : GCC 9.3.0

    There are 1 CUDA capable devices on your machine : device 0 : sms 3 Capabilities 5.0, SmClock 1189.0 Mhz, MemSize (Mb) 2004, MemClock 2505.0 Mhz, Ecc=0, boardGroupID=0 Using device 0 ..........

    Resulting weights from Softmax: 0.0000000 0.0000000 0.0000000 1.0000000 0.0000000 0.0000714 0.0000000 0.0000000 0.0000000 0.0000000 Loading image data/five_28x28.pgm Performing forward propagation ... Resulting weights from Softmax: 0.0000000 0.0000008 0.0000000 0.0000002 0.0000000 1.0000000 0.0000154 0.0000000 0.0000012 0.0000006

    Result of classification: 1 3 5

    Test passed!

    I had to try at least 5-6 times before I realized the correlation between NVIDIA drivers and CUDA versions and then it all worked in the next attempt. But a very happy ending nonetheless to get it working.

提交回复
热议问题