Different CUDA versions shown by nvcc and NVIDIA-smi










2















I am very confused by the different CUDA versions shown by running which nvcc and nvidia-smi.



I have both cuda9.2 and cuda10 installed on my ubuntu 16.04. Now I set the PATH to point to cuda9.2. So when I run :



 $ which nvcc
/usr/local/cuda-9.2/bin/nvcc


However, when I run



$ nvidia-smi
Wed Nov 21 19:41:32 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.72 Driver Version: 410.72 CUDA Version: 10.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 106... Off | 00000000:01:00.0 Off | N/A |
| N/A 53C P0 26W / N/A | 379MiB / 6078MiB | 2% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1324 G /usr/lib/xorg/Xorg 225MiB |
| 0 2844 G compiz 146MiB |
| 0 15550 G /usr/lib/firefox/firefox 1MiB |
| 0 19992 G /usr/lib/firefox/firefox 1MiB |
| 0 23605 G /usr/lib/firefox/firefox 1MiB |


So am I using cuda9.2 as which nvcc suggests, or am I using cuda10 as nvidia-smi suggests?



I saw this answer but it does not provide direct answer to the confusion, it just asks us to reinstall the cudatoolkit, which I already did.










share|improve this question



















  • 2





    I think I've seen this exact question come up multiple times over the last couple days. But I can't seem to find a duplicate now. The answer is: nvidia-smi shows you the CUDA version that your driver supports. You have one of the recent 410.x drivers installed which support CUDA 10. The version the driver supports has nothing to do with the version you compile and link your program against. A driver that supports CUDA 10.0 will also be able to run an application that was built for CUDA 9.2…

    – Michael Kenzel
    Nov 22 '18 at 1:12












  • @MichaelKenzel I see. Thanks for the clarification! Guess I'm using CUDA9.2 then..

    – yuqli
    Nov 22 '18 at 1:39











  • A similar question is here. @MichaelKenzel if you want to add an answer I would upvote.

    – Robert Crovella
    Nov 24 '18 at 17:37











  • @RobertCrovella yes, that was the one I was looking for. I only learned the answer from your comment there, so if anyone deserves an upvote then it is you yourself ;)

    – Michael Kenzel
    Nov 24 '18 at 18:13















2















I am very confused by the different CUDA versions shown by running which nvcc and nvidia-smi.



I have both cuda9.2 and cuda10 installed on my ubuntu 16.04. Now I set the PATH to point to cuda9.2. So when I run :



 $ which nvcc
/usr/local/cuda-9.2/bin/nvcc


However, when I run



$ nvidia-smi
Wed Nov 21 19:41:32 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.72 Driver Version: 410.72 CUDA Version: 10.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 106... Off | 00000000:01:00.0 Off | N/A |
| N/A 53C P0 26W / N/A | 379MiB / 6078MiB | 2% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1324 G /usr/lib/xorg/Xorg 225MiB |
| 0 2844 G compiz 146MiB |
| 0 15550 G /usr/lib/firefox/firefox 1MiB |
| 0 19992 G /usr/lib/firefox/firefox 1MiB |
| 0 23605 G /usr/lib/firefox/firefox 1MiB |


So am I using cuda9.2 as which nvcc suggests, or am I using cuda10 as nvidia-smi suggests?



I saw this answer but it does not provide direct answer to the confusion, it just asks us to reinstall the cudatoolkit, which I already did.










share|improve this question



















  • 2





    I think I've seen this exact question come up multiple times over the last couple days. But I can't seem to find a duplicate now. The answer is: nvidia-smi shows you the CUDA version that your driver supports. You have one of the recent 410.x drivers installed which support CUDA 10. The version the driver supports has nothing to do with the version you compile and link your program against. A driver that supports CUDA 10.0 will also be able to run an application that was built for CUDA 9.2…

    – Michael Kenzel
    Nov 22 '18 at 1:12












  • @MichaelKenzel I see. Thanks for the clarification! Guess I'm using CUDA9.2 then..

    – yuqli
    Nov 22 '18 at 1:39











  • A similar question is here. @MichaelKenzel if you want to add an answer I would upvote.

    – Robert Crovella
    Nov 24 '18 at 17:37











  • @RobertCrovella yes, that was the one I was looking for. I only learned the answer from your comment there, so if anyone deserves an upvote then it is you yourself ;)

    – Michael Kenzel
    Nov 24 '18 at 18:13













2












2








2


3






I am very confused by the different CUDA versions shown by running which nvcc and nvidia-smi.



I have both cuda9.2 and cuda10 installed on my ubuntu 16.04. Now I set the PATH to point to cuda9.2. So when I run :



 $ which nvcc
/usr/local/cuda-9.2/bin/nvcc


However, when I run



$ nvidia-smi
Wed Nov 21 19:41:32 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.72 Driver Version: 410.72 CUDA Version: 10.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 106... Off | 00000000:01:00.0 Off | N/A |
| N/A 53C P0 26W / N/A | 379MiB / 6078MiB | 2% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1324 G /usr/lib/xorg/Xorg 225MiB |
| 0 2844 G compiz 146MiB |
| 0 15550 G /usr/lib/firefox/firefox 1MiB |
| 0 19992 G /usr/lib/firefox/firefox 1MiB |
| 0 23605 G /usr/lib/firefox/firefox 1MiB |


So am I using cuda9.2 as which nvcc suggests, or am I using cuda10 as nvidia-smi suggests?



I saw this answer but it does not provide direct answer to the confusion, it just asks us to reinstall the cudatoolkit, which I already did.










share|improve this question
















I am very confused by the different CUDA versions shown by running which nvcc and nvidia-smi.



I have both cuda9.2 and cuda10 installed on my ubuntu 16.04. Now I set the PATH to point to cuda9.2. So when I run :



 $ which nvcc
/usr/local/cuda-9.2/bin/nvcc


However, when I run



$ nvidia-smi
Wed Nov 21 19:41:32 2018
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.72 Driver Version: 410.72 CUDA Version: 10.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 106... Off | 00000000:01:00.0 Off | N/A |
| N/A 53C P0 26W / N/A | 379MiB / 6078MiB | 2% Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1324 G /usr/lib/xorg/Xorg 225MiB |
| 0 2844 G compiz 146MiB |
| 0 15550 G /usr/lib/firefox/firefox 1MiB |
| 0 19992 G /usr/lib/firefox/firefox 1MiB |
| 0 23605 G /usr/lib/firefox/firefox 1MiB |


So am I using cuda9.2 as which nvcc suggests, or am I using cuda10 as nvidia-smi suggests?



I saw this answer but it does not provide direct answer to the confusion, it just asks us to reinstall the cudatoolkit, which I already did.







cuda






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 '18 at 0:56









talonmies

59.2k17128197




59.2k17128197










asked Nov 22 '18 at 0:44









yuqliyuqli

1511515




1511515







  • 2





    I think I've seen this exact question come up multiple times over the last couple days. But I can't seem to find a duplicate now. The answer is: nvidia-smi shows you the CUDA version that your driver supports. You have one of the recent 410.x drivers installed which support CUDA 10. The version the driver supports has nothing to do with the version you compile and link your program against. A driver that supports CUDA 10.0 will also be able to run an application that was built for CUDA 9.2…

    – Michael Kenzel
    Nov 22 '18 at 1:12












  • @MichaelKenzel I see. Thanks for the clarification! Guess I'm using CUDA9.2 then..

    – yuqli
    Nov 22 '18 at 1:39











  • A similar question is here. @MichaelKenzel if you want to add an answer I would upvote.

    – Robert Crovella
    Nov 24 '18 at 17:37











  • @RobertCrovella yes, that was the one I was looking for. I only learned the answer from your comment there, so if anyone deserves an upvote then it is you yourself ;)

    – Michael Kenzel
    Nov 24 '18 at 18:13












  • 2





    I think I've seen this exact question come up multiple times over the last couple days. But I can't seem to find a duplicate now. The answer is: nvidia-smi shows you the CUDA version that your driver supports. You have one of the recent 410.x drivers installed which support CUDA 10. The version the driver supports has nothing to do with the version you compile and link your program against. A driver that supports CUDA 10.0 will also be able to run an application that was built for CUDA 9.2…

    – Michael Kenzel
    Nov 22 '18 at 1:12












  • @MichaelKenzel I see. Thanks for the clarification! Guess I'm using CUDA9.2 then..

    – yuqli
    Nov 22 '18 at 1:39











  • A similar question is here. @MichaelKenzel if you want to add an answer I would upvote.

    – Robert Crovella
    Nov 24 '18 at 17:37











  • @RobertCrovella yes, that was the one I was looking for. I only learned the answer from your comment there, so if anyone deserves an upvote then it is you yourself ;)

    – Michael Kenzel
    Nov 24 '18 at 18:13







2




2





I think I've seen this exact question come up multiple times over the last couple days. But I can't seem to find a duplicate now. The answer is: nvidia-smi shows you the CUDA version that your driver supports. You have one of the recent 410.x drivers installed which support CUDA 10. The version the driver supports has nothing to do with the version you compile and link your program against. A driver that supports CUDA 10.0 will also be able to run an application that was built for CUDA 9.2…

– Michael Kenzel
Nov 22 '18 at 1:12






I think I've seen this exact question come up multiple times over the last couple days. But I can't seem to find a duplicate now. The answer is: nvidia-smi shows you the CUDA version that your driver supports. You have one of the recent 410.x drivers installed which support CUDA 10. The version the driver supports has nothing to do with the version you compile and link your program against. A driver that supports CUDA 10.0 will also be able to run an application that was built for CUDA 9.2…

– Michael Kenzel
Nov 22 '18 at 1:12














@MichaelKenzel I see. Thanks for the clarification! Guess I'm using CUDA9.2 then..

– yuqli
Nov 22 '18 at 1:39





@MichaelKenzel I see. Thanks for the clarification! Guess I'm using CUDA9.2 then..

– yuqli
Nov 22 '18 at 1:39













A similar question is here. @MichaelKenzel if you want to add an answer I would upvote.

– Robert Crovella
Nov 24 '18 at 17:37





A similar question is here. @MichaelKenzel if you want to add an answer I would upvote.

– Robert Crovella
Nov 24 '18 at 17:37













@RobertCrovella yes, that was the one I was looking for. I only learned the answer from your comment there, so if anyone deserves an upvote then it is you yourself ;)

– Michael Kenzel
Nov 24 '18 at 18:13





@RobertCrovella yes, that was the one I was looking for. I only learned the answer from your comment there, so if anyone deserves an upvote then it is you yourself ;)

– Michael Kenzel
Nov 24 '18 at 18:13












1 Answer
1






active

oldest

votes


















7














CUDA has 2 primary APIs, the runtime and the driver API. Both have a corresponding version (e.g. 8.0, 9.0, etc.)



The necessary support for the driver API (e.g. libcuda.so on linux) is installed by the GPU driver installer.



The necessary support for the runtime API (e.g. libcudart.so on linux, and also nvcc) is installed by the CUDA toolkit installer (which may also have a GPU driver installer bundled in it).



In any event, the (installed) driver API version may not always match the (installed) runtime API version, especially if you install a GPU driver independently from installing CUDA (i.e. the CUDA toolkit).



The nvidia-smi tool gets installed by the GPU driver installer, and generally has the GPU driver in view, not anything installed by the CUDA toolkit installer.



Recently (somewhere between 410.48 and 410.73 driver version on linux) the powers-that-be at NVIDIA decided to add reporting of the CUDA Driver API version installed by the driver, in the output from nvidia-smi.



This has no connection to the installed CUDA runtime version.



nvcc, the CUDA compiler-driver tool that is installed with the CUDA toolkit, will always report the CUDA runtime version that it was built to recognize. It doesn't know anything about what driver version is installed, or even if a GPU driver is installed.



Therefore, by design, these two numbers don't necessarily match, as they are reflective of two different things.






share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53422407%2fdifferent-cuda-versions-shown-by-nvcc-and-nvidia-smi%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    7














    CUDA has 2 primary APIs, the runtime and the driver API. Both have a corresponding version (e.g. 8.0, 9.0, etc.)



    The necessary support for the driver API (e.g. libcuda.so on linux) is installed by the GPU driver installer.



    The necessary support for the runtime API (e.g. libcudart.so on linux, and also nvcc) is installed by the CUDA toolkit installer (which may also have a GPU driver installer bundled in it).



    In any event, the (installed) driver API version may not always match the (installed) runtime API version, especially if you install a GPU driver independently from installing CUDA (i.e. the CUDA toolkit).



    The nvidia-smi tool gets installed by the GPU driver installer, and generally has the GPU driver in view, not anything installed by the CUDA toolkit installer.



    Recently (somewhere between 410.48 and 410.73 driver version on linux) the powers-that-be at NVIDIA decided to add reporting of the CUDA Driver API version installed by the driver, in the output from nvidia-smi.



    This has no connection to the installed CUDA runtime version.



    nvcc, the CUDA compiler-driver tool that is installed with the CUDA toolkit, will always report the CUDA runtime version that it was built to recognize. It doesn't know anything about what driver version is installed, or even if a GPU driver is installed.



    Therefore, by design, these two numbers don't necessarily match, as they are reflective of two different things.






    share|improve this answer





























      7














      CUDA has 2 primary APIs, the runtime and the driver API. Both have a corresponding version (e.g. 8.0, 9.0, etc.)



      The necessary support for the driver API (e.g. libcuda.so on linux) is installed by the GPU driver installer.



      The necessary support for the runtime API (e.g. libcudart.so on linux, and also nvcc) is installed by the CUDA toolkit installer (which may also have a GPU driver installer bundled in it).



      In any event, the (installed) driver API version may not always match the (installed) runtime API version, especially if you install a GPU driver independently from installing CUDA (i.e. the CUDA toolkit).



      The nvidia-smi tool gets installed by the GPU driver installer, and generally has the GPU driver in view, not anything installed by the CUDA toolkit installer.



      Recently (somewhere between 410.48 and 410.73 driver version on linux) the powers-that-be at NVIDIA decided to add reporting of the CUDA Driver API version installed by the driver, in the output from nvidia-smi.



      This has no connection to the installed CUDA runtime version.



      nvcc, the CUDA compiler-driver tool that is installed with the CUDA toolkit, will always report the CUDA runtime version that it was built to recognize. It doesn't know anything about what driver version is installed, or even if a GPU driver is installed.



      Therefore, by design, these two numbers don't necessarily match, as they are reflective of two different things.






      share|improve this answer



























        7












        7








        7







        CUDA has 2 primary APIs, the runtime and the driver API. Both have a corresponding version (e.g. 8.0, 9.0, etc.)



        The necessary support for the driver API (e.g. libcuda.so on linux) is installed by the GPU driver installer.



        The necessary support for the runtime API (e.g. libcudart.so on linux, and also nvcc) is installed by the CUDA toolkit installer (which may also have a GPU driver installer bundled in it).



        In any event, the (installed) driver API version may not always match the (installed) runtime API version, especially if you install a GPU driver independently from installing CUDA (i.e. the CUDA toolkit).



        The nvidia-smi tool gets installed by the GPU driver installer, and generally has the GPU driver in view, not anything installed by the CUDA toolkit installer.



        Recently (somewhere between 410.48 and 410.73 driver version on linux) the powers-that-be at NVIDIA decided to add reporting of the CUDA Driver API version installed by the driver, in the output from nvidia-smi.



        This has no connection to the installed CUDA runtime version.



        nvcc, the CUDA compiler-driver tool that is installed with the CUDA toolkit, will always report the CUDA runtime version that it was built to recognize. It doesn't know anything about what driver version is installed, or even if a GPU driver is installed.



        Therefore, by design, these two numbers don't necessarily match, as they are reflective of two different things.






        share|improve this answer















        CUDA has 2 primary APIs, the runtime and the driver API. Both have a corresponding version (e.g. 8.0, 9.0, etc.)



        The necessary support for the driver API (e.g. libcuda.so on linux) is installed by the GPU driver installer.



        The necessary support for the runtime API (e.g. libcudart.so on linux, and also nvcc) is installed by the CUDA toolkit installer (which may also have a GPU driver installer bundled in it).



        In any event, the (installed) driver API version may not always match the (installed) runtime API version, especially if you install a GPU driver independently from installing CUDA (i.e. the CUDA toolkit).



        The nvidia-smi tool gets installed by the GPU driver installer, and generally has the GPU driver in view, not anything installed by the CUDA toolkit installer.



        Recently (somewhere between 410.48 and 410.73 driver version on linux) the powers-that-be at NVIDIA decided to add reporting of the CUDA Driver API version installed by the driver, in the output from nvidia-smi.



        This has no connection to the installed CUDA runtime version.



        nvcc, the CUDA compiler-driver tool that is installed with the CUDA toolkit, will always report the CUDA runtime version that it was built to recognize. It doesn't know anything about what driver version is installed, or even if a GPU driver is installed.



        Therefore, by design, these two numbers don't necessarily match, as they are reflective of two different things.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        answered Nov 27 '18 at 16:57


























        community wiki





        Robert Crovella




























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53422407%2fdifferent-cuda-versions-shown-by-nvcc-and-nvidia-smi%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Top Tejano songwriter Luis Silva dead of heart attack at 64

            ReactJS Fetched API data displays live - need Data displayed static

            政党