lucasjinreal / DCNv2_latest

DCNv2 supports decent pytorch such as torch 1.5+ (now 1.8+)
BSD 3-Clause "New" or "Revised" License
614 stars 125 forks source link

pytorch 1.8 compilation error #22

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hello,

I have got the following error. nvcc v10.1.243, gcc v9.3.0, cuda 11.2

1/7] /usr/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/fatih/phd/FairMOT/DCNv2_latest/build/temp.linux-x86_64-3.8/home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_psroi_pooling_cuda.o.d -DWITH_CUDA -I/home/fatih/phd/FairMOT/DCNv2_latest/src -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include/TH -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include/THC -I/home/fatih/miniconda3/envs/FairMOT/include/python3.8 -c -c /home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_psroi_pooling_cuda.cu -o /home/fatih/phd/FairMOT/DCNv2_latest/build/temp.linux-x86_64-3.8/home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_psroi_pooling_cuda.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -ccbin g++ -std=c++14 FAILED: /home/fatih/phd/FairMOT/DCNv2_latest/build/temp.linux-x86_64-3.8/home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_psroi_pooling_cuda.o /usr/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/fatih/phd/FairMOT/DCNv2_latest/build/temp.linux-x86_64-3.8/home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_psroi_pooling_cuda.o.d -DWITH_CUDA -I/home/fatih/phd/FairMOT/DCNv2_latest/src -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include/TH -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include/THC -I/home/fatih/miniconda3/envs/FairMOT/include/python3.8 -c -c /home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_psroi_pooling_cuda.cu -o /home/fatih/phd/FairMOT/DCNv2_latest/build/temp.linux-x86_64-3.8/home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_psroi_pooling_cuda.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -ccbin g++ -std=c++14 nvcc fatal : Unknown option '-generate-dependencies-with-compile' [2/7] /usr/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/fatih/phd/FairMOT/DCNv2_latest/build/temp.linux-x86_64-3.8/home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_im2col_cuda.o.d -DWITH_CUDA -I/home/fatih/phd/FairMOT/DCNv2_latest/src -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include/TH -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include/THC -I/home/fatih/miniconda3/envs/FairMOT/include/python3.8 -c -c /home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_im2col_cuda.cu -o /home/fatih/phd/FairMOT/DCNv2_latest/build/temp.linux-x86_64-3.8/home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_im2col_cuda.o -D__CUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -ccbin g++ -std=c++14 FAILED: /home/fatih/phd/FairMOT/DCNv2_latest/build/temp.linux-x86_64-3.8/home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_im2col_cuda.o /usr/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/fatih/phd/FairMOT/DCNv2_latest/build/temp.linux-x86_64-3.8/home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_im2col_cuda.o.d -DWITH_CUDA -I/home/fatih/phd/FairMOT/DCNv2_latest/src -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include/TH -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include/THC -I/home/fatih/miniconda3/envs/FairMOT/include/python3.8 -c -c /home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_im2col_cuda.cu -o /home/fatih/phd/FairMOT/DCNv2_latest/build/temp.linux-x86_64-3.8/home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_im2col_cuda.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -ccbin g++ -std=c++14 nvcc fatal : Unknown option '-generate-dependencies-with-compile' [3/7] /usr/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/fatih/phd/FairMOT/DCNv2_latest/build/temp.linux-x86_64-3.8/home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_cuda.o.d -DWITH_CUDA -I/home/fatih/phd/FairMOT/DCNv2_latest/src -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include/TH -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include/THC -I/home/fatih/miniconda3/envs/FairMOT/include/python3.8 -c -c /home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_cuda.cu -o /home/fatih/phd/FairMOT/DCNv2_latest/build/temp.linux-x86_64-3.8/home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_cuda.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -ccbin g++ -std=c++14 FAILED: /home/fatih/phd/FairMOT/DCNv2_latest/build/temp.linux-x86_64-3.8/home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_cuda.o /usr/bin/nvcc --generate-dependencies-with-compile --dependency-output /home/fatih/phd/FairMOT/DCNv2_latest/build/temp.linux-x86_64-3.8/home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_cuda.o.d -DWITH_CUDA -I/home/fatih/phd/FairMOT/DCNv2_latest/src -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include/TH -I/home/fatih/miniconda3/envs/FairMOT/lib/python3.8/site-packages/torch/include/THC -I/home/fatih/miniconda3/envs/FairMOT/include/python3.8 -c -c /home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_cuda.cu -o /home/fatih/phd/FairMOT/DCNv2_latest/build/temp.linux-x86_64-3.8/home/fatih/phd/FairMOT/DCNv2_latest/src/cuda/dcn_v2_cuda.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_HAS_FP16=1 -DCUDA_NO_HALF_OPERATORS -DCUDA_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=_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -ccbin g++ -std=c++14 nvcc fatal : Unknown option '-generate-dependencies-with-compile'

ghost commented 3 years ago

I still cannot compile DCNv2. I get the same error with pytorch 1.7 as well. Any help would be appreciated.