-
VS Version: VS2019 Version 16.11.8
-
CUDA Version: cuda_12.3.0_545.84_windows
-
Windows system: Windows Server 2019 Standard
Install Steps:
First, I installed VS2019.
Then, I installed CUDA 12.3, selecting the option to integrate with Visual Studio during the setup.
I created a CUDA C++ console application in Visual Studio.
Finally, I compiled a demo program and received the following error:
nvcc fatal: nvcc cannot find a supported version of Microsoft visual studio. only the versions between 2017 and 2019(inclusive) are supported!
However, after checking, I found that my CUDA version corresponds to the version of Visual Studio. I am unsure what might be causing the issue. Could anyone please help me analyze it?
CUDA 12.3 Installation Guide for Microsoft Windows:
Windows Compiler Support in CUDA 12.3:
Compiler* IDE MSVC Version 193x Visual Studio 2022 17.0 MSVC Version 192x Visual Studio 2019 16.x MSVC Version 191x Visual Studio 2017 15.x (RTW and all updates)
I noticed that the compilation error suggested adding the nvcc flag -allow-unsupported-compiler
to bypass the compiler version check. However, after adding this flag, I encountered the following error, and I have not yet found a solution.
CUDACOMPILE: Command-line: invalid Microsoft version number: 0
2