99网
您的当前位置:首页unsupported Microsoft Visual Studio version! Only the versions between 2017 and 2022

unsupported Microsoft Visual Studio version! Only the versions between 2017 and 2022

来源:99网

vs2022运行cuda11.8报错

错误    C11    #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

因篇幅问题不能全部显示,请点此查看更多更全内容