Could anyone let me know what exact condition triggers this error from NVCC? nvcc fatal : Host compiler targets unsupported OS.
I am building a project on windows using msbuild 15.0.
I was able to build the exact same project without external dependencies. But, when I add some dependencies to the parent directories, it fails like below (modifed contents…)
I am debugging this, and would like to know the exact condition this error is triggered to fix the build import files.
Since I don’t know what that is, I can’t be any more specific. My suggestion would be to set up your build environment so it mimics the host compiler selected in a proper visual studio install of CUDA, in that environment/OS.
Yes.
"-ccbin “C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.20.27508\bin\HostX86\x64"”
This works well on my project as well.
But, in my situation, I have to make a build environment without VS (cpp) compiler installed.
I can use a nuget package which contains a visual cpp compiler (cl.exe).
I copied the contents of “D:\packages\VisualCppTools.14.15.26732.1\build\native....\lib\native\bin\amd64” into the visual studio directory. “C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.20.27508\bin\HostX86\x64”, and confirmed that the cl.exe itself works fine (even they are the same).
I would like to get some more detailed error message or condition for the host compiler error in order to find the wrong flag or setting in my msbuild file.
I have found that nvcc.exe looks for a specific file ‘VC\Auxiliary\Build\vcvarsall.bat’ relative to any parent directory of CL.exe.
There is not setting or option for this. This is hard-coded in the binary. (cuda 10.1)
Hope this could become configurable.
I had to change some of my packages to match this directory structure.
Although cl.exe compiles fine
Does cuda 11.8 support intel openAPI?
Even if I specify the host compiler as “Intel C++ Compiler 2022” in Visual Studio
As a command line option
-ccbin “C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.33.31629\bin\HostX64\x64”
is set.
Launch Intel oneAPI command line and manually
nvcc -rdc=true -O2 kernel.cu -o kernel -ccbin “C:\Program Files (x86)\Intel\oneAPI\compiler\2022.1.0\windows\bin\icx.exe”
If I specify
Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2022.1.0 Build 20220316
Copyright (C) 1985-2022 Intel Corporation.