Use CUDA 8.0 with macOS Sierra (10.12)


The latest version of CUDA8.63 is now working well with macOS Sierra 10.12.3, and there is no need to bother~


IGNORE THESE 已经兼容了不用看了

The moment I am typing, the latest version of CUDA is 8.0.4. It is the first version that provide the CUDA driver for macOS Sierra AKA 10.12.

我打字的这个时候,最新版本的CUDA8.0.4. 这是NVIDIA首次对macOS Sierra 也就是10.12 提供了CUDA驱动支持.

But there comes the bad news as usual that the latest version of CUDA is not compatible with clang 8.0.0, which is provided with Xcode8. So When trying to compile the sample apps, you will get the following error:

不过有个很悲伤的消息,就是这个最新版本的CUDA很自然的与最新版的Xcode8所提供的clang 8.0.0不兼容。所以当你安装完了那个巨大的Dmg之后 想编译CUDA提供的sample的时候就要遇到下面这个错误提示了:

nvcc fatal   : The version ('80000') of the host compiler ('Apple clang') is not supported

Someone downgrads to Xcode 7.* but still gets the following errors:


make[1]: *** [asyncAPI.o] Error 2
make: *** [0_Simple/asyncAPI/Makefile.ph_build] Error 2

Luckily, I find that we can make the CUDA work with keeping both Xcode 8 and 7. I assume that you are using the Xcode8 as /Applications/ and have no other versions of Xcode.


  • Rename /Applications/ to, so we can keep both of 8 and 7 without the confliction of their names.


sudo mv /Applications/ /Applications/
sudo xcode-select --switch /Library/Developer/CommandLineTools
  • Run the command below to check the version of clang, which should be 7.3.0:


clang -v

In my case I got this:


Apple LLVM version 7.3.0 (clang-703.0.31)
Target: x86_64-ap ple-darwin16.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Then we can compile the sample app of CUDA. Those information are picked up fom This Post.

然后就可以编译CUDA提供的sample了。上面这些信息收集整理自 这个帖子

Category: Mac
Python Mount&Blade MayaVi Scholar Lens Library Linux QT Data Visualization Poem Hack RaspberryPi NAS Xcode IDE Geology VirtualBox Raspbian Chat Game GlumPy Photo Hate Camera Disease Video University ChromeBook RTL-SDR Microscope Programming Hardware Radio Memory Junck Conda VisPy Software Science Communicate Translation Pyenv Server Kivy Book Telescope Download CUDA Story Discuss Hackintosh DIY Moon Lesson Mac VTK GeoPython