Closed ZOUKaifeng closed 4 years ago
Hi. Could you please show the log? Here, it doesn't show what the real errors are.
Also, I have never tried ninja build. What is your pytorch version? Could you please try distutils following here (scroll down to the utils.cpp_extensions
section)?
Hi, thanks for your reponse. I use following code.
cmdclass={'clean': clean,
'build_ext': BuildExtension.with_options(use_ninja=False)},
Then I got:
running build
running build_py
UPDATING build/lib.linux-x86_64-3.6/neuralnet_pytorch/_version.py
set build/lib.linux-x86_64-3.6/neuralnet_pytorch/_version.py to '1.0.0+fancy.22.gf1bcfa1.dirty'
running build_ext
building 'emd_cuda' extension
gcc -pthread -B /home/zou/.conda/envs/img/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/zou/.conda/envs/img/lib/python3.6/site-packages/torch/include -I/home/zou/.conda/envs/img/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/zou/.conda/envs/img/lib/python3.6/site-packages/torch/include/TH -I/home/zou/.conda/envs/img/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/zou/.conda/envs/img/include/python3.6m -c neuralnet_pytorch/extensions/cuda/emd_c/emd.cpp -o build/temp.linux-x86_64-3.6/neuralnet_pytorch/extensions/cuda/emd_c/emd.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=emd_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
/usr/local/cuda/bin/nvcc -I/home/zou/.conda/envs/img/lib/python3.6/site-packages/torch/include -I/home/zou/.conda/envs/img/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/zou/.conda/envs/img/lib/python3.6/site-packages/torch/include/TH -I/home/zou/.conda/envs/img/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/zou/.conda/envs/img/include/python3.6m -c neuralnet_pytorch/extensions/cuda/emd_c/emd_kernel.cu -o build/temp.linux-x86_64-3.6/neuralnet_pytorch/extensions/cuda/emd_c/emd_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=emd_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=sm_75 -std=c++14
neuralnet_pytorch/extensions/cuda/emd_c/emd_kernel.cu(181): error: identifier "AT_CHECK" is undefined
neuralnet_pytorch/extensions/cuda/emd_c/emd_kernel.cu(268): error: identifier "AT_CHECK" is undefined
neuralnet_pytorch/extensions/cuda/emd_c/emd_kernel.cu(385): error: identifier "AT_CHECK" is undefined
3 errors detected in the compilation of "/tmp/tmpxft_00000b6f_00000000-6_emd_kernel.cpp1.ii".
error: command '/usr/local/cuda/bin/nvcc' failed with exit status 1
My env ubuntu server 18.04 pytorch 1.5 cuda 10.2 python 3.6
I haven't tried pytorch 1.5 and cuda 10.2 yet but the reason is this. Could you please change AT_CHECK
to TORCH_CHECK
and compile again?
OK! It works! Thank you!
Hi, I am trying to install branch fancy by pip install git+git://github.com/justanhduc/neuralnet-pytorch.git@fancy But I failed to compile. It's because of the version of cuda?