vs2022运行cuda11.8报错
错误 C1189 #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. CudaRuntime6 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include\crt\host_config.h 153
解决方法:
进入->C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include\crt
修改host_config.h
#if _MSC_VER < 1910 || _MSC_VER >= 1930
->
#if _MSC_VER < 1910 || _MSC_VER >= 2030