Failed when run python setup.py build develop --no-deps, pleasea help me
Nipers opened this issue · 4 comments
I finished all the operations in the Step-by-step installation in INSTALL.md, everything is ok until the last command
System:Ubuntu 18.04.1 LTS
pytorch:1.9.0
gcc: 7.5.0
python: 3.9.5
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/2] /usr/local/cuda/bin/nvcc -DWITH_CUDA -Ifcos_core/csrc -I/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/include -I/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/include/TH -I/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/lxy/anaconda3/envs/FCOS/include/python3.9 -c -c /home/lxy/Jittor/FCOS/fcos_core/csrc/cuda/deform_pool_cuda.cu -o /home/lxy/Jittor/FCOS/build/temp.linux-x86_64-3.9/fcos_core/csrc/cuda/deform_pool_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++14
FAILED: /home/lxy/Jittor/FCOS/build/temp.linux-x86_64-3.9/fcos_core/csrc/cuda/deform_pool_cuda.o
/usr/local/cuda/bin/nvcc -DWITH_CUDA -Ifcos_core/csrc -I/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/include -I/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/include/TH -I/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/lxy/anaconda3/envs/FCOS/include/python3.9 -c -c /home/lxy/Jittor/FCOS/fcos_core/csrc/cuda/deform_pool_cuda.cu -o /home/lxy/Jittor/FCOS/build/temp.linux-x86_64-3.9/fcos_core/csrc/cuda/deform_pool_cuda.o -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++14
/home/lxy/Jittor/FCOS/fcos_core/csrc/cuda/deform_pool_cuda.cu(42): error: identifier "AT_CHECK" is undefined
/home/lxy/Jittor/FCOS/fcos_core/csrc/cuda/deform_pool_cuda.cu(68): error: identifier "AT_CHECK" is undefined
2 errors detected in the compilation of "/tmp/tmpxft_0000996b_00000000-6_deform_pool_cuda.cpp1.ii".
[2/2] /usr/local/cuda/bin/nvcc -DWITH_CUDA -Ifcos_core/csrc -I/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/include -I/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/include/TH -I/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/lxy/anaconda3/envs/FCOS/include/python3.9 -c -c /home/lxy/Jittor/FCOS/fcos_core/csrc/cuda/deform_conv_cuda.cu -o /home/lxy/Jittor/FCOS/build/temp.linux-x86_64-3.9/fcos_core/csrc/cuda/deform_conv_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1011"' -DTORCH_EXTENSION_NAME=C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++14
FAILED: /home/lxy/Jittor/FCOS/build/temp.linux-x86_64-3.9/fcos_core/csrc/cuda/deform_conv_cuda.o
/usr/local/cuda/bin/nvcc -DWITH_CUDA -Ifcos_core/csrc -I/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/include -I/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/include/TH -I/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/lxy/anaconda3/envs/FCOS/include/python3.9 -c -c /home/lxy/Jittor/FCOS/fcos_core/csrc/cuda/deform_conv_cuda.cu -o /home/lxy/Jittor/FCOS/build/temp.linux-x86_64-3.9/fcos_core/csrc/cuda/deform_conv_cuda.o -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++14
/home/lxy/Jittor/FCOS/fcos_core/csrc/cuda/deform_conv_cuda.cu(72): error: identifier "AT_CHECK" is undefined
/home/lxy/Jittor/FCOS/fcos_core/csrc/cuda/deform_conv_cuda.cu(200): error: identifier "AT_CHECK" is undefined
/home/lxy/Jittor/FCOS/fcos_core/csrc/cuda/deform_conv_cuda.cu(307): error: identifier "AT_CHECK" is undefined
/home/lxy/Jittor/FCOS/fcos_core/csrc/cuda/deform_conv_cuda.cu(423): error: identifier "AT_CHECK" is undefined
/home/lxy/Jittor/FCOS/fcos_core/csrc/cuda/deform_conv_cuda.cu(504): error: identifier "AT_CHECK" is undefined
/home/lxy/Jittor/FCOS/fcos_core/csrc/cuda/deform_conv_cuda.cu(586): error: identifier "AT_CHECK" is undefined
6 errors detected in the compilation of "/tmp/tmpxft_0000996a_00000000-6_deform_conv_cuda.cpp1.ii".
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1666, in _run_ninja_build
subprocess.run(
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/lxy/Jittor/FCOS/setup.py", line 66, in
setup(
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/setuptools/init.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 79, in run
_build_ext.run(self)
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 709, in build_extensions
build_ext.build_extensions(self)
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 196, in build_extension
_build_ext.build_extension(self, ext)
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/distutils/command/build_ext.py", line 529, in build_extension
objects = self.compiler.compile(sources,
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 530, in unix_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1355, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "/home/lxy/anaconda3/envs/FCOS/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1682, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
I have change the "cpu/vision.h" to "vision.h" in nms_cpu.cpp and ROIAlign_cpu.cpp,
I have change the "cpu/vision.h" to "vision.h" in nms_cpu.cpp and ROIAlign_cpu.cpp,
I clone your source code,no change,compile it ,still error.
sorry,I have changed "cpu/vision.h" to "vision.h" in nms_cpu.cpp and ROIAlign_cpu.cpp,but still error.
my gpu is 3060, cuda11.0,pytorch==1.9.0_gpu,python3.7.
thx
AT_CHECK" is undefined. how to resolve this problem.
I succeeded with this method!!!!oh nice