I recently upgraded my install of VS 2017 and now I’m getting many errors about my host compilers not supporting CUDA.
Nothing else really changed. I’m using the CUDA 9 RC and it was working perfectly with VS 2017 but then this update happened and now everything seems broken T_T
I have the latest update of VS2017 Community (15.3.1), and CUDA 9.0 RC downloaded and installed today. I fixed the error in host_config.h referenced by @txbob, and I successfully compiled and ran both deviceQuery and bandwidthTest.
Microsoft (R) C/C++ Optimizing Compiler Version 19.11.25506 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
tmpxft_00001ab4_00000000-1.cpp
nvcc fatal : Host compiler targets unsupported OS.
Also, all hope is not lost. My project builds appropriately for the CUDA 9 toolkit using VS 2015. I was able to compile my project and pass my tests so I’m still able to continue programming.
@MutantJohn: Did you look at the CUDA Installation Guide? Support for 32-bit projects is limited.
1.1.1. x86 32-bit Support
Native development using the CUDA Toolkit on x86_32 is unsupported. Deployment
and execution of CUDA applications on x86_32 is still supported, but is limited to use
with GeForce GPUs. To create 32-bit CUDA applications, use the cross-development
capabilities of the CUDA Toolkit on x86_64.
@rvhelden: What O/S are you compiling for? The message seems to be saying the host compiler (that would be, e g, C/C++) is not targeting an O/S which it supports. I suppose there is some way you tell nvcc which O/S to target, and maybe it is passing that information back to the host compiler.
I’m on Windows 10, using a 64 bit Developer Command Prompt.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build>vcvars64.bat
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.0.26730.8
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
...>nvcc \path\to\cuda\source.cu
Microsoft (R) C/C++ Optimizing Compiler Version 19.11.25506 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
tmpxft_00000824_00000000-1.cpp
nvcc fatal : Host compiler targets unsupported OS.
For the record, everything was working until MS upgraded VS. Not sure what happened but 2017 support seems shaky in the RC. Ooh, does the RC come with full support for C++14? It’d be nice to use generic lambdas and the like.
I’m having the same issue as MutantJohn. I’m using Visual Studio 2017 Update 3.3 (so version 15.3.3) and I see this when I run nvcc from the CUDA 9.0 RC:
1>Microsoft (R) C/C++ Optimizing Compiler Version 19.11.25507.1 for x64
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>
1>tmpxft_00003fcc_00000000-1.cpp
1>nvcc fatal : Host compiler targets unsupported OS.
My guess is nvcc is built to check for _MSC_VER > 1910, similar to the host_config header. Since VS 15.3 brought that up to 1911, it’s breaking. Hopefully this will be resolved in the next RC for CUDA 9.