Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NVCC - host compiler targets unsupported OS [duplicate]

Tags:

build

cuda

nvcc

cl

I've been trying to get CUDA working on my PC. I tried clean (re-)installing the latest drivers and CUDA as well as latest Visual Studio 2017 RC Build Tools. My operating system is Windows 10 (64-bit) build 14393.693, GPU is GTX 1060 6GB (Driver version 378.49), CUDA version 8.0.44.

I took a simple demo from one of the NVIDIA blogs and when I try to compile with "nvcc", I get "nvcc fatal: Host compiler targets unsupported OS". I setup my envrionment by opening a command prompt in the folder with the .cu file, then running "vcvars64" to add the 64-bit cl.exe to my environment variables. I also tried this with "vcvars32" and I get same result.

I can confirm that cl.exe will compile a "HelloWorld" C file.

like image 309
Sina Madani Avatar asked Feb 02 '17 13:02

Sina Madani


1 Answers

Try using a supported host compiler.

Edit: The question has since come up again and gotten a better answer here: Using CUDA with Visual Studio 2017

like image 162
tera Avatar answered Oct 31 '22 19:10

tera