How to upgrade the CUDA version in a Visual Studio solution?












1















Earlier I installed CUDA 9.2 on my machine and built a solution with it. Then I upgraded Visual Studio 2017 to a revision that is not supported by CUDA 9.2, so I'm getting errors like:



1>D:DevViewsEnginesProbQAProbQAPqaCore>"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2binnvcc.exe" -gencode=arch=compute_61,code="sm_61,compute_61" --use-local-env -ccbin "C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.16.27023binHostX64x64" -x cu -rdc=true -ID:DevViewsEnginesProbQAProbQAPqaCore -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" --source-in-ptx -G -lineinfo  --keep-dir x64Debug -maxrregcount=32  --machine 64 --compile -cudart static  -g   -D_DEBUG -D_WINDOWS -D_USRDLL -DPQACORE_EXPORTS -D_WINDLL -D_UNICODE -DUNICODE -Xcompiler "/EHsc /W4 /nologo /Od /FS /Zi /RTC1 /MDd /GR" -o x64DebugCudaEngineGpu.cu.obj "D:DevViewsEnginesProbQAProbQAPqaCoreCudaEngineGpu.cu"
1>c:program filesnvidia gpu computing toolkitcudav9.2includecrt/host_config.h(133): fatal error C1189: #error: -- unsupported Microsoft Visual Studio version! Only the versions 2012, 2013, 2015 and 2017 are supported!
1>CUDACOMPILE : nvcc warning : '--device-debug (-G)' overrides '--generate-line-info (-lineinfo)'
1>CudaEngineGpu.cu
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDEVCVCTargetsBuildCustomizationsCUDA 9.2.targets(707,9): error MSB3721: The command ""C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2binnvcc.exe" -gencode=arch=compute_61,code="sm_61,compute_61" --use-local-env -ccbin "C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.16.27023binHostX64x64" -x cu -rdc=true -ID:DevViewsEnginesProbQAProbQAPqaCore -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" --source-in-ptx -G -lineinfo --keep-dir x64Debug -maxrregcount=32 --machine 64 --compile -cudart static -g -D_DEBUG -D_WINDOWS -D_USRDLL -DPQACORE_EXPORTS -D_WINDLL -D_UNICODE -DUNICODE -Xcompiler "/EHsc /W4 /nologo /Od /FS /Zi /RTC1 /MDd /GR" -o x64DebugCudaEngineGpu.cu.obj "D:DevViewsEnginesProbQAProbQAPqaCoreCudaEngineGpu.cu"" exited with code 2.


I've installed CUDA 10.0 that claims to be compatible with VS2017 Update 8 and any later versions. However, my solution still uses CUDA 9.2.



How to upgrade the solution to CUDA 10.0? Can I do this from GUI somewhere, or do I have to edit project files and something else?










share|improve this question




















  • 3





    Have you tried Build Dependencies" -> "Build Customizations"? Or you can do it manually by opening the vcxproj` file associated to your solution and then changing 9.2 to 10.0.

    – JackOLantern
    Dec 31 '18 at 8:42











  • @JackOLantern, thanks, that works! You can post this as an answer.

    – Serge Rogatch
    Dec 31 '18 at 9:49
















1















Earlier I installed CUDA 9.2 on my machine and built a solution with it. Then I upgraded Visual Studio 2017 to a revision that is not supported by CUDA 9.2, so I'm getting errors like:



1>D:DevViewsEnginesProbQAProbQAPqaCore>"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2binnvcc.exe" -gencode=arch=compute_61,code="sm_61,compute_61" --use-local-env -ccbin "C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.16.27023binHostX64x64" -x cu -rdc=true -ID:DevViewsEnginesProbQAProbQAPqaCore -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" --source-in-ptx -G -lineinfo  --keep-dir x64Debug -maxrregcount=32  --machine 64 --compile -cudart static  -g   -D_DEBUG -D_WINDOWS -D_USRDLL -DPQACORE_EXPORTS -D_WINDLL -D_UNICODE -DUNICODE -Xcompiler "/EHsc /W4 /nologo /Od /FS /Zi /RTC1 /MDd /GR" -o x64DebugCudaEngineGpu.cu.obj "D:DevViewsEnginesProbQAProbQAPqaCoreCudaEngineGpu.cu"
1>c:program filesnvidia gpu computing toolkitcudav9.2includecrt/host_config.h(133): fatal error C1189: #error: -- unsupported Microsoft Visual Studio version! Only the versions 2012, 2013, 2015 and 2017 are supported!
1>CUDACOMPILE : nvcc warning : '--device-debug (-G)' overrides '--generate-line-info (-lineinfo)'
1>CudaEngineGpu.cu
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDEVCVCTargetsBuildCustomizationsCUDA 9.2.targets(707,9): error MSB3721: The command ""C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2binnvcc.exe" -gencode=arch=compute_61,code="sm_61,compute_61" --use-local-env -ccbin "C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.16.27023binHostX64x64" -x cu -rdc=true -ID:DevViewsEnginesProbQAProbQAPqaCore -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" --source-in-ptx -G -lineinfo --keep-dir x64Debug -maxrregcount=32 --machine 64 --compile -cudart static -g -D_DEBUG -D_WINDOWS -D_USRDLL -DPQACORE_EXPORTS -D_WINDLL -D_UNICODE -DUNICODE -Xcompiler "/EHsc /W4 /nologo /Od /FS /Zi /RTC1 /MDd /GR" -o x64DebugCudaEngineGpu.cu.obj "D:DevViewsEnginesProbQAProbQAPqaCoreCudaEngineGpu.cu"" exited with code 2.


I've installed CUDA 10.0 that claims to be compatible with VS2017 Update 8 and any later versions. However, my solution still uses CUDA 9.2.



How to upgrade the solution to CUDA 10.0? Can I do this from GUI somewhere, or do I have to edit project files and something else?










share|improve this question




















  • 3





    Have you tried Build Dependencies" -> "Build Customizations"? Or you can do it manually by opening the vcxproj` file associated to your solution and then changing 9.2 to 10.0.

    – JackOLantern
    Dec 31 '18 at 8:42











  • @JackOLantern, thanks, that works! You can post this as an answer.

    – Serge Rogatch
    Dec 31 '18 at 9:49














1












1








1








Earlier I installed CUDA 9.2 on my machine and built a solution with it. Then I upgraded Visual Studio 2017 to a revision that is not supported by CUDA 9.2, so I'm getting errors like:



1>D:DevViewsEnginesProbQAProbQAPqaCore>"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2binnvcc.exe" -gencode=arch=compute_61,code="sm_61,compute_61" --use-local-env -ccbin "C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.16.27023binHostX64x64" -x cu -rdc=true -ID:DevViewsEnginesProbQAProbQAPqaCore -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" --source-in-ptx -G -lineinfo  --keep-dir x64Debug -maxrregcount=32  --machine 64 --compile -cudart static  -g   -D_DEBUG -D_WINDOWS -D_USRDLL -DPQACORE_EXPORTS -D_WINDLL -D_UNICODE -DUNICODE -Xcompiler "/EHsc /W4 /nologo /Od /FS /Zi /RTC1 /MDd /GR" -o x64DebugCudaEngineGpu.cu.obj "D:DevViewsEnginesProbQAProbQAPqaCoreCudaEngineGpu.cu"
1>c:program filesnvidia gpu computing toolkitcudav9.2includecrt/host_config.h(133): fatal error C1189: #error: -- unsupported Microsoft Visual Studio version! Only the versions 2012, 2013, 2015 and 2017 are supported!
1>CUDACOMPILE : nvcc warning : '--device-debug (-G)' overrides '--generate-line-info (-lineinfo)'
1>CudaEngineGpu.cu
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDEVCVCTargetsBuildCustomizationsCUDA 9.2.targets(707,9): error MSB3721: The command ""C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2binnvcc.exe" -gencode=arch=compute_61,code="sm_61,compute_61" --use-local-env -ccbin "C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.16.27023binHostX64x64" -x cu -rdc=true -ID:DevViewsEnginesProbQAProbQAPqaCore -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" --source-in-ptx -G -lineinfo --keep-dir x64Debug -maxrregcount=32 --machine 64 --compile -cudart static -g -D_DEBUG -D_WINDOWS -D_USRDLL -DPQACORE_EXPORTS -D_WINDLL -D_UNICODE -DUNICODE -Xcompiler "/EHsc /W4 /nologo /Od /FS /Zi /RTC1 /MDd /GR" -o x64DebugCudaEngineGpu.cu.obj "D:DevViewsEnginesProbQAProbQAPqaCoreCudaEngineGpu.cu"" exited with code 2.


I've installed CUDA 10.0 that claims to be compatible with VS2017 Update 8 and any later versions. However, my solution still uses CUDA 9.2.



How to upgrade the solution to CUDA 10.0? Can I do this from GUI somewhere, or do I have to edit project files and something else?










share|improve this question
















Earlier I installed CUDA 9.2 on my machine and built a solution with it. Then I upgraded Visual Studio 2017 to a revision that is not supported by CUDA 9.2, so I'm getting errors like:



1>D:DevViewsEnginesProbQAProbQAPqaCore>"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2binnvcc.exe" -gencode=arch=compute_61,code="sm_61,compute_61" --use-local-env -ccbin "C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.16.27023binHostX64x64" -x cu -rdc=true -ID:DevViewsEnginesProbQAProbQAPqaCore -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" --source-in-ptx -G -lineinfo  --keep-dir x64Debug -maxrregcount=32  --machine 64 --compile -cudart static  -g   -D_DEBUG -D_WINDOWS -D_USRDLL -DPQACORE_EXPORTS -D_WINDLL -D_UNICODE -DUNICODE -Xcompiler "/EHsc /W4 /nologo /Od /FS /Zi /RTC1 /MDd /GR" -o x64DebugCudaEngineGpu.cu.obj "D:DevViewsEnginesProbQAProbQAPqaCoreCudaEngineGpu.cu"
1>c:program filesnvidia gpu computing toolkitcudav9.2includecrt/host_config.h(133): fatal error C1189: #error: -- unsupported Microsoft Visual Studio version! Only the versions 2012, 2013, 2015 and 2017 are supported!
1>CUDACOMPILE : nvcc warning : '--device-debug (-G)' overrides '--generate-line-info (-lineinfo)'
1>CudaEngineGpu.cu
1>C:Program Files (x86)Microsoft Visual Studio2017CommunityCommon7IDEVCVCTargetsBuildCustomizationsCUDA 9.2.targets(707,9): error MSB3721: The command ""C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2binnvcc.exe" -gencode=arch=compute_61,code="sm_61,compute_61" --use-local-env -ccbin "C:Program Files (x86)Microsoft Visual Studio2017CommunityVCToolsMSVC14.16.27023binHostX64x64" -x cu -rdc=true -ID:DevViewsEnginesProbQAProbQAPqaCore -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" -I"C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.2include" --source-in-ptx -G -lineinfo --keep-dir x64Debug -maxrregcount=32 --machine 64 --compile -cudart static -g -D_DEBUG -D_WINDOWS -D_USRDLL -DPQACORE_EXPORTS -D_WINDLL -D_UNICODE -DUNICODE -Xcompiler "/EHsc /W4 /nologo /Od /FS /Zi /RTC1 /MDd /GR" -o x64DebugCudaEngineGpu.cu.obj "D:DevViewsEnginesProbQAProbQAPqaCoreCudaEngineGpu.cu"" exited with code 2.


I've installed CUDA 10.0 that claims to be compatible with VS2017 Update 8 and any later versions. However, my solution still uses CUDA 9.2.



How to upgrade the solution to CUDA 10.0? Can I do this from GUI somewhere, or do I have to edit project files and something else?







visual-studio build cuda upgrade






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 1 at 8:42









JackOLantern

14.5k353109




14.5k353109










asked Dec 30 '18 at 23:42









Serge RogatchSerge Rogatch

6,15623365




6,15623365








  • 3





    Have you tried Build Dependencies" -> "Build Customizations"? Or you can do it manually by opening the vcxproj` file associated to your solution and then changing 9.2 to 10.0.

    – JackOLantern
    Dec 31 '18 at 8:42











  • @JackOLantern, thanks, that works! You can post this as an answer.

    – Serge Rogatch
    Dec 31 '18 at 9:49














  • 3





    Have you tried Build Dependencies" -> "Build Customizations"? Or you can do it manually by opening the vcxproj` file associated to your solution and then changing 9.2 to 10.0.

    – JackOLantern
    Dec 31 '18 at 8:42











  • @JackOLantern, thanks, that works! You can post this as an answer.

    – Serge Rogatch
    Dec 31 '18 at 9:49








3




3





Have you tried Build Dependencies" -> "Build Customizations"? Or you can do it manually by opening the vcxproj` file associated to your solution and then changing 9.2 to 10.0.

– JackOLantern
Dec 31 '18 at 8:42





Have you tried Build Dependencies" -> "Build Customizations"? Or you can do it manually by opening the vcxproj` file associated to your solution and then changing 9.2 to 10.0.

– JackOLantern
Dec 31 '18 at 8:42













@JackOLantern, thanks, that works! You can post this as an answer.

– Serge Rogatch
Dec 31 '18 at 9:49





@JackOLantern, thanks, that works! You can post this as an answer.

– Serge Rogatch
Dec 31 '18 at 9:49












1 Answer
1






active

oldest

votes


















2














You have two ways to upgrade the CUDA version in a Visual Studio solution:





  1. Build dependencies -> Build customizations;

  2. Open the vcxproj file associated to the Visual Studio solution and change 9.2 to 10.0 wherever 9.2 occurs.






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%2f53982345%2fhow-to-upgrade-the-cuda-version-in-a-visual-studio-solution%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









    2














    You have two ways to upgrade the CUDA version in a Visual Studio solution:





    1. Build dependencies -> Build customizations;

    2. Open the vcxproj file associated to the Visual Studio solution and change 9.2 to 10.0 wherever 9.2 occurs.






    share|improve this answer




























      2














      You have two ways to upgrade the CUDA version in a Visual Studio solution:





      1. Build dependencies -> Build customizations;

      2. Open the vcxproj file associated to the Visual Studio solution and change 9.2 to 10.0 wherever 9.2 occurs.






      share|improve this answer


























        2












        2








        2







        You have two ways to upgrade the CUDA version in a Visual Studio solution:





        1. Build dependencies -> Build customizations;

        2. Open the vcxproj file associated to the Visual Studio solution and change 9.2 to 10.0 wherever 9.2 occurs.






        share|improve this answer













        You have two ways to upgrade the CUDA version in a Visual Studio solution:





        1. Build dependencies -> Build customizations;

        2. Open the vcxproj file associated to the Visual Studio solution and change 9.2 to 10.0 wherever 9.2 occurs.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 1 at 8:40









        JackOLanternJackOLantern

        14.5k353109




        14.5k353109






























            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%2f53982345%2fhow-to-upgrade-the-cuda-version-in-a-visual-studio-solution%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

            Monofisismo

            Angular Downloading a file using contenturl with Basic Authentication

            Olmecas