I installed CUDA from source via the instructions on this site: http://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html#axzz4kJrsqXTL 89. I have Xcode 8.2 and CUDA 8.0.83. This installation passes the deviceQuery and bandwithTest scripts.
I have also installed PyTorch from source via the link you posted above. I have anaconda installed and I set “export CMAKE_PREFIX_PATH=~/anaconda”. The step that fails is: python setup.py 3 install.
When I run python setup.py 3, this is what I get from terminal:
sudo MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py 3 install
running install
running build_deps
/Users/zzhao/Desktop/pytorch-master/pytorch/torch/_thnn/utils.py:1: RuntimeWarning: Parent module ‘torch._thnn’ not found while handling absolute import
import os
/Users/zzhao/Desktop/pytorch-master/pytorch/torch/_thnn/utils.py:2: RuntimeWarning: Parent module ‘torch._thnn’ not found while handling absolute import
import itertools
/Users/zzhao/Desktop/pytorch-master/pytorch/torch/_thnn/utils.py:3: RuntimeWarning: Parent module ‘torch._thnn’ not found while handling absolute import
import importlib
– Try OpenMP C flag = [-fopenmp=libomp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP C flag = [ ]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP C flag = [-fopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP C flag = [/openmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP C flag = [-Qopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP C flag = [-openmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP C flag = [-xopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP C flag = [+Oopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP C flag = [-qsmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP C flag = [-mp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [-fopenmp=libomp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [ ]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [-fopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [/openmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [-Qopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [-openmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [-xopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [+Oopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [-qsmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [-mp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Could NOT find OpenMP (missing:  OpenMP_C_FLAGS OpenMP_CXX_FLAGS)
– Could not find hardware support for NEON on this machine.
– No OMAP3 processor on this machine.
– No OMAP4 processor on this machine.
– SSE2 Found
– SSE3 Found
– AVX Found
– AVX2 Found
– TH_SO_VERSION: 1
– Atomics: using GCC intrinsics
– Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core - iomp5 - pthread - m]
–   Library mkl_intel_lp64: /Users/zzhao/miniconda2/lib/libmkl_intel_lp64.dylib
–   Library mkl_intel_thread: /Users/zzhao/miniconda2/lib/libmkl_intel_thread.dylib
–   Library mkl_core: /Users/zzhao/miniconda2/lib/libmkl_core.dylib
–   Library iomp5: /Users/zzhao/miniconda2/lib/libiomp5.dylib
–   Library pthread: /usr/lib/libpthread.dylib
–   Library m: /usr/lib/libm.dylib
– MKL library found
– Found a library with BLAS API (mkl).
– Found a library with LAPACK API. (mkl)
– Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run “cmake
–help-policy CMP0042” for policy details.  Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
TH
This warning is for project developers.  Use -Wno-dev to suppress it.
– Generating done
– Build files have been written to: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/build/TH
[100%] Built target TH
Install the project…
– Install configuration: “Release”
– Installing: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/lib/libTH.1.dylib
– Installing: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/lib/libTH.dylib
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/TH.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THAllocator.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THMath.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THBlas.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THDiskFile.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THFile.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THFilePrivate.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THGeneral.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THGenerateAllTypes.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THGenerateDoubleType.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THGenerateFloatType.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THGenerateHalfType.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THGenerateLongType.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THGenerateIntType.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THGenerateShortType.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THGenerateCharType.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THGenerateByteType.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THGenerateFloatTypes.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THGenerateIntTypes.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THLapack.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THLogAdd.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THMemoryFile.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THRandom.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THSize.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THStorage.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THTensor.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THTensorApply.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THTensorDimApply.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THTensorMacros.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THVector.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THAtomic.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/THHalf.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/vector/AVX.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/vector/AVX2.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THBlas.c
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THBlas.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THLapack.c
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THLapack.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THStorage.c
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THStorage.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THStorageCopy.c
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THStorageCopy.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THTensor.c
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THTensor.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorConv.c
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorConv.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorCopy.c
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorCopy.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorLapack.c
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorLapack.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorMath.c
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorMath.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorRandom.c
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THTensorRandom.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THVectorDispatch.c
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH/generic/THVector.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/share/cmake/TH/THConfig.cmake
Updating install_name for libTH.1.dylib
Updating install_name for libTHNN.1.dylib
Updating install_name for libTHS.1.dylib
– TH_LIBRARIES: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/lib/libTH.1.dylib
– THS_SO_VERSION: 1
– Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run “cmake
–help-policy CMP0042” for policy details.  Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
THS
This warning is for project developers.  Use -Wno-dev to suppress it.
– Generating done
– Build files have been written to: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/build/THS
[ 50%] Linking C shared library libTHS.dylib
[100%] Built target THS
Install the project…
– Install configuration: “Release”
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/lib/libTHS.1.dylib
– Installing: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/lib/libTHS.dylib
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/THS/THS.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/THS/THSGenerateAllTypes.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/THS/THSGenerateFloatTypes.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/THS/THSGenerateIntTypes.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/THS/THSTensor.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/THS/generic/THSTensor.c
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/THS/generic/THSTensor.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/THS/generic/THSTensorMath.c
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/THS/generic/THSTensorMath.h
Updating install_name for libTH.1.dylib
Updating install_name for libTHNN.1.dylib
Updating install_name for libTHS.1.dylib
– TH_LIBRARIES: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/lib/libTH.1.dylib
– Try OpenMP C flag = [-fopenmp=libomp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP C flag = [ ]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP C flag = [-fopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP C flag = [/openmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP C flag = [-Qopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP C flag = [-openmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP C flag = [-xopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP C flag = [+Oopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP C flag = [-qsmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP C flag = [-mp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [-fopenmp=libomp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [ ]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [-fopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [/openmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [-Qopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [-openmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [-xopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [+Oopenmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [-qsmp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Try OpenMP CXX flag = [-mp]
– Performing Test OpenMP_FLAG_DETECTED
– Performing Test OpenMP_FLAG_DETECTED - Failed
– Could NOT find OpenMP (missing:  OpenMP_C_FLAGS OpenMP_CXX_FLAGS)
CMake Warning (dev) at CMakeLists.txt:61 (LINK_DIRECTORIES):
This command specifies the relative path
as a link directory.
Policy CMP0015 is not set: link_directories() treats paths relative to the
source dir.  Run “cmake --help-policy CMP0015” for policy details.  Use the
cmake_policy command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.
– THNN_SO_VERSION: 1
– Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run “cmake
–help-policy CMP0042” for policy details.  Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
THNN
This warning is for project developers.  Use -Wno-dev to suppress it.
– Generating done
– Build files have been written to: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/build/THNN
[ 50%] Linking C shared library libTHNN.dylib
[100%] Built target THNN
Install the project…
– Install configuration: “Release”
– Installing: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/lib/libTHNN.1.dylib
– Installing: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/lib/libTHNN.dylib
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/THNN/THNN.h
– Up-to-date: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/THNN/generic/THNN.h
Updating install_name for libTH.1.dylib
Updating install_name for libTHNN.1.dylib
Updating install_name for libTHS.1.dylib
– Removing -DNDEBUG from compile flags
– TH_LIBRARIES: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/lib/libTH.1.dylib
– MAGMA not found. Compiling without MAGMA support
– Automatic GPU detection failed. Building for common architectures.
– Autodetected CUDA architecture(s): 3.0;3.5;5.0;5.2;6.0;6.1;6.1+PTX
– got cuda version 8.0
– Found CUDA with FP16 support, compiling with torch.CudaHalfTensor
– CUDA_NVCC_FLAGS:  -DTH_INDEX_BASE=0 -I/Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include   -I/Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/TH -I/Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/THC   -I/Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/THS -I/Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/THCS   -I/Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/tmp_install/include/THPP;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-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_61,code=compute_61;-DCUDA_HAS_FP16=1
– THC_SO_VERSION: 1
– Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run “cmake
–help-policy CMP0042” for policy details.  Use the cmake_policy command to
set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets:
THC
This warning is for project developers.  Use -Wno-dev to suppress it.
– Generating done
– Build files have been written to: /Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/build/THC
[  1%] Building NVCC (Device) object CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o
[  4%] Building NVCC (Device) object CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o
[  4%] Building NVCC (Device) object CMakeFiles/THC.dir/THC_generated_THCStorageCopy.cu.o
[  6%] Building NVCC (Device) object CMakeFiles/THC.dir/THC_generated_THCTensor.cu.o
[  6%] Building NVCC (Device) object CMakeFiles/THC.dir/THC_generated_THCStorage.cu.o
[  7%] Building NVCC (Device) object CMakeFiles/THC.dir/THC_generated_THCTensorCopy.cu.o
[  9%] Building NVCC (Device) object CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o
[  9%] Building NVCC (Device) object CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o
nvcc fatal   : The version (‘80100’) of the host compiler (‘Apple clang’) is not supported
nvcc fatal   : The version (‘80100’) of the host compiler (‘Apple clang’) is not supported
nvcc fatal   : The version (‘80100’) of the host compiler (‘Apple clang’) is not supported
nvcc fatal   : The version (‘80100’) of the host compiler (‘Apple clang’) is not supported
CMake Error at THC_generated_THCSleep.cu.o.cmake:207 (message):
Error generating
/Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/build/THC/CMakeFiles/THC.dir//./THC_generated_THCSleep.cu.o
CMake Error at THC_generated_THCTensor.cu.o.cmake:207 (message):
Error generating
/Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/build/THC/CMakeFiles/THC.dir//./THC_generated_THCTensor.cu.o
CMake Error at THC_generated_THCStorageCopy.cu.o.cmake:207 (message):
Error generating
/Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/build/THC/CMakeFiles/THC.dir//./THC_generated_THCStorageCopy.cu.o
CMake Error at THC_generated_THCTensorCopy.cu.o.cmake:207 (message):
Error generating
/Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/build/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorCopy.cu.o
nvcc fatal   : The version (‘80100’) of the host compiler (‘Apple clang’) is not supported
nvcc fatal   : The version (‘80100’) of the host compiler (‘Apple clang’) is not supported
CMake Error at THC_generated_THCStorage.cu.o.cmake:207 (message):
Error generating
/Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/build/THC/CMakeFiles/THC.dir//./THC_generated_THCStorage.cu.o
make[2]: *** [CMakeFiles/THC.dir/THC_generated_THCSleep.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs…
make[2]: *** [CMakeFiles/THC.dir/THC_generated_THCTensorCopy.cu.o] Error 1
make[2]: *** [CMakeFiles/THC.dir/THC_generated_THCTensor.cu.o] Error 1
make[2]: *** [CMakeFiles/THC.dir/THC_generated_THCStorageCopy.cu.o] Error 1
CMake Error at THC_generated_THCBlas.cu.o.cmake:207 (message):
Error generating
/Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/build/THC/CMakeFiles/THC.dir//./THC_generated_THCBlas.cu.o
make[2]: *** [CMakeFiles/THC.dir/THC_generated_THCStorage.cu.o] Error 1
nvcc fatal   : The version (‘80100’) of the host compiler (‘Apple clang’) is not supported
make[2]: *** [CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o] Error 1
CMake Error at THC_generated_THCReduceApplyUtils.cu.o.cmake:207 (message):
Error generating
/Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/build/THC/CMakeFiles/THC.dir//./THC_generated_THCReduceApplyUtils.cu.o
make[2]: *** [CMakeFiles/THC.dir/THC_generated_THCReduceApplyUtils.cu.o] Error 1
nvcc fatal   : The version (‘80100’) of the host compiler (‘Apple clang’) is not supported
CMake Error at THC_generated_THCHalf.cu.o.cmake:207 (message):
Error generating
/Users/zzhao/Desktop/pytorch-master/pytorch/torch/lib/build/THC/CMakeFiles/THC.dir//./THC_generated_THCHalf.cu.o
make[2]: *** [CMakeFiles/THC.dir/THC_generated_THCHalf.cu.o] Error 1
make[1]: *** [CMakeFiles/THC.dir/all] Error 2
make: *** [all] Error 2
I’ve seen that the nvcc fatal error is due to having the wrong Xcode CLT version (https://github.com/arrayfire/arrayfire/issues/1384 4) . So I tried switching to Xcode CLT 7.3—however, I still get the same errors when running setup.py 3.
As of right now, I have CUDA 8.0.83, OS 10.12.5, Apple LLVM Version 8.0.0, and Xcode 8.2 and I’m still having trouble getting torch.cuda.is_available() to return true. Any further help would be appreciated!