i am getting the below error when installing pytorch from the github repository.
[ 69%] Linking CXX static library libgloo.a
[ 69%] Built target gloo
[ 80%] Building NVCC (Device) object gloo/CMakeFiles/gloo_cuda.dir/gloo_cuda_generated_cuda_private.cu.o
[ 76%] Building NVCC (Device) object gloo/CMakeFiles/gloo_cuda.dir/gloo_cuda_generated_cuda.cu.o
[ 80%] Building NVCC (Device) object gloo/CMakeFiles/gloo_cuda.dir/nccl/gloo_cuda_generated_nccl.cu.o
In file included from /u/hk/pytorch/torch/lib/gloo/gloo/cuda_private.h:16:0,
from /u/hk/pytorch/torch/lib/gloo/gloo/cuda_private.cu:10:
/u/hk/pytorch/torch/lib/gloo/gloo/cuda.h:24:2: error: #error “Expected GLOO_USE_CUDA to be defined” #error “Expected GLOO_USE_CUDA to be defined”
^
In file included from /u/hk/pytorch/torch/lib/gloo/gloo/cuda.cu:10:0:
/u/hk/pytorch/torch/lib/gloo/gloo/cuda.h:24:2: error: #error “Expected GLOO_USE_CUDA to be defined” #error “Expected GLOO_USE_CUDA to be defined”
^
CMake Error at gloo_cuda_generated_cuda_private.cu.o.cmake:203 (message):
Error generating
/u/hk/pytorch/torch/lib/build/gloo/gloo/CMakeFiles/gloo_cuda.dir//./gloo_cuda_generated_cuda_private.cu.o
make[2]: *** [gloo/CMakeFiles/gloo_cuda.dir/gloo_cuda_generated_cuda_private.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs…
CMake Error at gloo_cuda_generated_cuda.cu.o.cmake:203 (message):
Error generating
/u/hk/pytorch/torch/lib/build/gloo/gloo/CMakeFiles/gloo_cuda.dir//./gloo_cuda_generated_cuda.cu.o
make[2]: *** [gloo/CMakeFiles/gloo_cuda.dir/gloo_cuda_generated_cuda.cu.o] Error 1
In file included from /u/hk/pytorch/torch/lib/gloo/gloo/nccl/nccl.h:18:0,
from /u/hk/pytorch/torch/lib/gloo/gloo/nccl/nccl.cu:10:
/u/hk/pytorch/torch/lib/gloo/gloo/cuda.h:24:2: error: #error “Expected GLOO_USE_CUDA to be defined” #error “Expected GLOO_USE_CUDA to be defined”
^
CMake Error at gloo_cuda_generated_nccl.cu.o.cmake:203 (message):
Error generating
/u/hk/pytorch/torch/lib/build/gloo/gloo/CMakeFiles/gloo_cuda.dir/nccl/./gloo_cuda_generated_nccl.cu.o
i’ll look into it now, the continuous builds pass for some reason.
What version of CUDA are you using? What’s the output of the command nvcc --version?
Even I am getting the same error when I run python setup.py install
nvcc --version output : nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2015 NVIDIA Corporation Built on Tue_Aug_11_14:27:32_CDT_2015 Cuda compilation tools, release 7.5, V7.5.17
PS : NO_DISTRIBUTED=1 python setup.py install is working but my question is what is NO_DISTRIBUTED=1 for?
Edit 1: As I previously mentioned, I have installed it via NO_DISTRIBUTED=1 python setup.py install but am unable to user affine_grid function.
But the point it is that is inside the third party libs
[ 22%] Building NVCC (Device) object third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir/gloo_cuda_generated_cuda.cu.o
In file included from /home/tyoc213/Documents/github/pytorch/third_party/gloo/gloo/cuda_private.cu:9:
In file included from /home/tyoc213/Documents/github/pytorch/torch/include/gloo/cuda_private.h:20:
/home/tyoc213/Documents/github/pytorch/torch/include/gloo/cuda.h:24:2: error: "Expected GLOO_USE_CUDA to be defined"
#error "Expected GLOO_USE_CUDA to be defined"
^
In file included from /home/tyoc213/Documents/github/pytorch/third_party/gloo/gloo/cuda.cu:9:
/home/tyoc213/Documents/github/pytorch/torch/include/gloo/cuda.h:24:2: error: "Expected GLOO_USE_CUDA to be defined"
#error "Expected GLOO_USE_CUDA to be defined"
^
1 error generated.
CMake Error at gloo_cuda_generated_cuda_private.cu.o.Release.cmake:217 (message):
Error generating
/home/tyoc213/Documents/github/pytorch/build/third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir//./gloo_cuda_generated_cuda_private.cu.o
make[2]: *** [third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir/build.make:91: third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir/gloo_cuda_generated_cuda_private.cu.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Scanning dependencies of target dnnl
1 error generated.
CMake Error at gloo_cuda_generated_cuda.cu.o.Release.cmake:217 (message):
Error generating
/home/tyoc213/Documents/github/pytorch/build/third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir//./gloo_cuda_generated_cuda.cu.o
make[2]: *** [third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir/build.make:84: third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir/gloo_cuda_generated_cuda.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3734: third_party/gloo/gloo/CMakeFiles/gloo_cuda.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....