0
votes

I'm trying to install Tensorflow-GPU for Python3.6 from source on my Mac OSX 10.13.2.

The installation processes are...

  1. I installed Nvidia-Web-Driver for my Geforce GT-750M and updated.

  2. Installed and updated to CUDA Driver v387.99 (GPU Driver Version: 378.10.10.10.25.102).

  3. I tried to install CuDNN v7 for CUDA 9.1.

But I could not find appropriate version for my Mac from the NVIDIA Website. https://developer.nvidia.com/rdp/cudnn-download

I struggled to install Tensorflow, tried all I could expected methods but, all failed and I got the same error below.

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

Even I met the same error when I ran the command for compiling of the CUDA 9.1 sample code.

$make -C 0_Simple/vectorAdd

The errors was...

/Developer/NVIDIA/CUDA-9.1/bin/nvcc -ccbin clang++ -I../../common/inc -m64 -Xcompiler -arch -Xcompiler x86_64 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_70,code=compute_70 -o vectorAdd.o -c vectorAdd.cu nvcc fatal : The version ('90000') of the host compiler ('Apple clang') is not supported make: *** [vectorAdd.o] Error 1

How can I solve this issue? I need you guys' help.

These are my development environment information.

$uname -a

Darwin Kenneth-MBP.local 17.3.0 Darwin Kernel Version 17.3.0: Thu Nov 9 18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64 x86_64

$cmake --version

cmake version 3.10.1

$clang --version

Apple LLVM version 9.0.0 (clang-900.0.39.2) Target: x86_64-apple-darwin17.3.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

$nvcc --version

nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2017 NVIDIA Corporation Built on Fri_Nov__3_21:08:57_CDT_2017 Cuda compilation tools, release 9.1, V9.1.85

$git describe --tags # Tensorflow 

v1.3.0-rc1-6207-ge210cb140a

GPU Driver - NVIDIA GT 750M

GPU Driver Version: 378.10.10.10.25.102,

CUDA Driver

CUDA Driver Version: 387.99

Thank you in advance.

1
As the documentation clearly states, CUDA 9.1 supports 10.12 onlytalonmies
Thank you Talonmies. I finally figure out the reason that was according to the official website, GPU is only supported Tensorflow version under 1.12.Kenneth Heo
No. The error nvcc fatal: The version ('90000') of the host compiler ('Apple clang') is not supported is because you have a version of XCode and the OS which is not compatible with the CUDA toolkit you are usingtalonmies
@talonmies CUDA 9.1, 9.0, 8, etc. work just fine with 10.13.pestilence669

1 Answers

2
votes

You might want to update the title of this post. There's a lot going on here and it seems to be primarily about installing Tensorflow in an unsupported configuration.

First, cuDNN is only available for CUDA 9.0, so I'd steer away from CUDA 9.1. The trick to building CUDA apps on macOS 10.13 is having Xcode 8.2 and switching the command-line tools during build. The newer compiler in Xcode 9 won't work with nvcc.

For building Tensorflow, there are some patches to be made, referenced here. Gold is in the comments (especially the OpenMP part). Don't forget to disable SIP (system integrity protection).

I have a fork of Tensorflow in branch v1-4-1-high-sierra-cuda with the modifications already applied and a super basic build_high_sierra.sh script, if you want to give it a try. It takes 15+ min to compile on a 12-core beast, so be warned (and be sure to reduce the COMPILE_CORES down from 24).


It's kind of a pain in the ass to build. You can try one of the pre-compiled binaries I posted in the releases section. As long as you have the prerequisites installed (CUDA 9.0 & appropriate cuDNN), which you'll need for building anyway, it might work.

https://github.com/pestilence669/tensorflow/releases/tag/1.4.1_high_sierra_cuda_xmas