CUDA 8 on Sierra

$ nvcc prog.cu
nvcc warning : The ‘compute_20’, ‘sm_20’, and ‘sm_21’ architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
nvcc fatal : The version (‘80000’) of the host compiler (‘Apple clang’) is not supported

$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Sun_Sep_18_22:16:08_CDT_2016
Cuda compilation tools, release 8.0, V8.0.46

$ clang --version
Apple LLVM version 8.0.0 (clang-800.0.38)
Target: x86_64-apple-darwin16.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Any clues why?

The Installation Guide for Mac OS X lists the tool chain versions supported by CUDA 8.0: [url]http://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html#axzz4MhqEjPgP[/url]

The information there indicates that only LLVM 7.0.3 is supported. Due to the tight integration of CUDA with the host tool chain (on all platforms), CUDA needs to be adjusted to, and validated with, individual host tool chain versions. The CUDA tool chain includes various checks for host tool chain compatibility, and throws an error if an unsupported tool chain is found. This is the error message you are seeing.

So, the expectation is that the user updates to Sierra for CUDA 8, but keeps his Xcode intact?
A warning on the download page would be helpful.
So, I guess, my options are either downgrading Xcode or waiting for CUDA to support LLVM 8.
Thanks for the pointer.

The download page does have exactly that warning. I’m glad it also says “We are working on providing an update shortly.” since it really is annoying trying to keep external tool versions in sync. The same delayed version support is common with major GCC updates on Linux or MSVC in Windows since it takes time for the NV engineers to validate the new compiler integration.

Ooops, my bad then.
Looking forward to the update, and thanks again for the info.

I followed the download page exactly, and still nvcc generates the usual compiler errors that indicate a broken toolchain, such as

/usr/include/stdio.h(133): error: expected a ")"

My versions:

MacOS Sierra 10.12.1 16B2657
/usr/bin/cc --version
  Apple LLVM version 7.3.0 (clang-703.0.29)
  Target: x86_64-apple-darwin16.1.0
  Thread model: posix
  InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
/Developer/NVIDIA/CUDA-8.0/bin/nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Sun_Sep_18_22:16:08_CDT_2016
Cuda compilation tools, release 8.0, V8.0.46
kextstat | grep -i cuda                                               [~]
  180    0 0xffffff7f839d7000 0x2000     0x2000     com.nvidia.CUDA (1.1.0) DD792765-CA28-395A-8593-D6837F05C4FF <4 1>

I have tried with cuda drivers 8.0.47 and 8.0.51 and toolkits 8.0.46 and 8.0.47, and Xcode 7.3.0 and 7.3.1, all to no avail. Cuda was working on this machine with an older OSX and cuda Version.

Does nvcc work for anyone at all who is using sierra?

Stuck in same situation at Tman2 with Sierra not working:

nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
clang: warning: argument unused during compilation: '-undefined dynamic_lookup'
/usr/include/stdio.h(133): error: expected a ")"
uname -a
Darwin XXX 16.1.0 Darwin Kernel Version 16.1.0: Wed Oct 19 20:31:56 PDT 2016; root:xnu-3789.21.4~4/RELEASE_X86_64 x86_64
/usr/bin/cc --version
Apple LLVM version 7.3.0 (clang-703.0.29)
Target: x86_64-apple-darwin16.1.0
Thread model: posix
InstalledDir: /Applications/Xcode_7.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
/Developer/NVIDIA/CUDA-8.0/bin/nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Sun_Sep_18_22:16:08_CDT_2016
Cuda compilation tools, release 8.0, V8.0.46
kextstat | grep -i cuda
  147    0 0xffffff7f82a46000 0x2000     0x2000     com.nvidia.CUDA (1.1.0) DD792765-CA28-395A-8593-D6837F05C4FF <4 1>

I also had the same problem. I downloaded Xcode 7.3.1 and Command Line Tools from here Sign In - Apple . After this my problem was solved.

@stedwik: Thanks, it works now! I did reinstall before but to no avail. What made the difference was to download and install Command Line Tools manually instead of installing it though xcode-select --install. The nvidia install manual should be changed.

It looks like, as of 2016-12-06, the download file is cuda_8.0.55_mac.dmg, and the warning for Mac developers is gone. I tried installing it, and with CUDA 8.0 and Xcode 8.0, deviceQuery and bandwidthTest both pass.

Or is that not a sufficient test?

$ /usr/bin/cc --version
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Sun_Oct_30_22:18:43_CDT_2016
Cuda compilation tools, release 8.0, V8.0.54
$ ./deviceQuery
./deviceQuery Starting...
<snip>
deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 8.0, CUDA Runtime Version = 8.0, NumDevs = 1, Device0 = GeForce GT 650M
Result = PASS
$ ./bandwidthTest
[CUDA Bandwidth Test] - Starting...
<snip>
Result = PASS