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