Is NVCC fake?

Is NVCC fake? Because why call it a complier when it needs the cl.exe from Visual Studio. When I run it in Linux it doesn’t need a cl.exe but for windows it needs cl.exe. So if cl.exe is a complier then, Is NVCC fake?

On windows, nvcc uses cl.exe primarily to compile host code (the portion of your code that runs on the CPU). cl.exe doesn’t know how to compile device code, or generate machine code for a GPU, so nvcc has a separate compiler for that. A similar activity occurs on linux: nvcc by default uses gcc/g++, the GNU C/C++ compilers, to compile host code, and nvcc has separate compilers for device code.

You can get an idea of the nvcc compilation flow by passing --verbose during compilation, and study the nvcc manual.

1 Like

Is there a way that I can use MinGW for host code compliation instead of having cl.exe to compile host code?

You can find questions like this on various forums. here is an example.
It’s not supported by NVIDIA
the supported environments are listed in the windows installation guide: cl.exe is required on native windows (not WSL).

Ok, Thank you Sir.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.