I have just upgraded Visual Studio 2022 to the latest version 17.10, and found that my program using CUDA v12.0 does not compile because of the error in NVIDIA GPU Computing Toolkit\CUDA\v12.0\include\crt\host_config.h
:
#if _MSC_VER < 1910 || _MSC_VER >= 1940
#error -- unsupported Microsoft Visual Studio version! Only the versions between 2017 and 2022 (inclusive) are supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
because _MSC_VER = 1940
in Visual Studio 2022 v17.10.
Is it safe to use compilation flag -allow-unsupported-compiler
in my case or just patch host_config.h
allowing for higher _MSC_VER, or Visual Studio 2022 v17.10 is actually and irreparably incompatible with CUDA 12.0 (and below)?
#if _MSC_VER < 1910 || _MSC_VER >= 1950
, which supports new Visual Studio. At the same time, upgrading Cuda on my end will require all users of my program to upgrade Nvidia Graphics drivers, which I would like to avoid. – Eliseoelish