Hello folks!
I am trying to install pytorch from binary source with a GPU support on MACOSX - High Sierra - 10.13.6 - Build 17G11023. CUDA 10.1, CUDNN 7.6.5
I followed all the steps required in the installation from the source webpage. Here are the commands (torch-gpu-py36 is my local env to install pytorch)
export TORCH_CUDA_ARCH_LIST="7.0"
export CMAKE_PREFIX_PATH=~/opt/anaconda3/envs/torch-gpu-py36
MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py
I got the following errors,
[3635/4568] Building NVCC (Device) obj...ated_BinaryMiscBackwardOpsKernels.cu.o
FAILED: caffe2/CMakeFiles/torch_cuda.dir/__/aten/src/ATen/native/cuda/torch_cuda_generated_BinaryMiscBackwardOpsKernels.cu.o
cd ~/pytorch/build/caffe2/CMakeFiles/torch_cuda.dir/__/aten/src/ATen/native/cuda && ~/opt/anaconda3/envs/torch-gpu-py36/bin/cmake -E make_directory ~/pytorch/build/caffe2/CMakeFiles/torch_cuda.dir/__/aten/src/ATen/native/cuda/. && ~/opt/anaconda3/envs/torch-gpu-py36/bin/cmake -D verbose:BOOL=OFF -D build_configuration:STRING=Release -D generated_file:STRING=~/pytorch/build/caffe2/CMakeFiles/torch_cuda.dir/__/aten/src/ATen/native/cuda/./torch_cuda_generated_BinaryMiscBackwardOpsKernels.cu.o -D generated_cubin_file:STRING=~/pytorch/build/caffe2/CMakeFiles/torch_cuda.dir/__/aten/src/ATen/native/cuda/./torch_cuda_generated_BinaryMiscBackwardOpsKernels.cu.o.cubin.txt -P ~/pytorch/build/caffe2/CMakeFiles/torch_cuda.dir/__/aten/src/ATen/native/cuda/torch_cuda_generated_BinaryMiscBackwardOpsKernels.cu.o.Release.cmake
~/pytorch/c10/util/ThreadLocalDebugInfo.h(16): warning: attribute "__visibility__" does not apply here
~/pytorch/c10/util/BFloat16.h(53): warning: calling a __host__ function from a __host__ __device__ function is not allowed
~/pytorch/c10/util/BFloat16.h(53): warning: calling a __host__ function("isnan<float> ") from a __host__ __device__ function("c10::detail::round_to_nearest_even") is not allowed
~/pytorch/aten/src/ATen/native/cuda/CUDALoops.cuh(145): error: identifier "std::__1::tuple< ::thrust::complex<float> , ::thrust::complex<float> > ::tuple<(bool)1, void> " is undefined in device code
~/pytorch/aten/src/ATen/native/cuda/CUDALoops.cuh(145): error: identifier "std::__1::tuple< ::thrust::complex<float> , ::thrust::complex<float> > ::tuple<(bool)1, void> " is undefined in device code
~/pytorch/aten/src/ATen/native/cuda/CUDALoops.cuh(145): error: identifier "std::__1::tuple< ::thrust::complex<float> , ::thrust::complex<float> > ::tuple<(bool)1, void> " is undefined in device code
~/pytorch/aten/src/ATen/native/cuda/CUDALoops.cuh(145): error: identifier "std::__1::tuple< ::thrust::complex<float> , ::thrust::complex<float> > ::tuple<(bool)1, void> " is undefined in device code
~/pytorch/aten/src/ATen/native/cuda/CUDALoops.cuh(145): error: identifier "std::__1::tuple< ::thrust::complex<double> , ::thrust::complex<double> > ::tuple<(bool)1, void> " is undefined in device code
~/pytorch/aten/src/ATen/native/cuda/CUDALoops.cuh(145): error: identifier "std::__1::tuple< ::thrust::complex<double> , ::thrust::complex<double> > ::tuple<(bool)1, void> " is undefined in device code
~/pytorch/aten/src/ATen/native/cuda/CUDALoops.cuh(145): error: identifier "std::__1::tuple< ::thrust::complex<double> , ::thrust::complex<double> > ::tuple<(bool)1, void> " is undefined in device code
~/pytorch/aten/src/ATen/native/cuda/CUDALoops.cuh(145): error: identifier "std::__1::tuple< ::thrust::complex<double> , ::thrust::complex<double> > ::tuple<(bool)1, void> " is undefined in device code
8 errors detected in the compilation of "/var/folders/s6/9wbtns5s1lq7kd0_qb9dslmr0000gn/T//tmpxft_000076c6_00000000-6_BinaryMiscBackwardOpsKernels.cpp1.ii".
CMake Error at torch_cuda_generated_BinaryMiscBackwardOpsKernels.cu.o.Release.cmake:281 (message):
Error generating file
~/pytorch/build/caffe2/CMakeFiles/torch_cuda.dir/__/aten/src/ATen/native/cuda/./torch_cuda_generated_BinaryMiscBackwardOpsKernels.cu.o
[3636/4568] Building NVCC (Device) obj...cuda_generated_BinaryMulDivKernel.cu.o
FAILED: caffe2/CMakeFiles/torch_cuda.dir/__/aten/src/ATen/native/cuda/torch_cuda_generated_BinaryMulDivKernel.cu.o
cd ~/pytorch/build/caffe2/CMakeFiles/torch_cuda.dir/__/aten/src/ATen/native/cuda && ~/opt/anaconda3/envs/torch-gpu-py36/bin/cmake -E make_directory ~/pytorch/build/caffe2/CMakeFiles/torch_cuda.dir/__/aten/src/ATen/native/cuda/. && ~/opt/anaconda3/envs/torch-gpu-py36/bin/cmake -D verbose:BOOL=OFF -D build_configuration:STRING=Release -D generated_file:STRING=~/pytorch/build/caffe2/CMakeFiles/torch_cuda.dir/__/aten/src/ATen/native/cuda/./torch_cuda_generated_BinaryMulDivKernel.cu.o -D generated_cubin_file:STRING=~/pytorch/build/caffe2/CMakeFiles/torch_cuda.dir/__/aten/src/ATen/native/cuda/./torch_cuda_generated_BinaryMulDivKernel.cu.o.cubin.txt -P ~/pytorch/build/caffe2/CMakeFiles/torch_cuda.dir/__/aten/src/ATen/native/cuda/torch_cuda_generated_BinaryMulDivKernel.cu.o.Release.cmake
~/pytorch/c10/util/ThreadLocalDebugInfo.h(16): warning: attribute "__visibility__" does not apply here
~/pytorch/c10/util/BFloat16.h(53): warning: calling a __host__ function from a __host__ __device__ function is not allowed
~/pytorch/c10/util/BFloat16.h(53): warning: calling a __host__ function("isnan<float> ") from a __host__ __device__ function("c10::detail::round_to_nearest_even") is not allowed
~/pytorch/aten/src/ATen/native/cuda/CUDALoops.cuh(145): error: identifier "std::__1::tuple< ::thrust::complex<double> > ::tuple<(bool)1, void> " is undefined in device code
~/pytorch/aten/src/ATen/native/cuda/CUDALoops.cuh(145): error: identifier "std::__1::tuple< ::thrust::complex<double> > ::tuple<(bool)1, void> " is undefined in device code
~/pytorch/aten/src/ATen/native/cuda/CUDALoops.cuh(145): error: identifier "std::__1::tuple< ::thrust::complex<double> > ::tuple<(bool)1, void> " is undefined in device code
~/pytorch/aten/src/ATen/native/cuda/CUDALoops.cuh(145): error: identifier "std::__1::tuple< ::thrust::complex<double> > ::tuple<(bool)1, void> " is undefined in device code
~/pytorch/aten/src/ATen/native/cuda/CUDALoops.cuh(145): error: identifier "std::__1::tuple< ::thrust::complex<float> > ::tuple<(bool)1, void> " is undefined in device code
~/pytorch/aten/src/ATen/native/cuda/CUDALoops.cuh(145): error: identifier "std::__1::tuple< ::thrust::complex<float> > ::tuple<(bool)1, void> " is undefined in device code
~/pytorch/aten/src/ATen/native/cuda/CUDALoops.cuh(145): error: identifier "std::__1::tuple< ::thrust::complex<float> > ::tuple<(bool)1, void> " is undefined in device code
~/pytorch/aten/src/ATen/native/cuda/CUDALoops.cuh(145): error: identifier "std::__1::tuple< ::thrust::complex<float> > ::tuple<(bool)1, void> " is undefined in device code
8 errors detected in the compilation of "/var/folders/s6/9wbtns5s1lq7kd0_qb9dslmr0000gn/T//tmpxft_000076df_00000000-6_BinaryMulDivKernel.cpp1.ii".
CMake Error at torch_cuda_generated_BinaryMulDivKernel.cu.o.Release.cmake:281 (message):
Error generating file
~/pytorch/build/caffe2/CMakeFiles/torch_cuda.dir/__/aten/src/ATen/native/cuda/./torch_cuda_generated_BinaryMulDivKernel.cu.o
[3637/4568] Building NVCC (Device) obj...generated_BinaryBitwiseOpsKernels.cu.o
~/pytorch/c10/util/ThreadLocalDebugInfo.h(16): warning: attribute "__visibility__" does not apply here
~/pytorch/c10/util/BFloat16.h(53): warning: calling a __host__ function from a __host__ __device__ function is not allowed
~/pytorch/c10/util/BFloat16.h(53): warning: calling a __host__ function("isnan<float> ") from a __host__ __device__ function("c10::detail::round_to_nearest_even") is not allowed
~/pytorch/c10/util/ThreadLocalDebugInfo.h(16): warning: attribute "__visibility__" does not apply here
[3638/4568] Building NVCC (Device) obj...generated_BinaryLogicalOpsKernels.cu.o
~/pytorch/c10/util/ThreadLocalDebugInfo.h(16): warning: attribute "__visibility__" does not apply here
~/pytorch/c10/util/BFloat16.h(53): warning: calling a __host__ function from a __host__ __device__ function is not allowed
~/pytorch/c10/util/BFloat16.h(53): warning: calling a __host__ function("isnan<float> ") from a __host__ __device__ function("c10::detail::round_to_nearest_even") is not allowed
~/pytorch/c10/util/ThreadLocalDebugInfo.h(16): warning: attribute "__visibility__" does not apply here
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "setup.py", line 733, in <module>
build_deps()
File "setup.py", line 316, in build_deps
cmake=cmake)
File "~/pytorch/tools/build_pytorch_libs.py", line 62, in build_caffe2
cmake.build(my_env)
File "~/pytorch/tools/setup_helpers/cmake.py", line 345, in build
self.run(build_args, my_env)
File "~/pytorch/tools/setup_helpers/cmake.py", line 141, in run
check_call(command, cwd=self.build_dir, env=env)
File "~/opt/anaconda3/envs/torch-gpu-py36/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '4']' returned non-zero exit status 1.
I would appreciate any help,
Thanks