when I use script train.py
There is an error:
/mmdet/ops/dcn/deform_conv_cuda.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN3c1019UndefinedTensorImpl10_singletonE
Anyone, can help me? Thanks
Recompile the project may help you.
Recompile the project may help you.
After I recompile the project, the error is still existing.
The following is the details of Recompile
(dl) root@1144ddd21420:~/mmdetection# ./compile.sh
Building roi align op...
running build_ext
/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/utils/cpp_extension.py:166: UserWarning:
!! WARNING !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++) is not compatible with the compiler Pytorch was
built with for this platform, which is g++ on linux. Please
use g++ to to compile your extension. Alternatively, you may
compile PyTorch from source using /usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++, and then you can also use
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++ to compile your extension.
See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help
with compiling PyTorch from source.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! WARNING !!
platform=sys.platform))
building 'roi_align_cuda' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-cc -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -fPIC -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/TH -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/local/miniconda3/envs/dl/include/python3.6m -c src/roi_align_cuda.cpp -o build/temp.linux-x86_64-3.6/src/roi_align_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=roi_align_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
/usr/local/cuda/bin/nvcc -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/TH -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/local/miniconda3/envs/dl/include/python3.6m -c src/roi_align_kernel.cu -o build/temp.linux-x86_64-3.6/src/roi_align_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=roi_align_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
creating build/lib.linux-x86_64-3.6
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++ -pthread -shared -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/local/miniconda3/envs/dl/lib -L/usr/local/miniconda3/envs/dl/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/local/miniconda3/envs/dl/lib -L/usr/local/miniconda3/envs/dl/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 build/temp.linux-x86_64-3.6/src/roi_align_cuda.o build/temp.linux-x86_64-3.6/src/roi_align_kernel.o -L/usr/local/cuda/lib64 -lcudart -o build/lib.linux-x86_64-3.6/roi_align_cuda.cpython-36m-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-3.6/roi_align_cuda.cpython-36m-x86_64-linux-gnu.so ->
Building roi pool op...
running build_ext
/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/utils/cpp_extension.py:166: UserWarning:
!! WARNING !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++) is not compatible with the compiler Pytorch was
built with for this platform, which is g++ on linux. Please
use g++ to to compile your extension. Alternatively, you may
compile PyTorch from source using /usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++, and then you can also use
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++ to compile your extension.
See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help
with compiling PyTorch from source.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! WARNING !!
platform=sys.platform))
building 'roi_pool_cuda' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-cc -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -fPIC -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/TH -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/local/miniconda3/envs/dl/include/python3.6m -c src/roi_pool_cuda.cpp -o build/temp.linux-x86_64-3.6/src/roi_pool_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=roi_pool_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
/usr/local/cuda/bin/nvcc -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/TH -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/local/miniconda3/envs/dl/include/python3.6m -c src/roi_pool_kernel.cu -o build/temp.linux-x86_64-3.6/src/roi_pool_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=roi_pool_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
creating build/lib.linux-x86_64-3.6
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++ -pthread -shared -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/local/miniconda3/envs/dl/lib -L/usr/local/miniconda3/envs/dl/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/local/miniconda3/envs/dl/lib -L/usr/local/miniconda3/envs/dl/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 build/temp.linux-x86_64-3.6/src/roi_pool_cuda.o build/temp.linux-x86_64-3.6/src/roi_pool_kernel.o -L/usr/local/cuda/lib64 -lcudart -o build/lib.linux-x86_64-3.6/roi_pool_cuda.cpython-36m-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-3.6/roi_pool_cuda.cpython-36m-x86_64-linux-gnu.so ->
Building nms op...
running build_ext
running build_ext
/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/utils/cpp_extension.py:166: UserWarning:
!! WARNING !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++) is not compatible with the compiler Pytorch was
built with for this platform, which is g++ on linux. Please
use g++ to to compile your extension. Alternatively, you may
compile PyTorch from source using /usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++, and then you can also use
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++ to compile your extension.
See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help
with compiling PyTorch from source.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! WARNING !!
platform=sys.platform))
building 'nms_cuda' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-cc -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -fPIC -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/TH -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/local/miniconda3/envs/dl/include/python3.6m -c src/nms_cuda.cpp -o build/temp.linux-x86_64-3.6/src/nms_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=nms_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
/usr/local/cuda/bin/nvcc -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/TH -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/local/miniconda3/envs/dl/include/python3.6m -c src/nms_kernel.cu -o build/temp.linux-x86_64-3.6/src/nms_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=nms_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
creating build/lib.linux-x86_64-3.6
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++ -pthread -shared -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/local/miniconda3/envs/dl/lib -L/usr/local/miniconda3/envs/dl/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/local/miniconda3/envs/dl/lib -L/usr/local/miniconda3/envs/dl/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 build/temp.linux-x86_64-3.6/src/nms_cuda.o build/temp.linux-x86_64-3.6/src/nms_kernel.o -L/usr/local/cuda/lib64 -lcudart -o build/lib.linux-x86_64-3.6/nms_cuda.cpython-36m-x86_64-linux-gnu.so
building 'nms_cpu' extension
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-cc -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -fPIC -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/TH -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/local/miniconda3/envs/dl/include/python3.6m -c src/nms_cpu.cpp -o build/temp.linux-x86_64-3.6/src/nms_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=nms_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++ -pthread -shared -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/local/miniconda3/envs/dl/lib -L/usr/local/miniconda3/envs/dl/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/local/miniconda3/envs/dl/lib -L/usr/local/miniconda3/envs/dl/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 build/temp.linux-x86_64-3.6/src/nms_cpu.o -L/usr/local/cuda/lib64 -lcudart -o build/lib.linux-x86_64-3.6/nms_cpu.cpython-36m-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-3.6/nms_cuda.cpython-36m-x86_64-linux-gnu.so ->
copying build/lib.linux-x86_64-3.6/nms_cpu.cpython-36m-x86_64-linux-gnu.so ->
Building dcn...
running build_ext
/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/utils/cpp_extension.py:166: UserWarning:
!! WARNING !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++) is not compatible with the compiler Pytorch was
built with for this platform, which is g++ on linux. Please
use g++ to to compile your extension. Alternatively, you may
compile PyTorch from source using /usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++, and then you can also use
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++ to compile your extension.
See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help
with compiling PyTorch from source.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! WARNING !!
platform=sys.platform))
building 'deform_conv_cuda' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-cc -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -fPIC -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/TH -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/local/miniconda3/envs/dl/include/python3.6m -c src/deform_conv_cuda.cpp -o build/temp.linux-x86_64-3.6/src/deform_conv_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=deform_conv_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
/usr/local/cuda/bin/nvcc -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/TH -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/local/miniconda3/envs/dl/include/python3.6m -c src/deform_conv_cuda_kernel.cu -o build/temp.linux-x86_64-3.6/src/deform_conv_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=deform_conv_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
creating build/lib.linux-x86_64-3.6
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++ -pthread -shared -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/local/miniconda3/envs/dl/lib -L/usr/local/miniconda3/envs/dl/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/local/miniconda3/envs/dl/lib -L/usr/local/miniconda3/envs/dl/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 build/temp.linux-x86_64-3.6/src/deform_conv_cuda.o build/temp.linux-x86_64-3.6/src/deform_conv_cuda_kernel.o -L/usr/local/cuda/lib64 -lcudart -o build/lib.linux-x86_64-3.6/deform_conv_cuda.cpython-36m-x86_64-linux-gnu.so
building 'deform_pool_cuda' extension
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-cc -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -fPIC -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/TH -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/local/miniconda3/envs/dl/include/python3.6m -c src/deform_pool_cuda.cpp -o build/temp.linux-x86_64-3.6/src/deform_pool_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=deform_pool_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
/usr/local/cuda/bin/nvcc -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/TH -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/local/miniconda3/envs/dl/include/python3.6m -c src/deform_pool_cuda_kernel.cu -o build/temp.linux-x86_64-3.6/src/deform_pool_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=deform_pool_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++ -pthread -shared -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/local/miniconda3/envs/dl/lib -L/usr/local/miniconda3/envs/dl/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/local/miniconda3/envs/dl/lib -L/usr/local/miniconda3/envs/dl/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 build/temp.linux-x86_64-3.6/src/deform_pool_cuda.o build/temp.linux-x86_64-3.6/src/deform_pool_cuda_kernel.o -L/usr/local/cuda/lib64 -lcudart -o build/lib.linux-x86_64-3.6/deform_pool_cuda.cpython-36m-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-3.6/deform_conv_cuda.cpython-36m-x86_64-linux-gnu.so ->
copying build/lib.linux-x86_64-3.6/deform_pool_cuda.cpython-36m-x86_64-linux-gnu.so ->
Building sigmoid focal loss op...
running build_ext
/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/utils/cpp_extension.py:166: UserWarning:
!! WARNING !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++) is not compatible with the compiler Pytorch was
built with for this platform, which is g++ on linux. Please
use g++ to to compile your extension. Alternatively, you may
compile PyTorch from source using /usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++, and then you can also use
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++ to compile your extension.
See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help
with compiling PyTorch from source.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! WARNING !!
platform=sys.platform))
building 'sigmoid_focal_loss_cuda' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-cc -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -fPIC -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/TH -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/local/miniconda3/envs/dl/include/python3.6m -c src/sigmoid_focal_loss.cpp -o build/temp.linux-x86_64-3.6/src/sigmoid_focal_loss.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=sigmoid_focal_loss_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
src/sigmoid_focal_loss.cpp: In function 'at::Tensor SigmoidFocalLoss_forward(const at::Tensor&, const at::Tensor&, int, float, float)':
src/sigmoid_focal_loss.cpp:25:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
src/sigmoid_focal_loss.cpp: In function 'at::Tensor SigmoidFocalLoss_backward(const at::Tensor&, const at::Tensor&, const at::Tensor&, int, float, float)':
src/sigmoid_focal_loss.cpp:36:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
/usr/local/cuda/bin/nvcc -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/TH -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/local/miniconda3/envs/dl/include/python3.6m -c src/sigmoid_focal_loss_cuda.cu -o build/temp.linux-x86_64-3.6/src/sigmoid_focal_loss_cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=sigmoid_focal_loss_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
creating build/lib.linux-x86_64-3.6
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++ -pthread -shared -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/local/miniconda3/envs/dl/lib -L/usr/local/miniconda3/envs/dl/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/local/miniconda3/envs/dl/lib -L/usr/local/miniconda3/envs/dl/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 build/temp.linux-x86_64-3.6/src/sigmoid_focal_loss.o build/temp.linux-x86_64-3.6/src/sigmoid_focal_loss_cuda.o -L/usr/local/cuda/lib64 -lcudart -o build/lib.linux-x86_64-3.6/sigmoid_focal_loss_cuda.cpython-36m-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-3.6/sigmoid_focal_loss_cuda.cpython-36m-x86_64-linux-gnu.so ->
Building masked conv op...
running build_ext
/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/utils/cpp_extension.py:166: UserWarning:
!! WARNING !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++) is not compatible with the compiler Pytorch was
built with for this platform, which is g++ on linux. Please
use g++ to to compile your extension. Alternatively, you may
compile PyTorch from source using /usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++, and then you can also use
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++ to compile your extension.
See https://github.com/pytorch/pytorch/blob/master/CONTRIBUTING.md for help
with compiling PyTorch from source.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! WARNING !!
platform=sys.platform))
building 'masked_conv2d_cuda' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-cc -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -fPIC -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/TH -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/local/miniconda3/envs/dl/include/python3.6m -c src/masked_conv2d_cuda.cpp -o build/temp.linux-x86_64-3.6/src/masked_conv2d_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=masked_conv2d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
/usr/local/cuda/bin/nvcc -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/TH -I/usr/local/miniconda3/envs/dl/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/local/miniconda3/envs/dl/include/python3.6m -c src/masked_conv2d_kernel.cu -o build/temp.linux-x86_64-3.6/src/masked_conv2d_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=masked_conv2d_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
creating build/lib.linux-x86_64-3.6
/usr/local/miniconda3/envs/dl/bin/x86_64-conda_cos6-linux-gnu-c++ -pthread -shared -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/local/miniconda3/envs/dl/lib -L/usr/local/miniconda3/envs/dl/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-rpath,/usr/local/miniconda3/envs/dl/lib -L/usr/local/miniconda3/envs/dl/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 build/temp.linux-x86_64-3.6/src/masked_conv2d_cuda.o build/temp.linux-x86_64-3.6/src/masked_conv2d_kernel.o -L/usr/local/cuda/lib64 -lcudart -o build/lib.linux-x86_64-3.6/masked_conv2d_cuda.cpython-36m-x86_64-linux-gnu.so
copying build/lib.linux-x86_64-3.6/masked_conv2d_cuda.cpython-36m-x86_64-linux-gnu.so ->
(dl) root@1144ddd21420:~/mmdetection# python tools/train.py configs/mask_rcnn_r50_fpn_1x.py --gpus 1
Traceback (most recent call last):
File "tools/train.py", line 7, in
from mmdet.datasets import get_dataset
File "/root/mmdetection/mmdet/datasets/init.py", line 1, in
from .custom import CustomDataset
File "/root/mmdetection/mmdet/datasets/custom.py", line 11, in
from .extra_aug import ExtraAugmentation
File "/root/mmdetection/mmdet/datasets/extra_aug.py", line 5, in
from mmdet.core.evaluation.bbox_overlaps import bbox_overlaps
File "/root/mmdetection/mmdet/core/init.py", line 4, in
from .loss import * # noqa: F401, F403
File "/root/mmdetection/mmdet/core/loss/init.py", line 1, in
from .losses import (weighted_nll_loss, weighted_cross_entropy,
File "/root/mmdetection/mmdet/core/loss/losses.py", line 7, in
from ...ops import sigmoid_focal_loss
File "/root/mmdetection/mmdet/ops/init.py", line 1, in
from .dcn import (DeformConv, DeformConvPack, ModulatedDeformConv,
File "/root/mmdetection/mmdet/ops/dcn/init.py", line 1, in
from .functions.deform_conv import deform_conv, modulated_deform_conv
File "/root/mmdetection/mmdet/ops/dcn/functions/deform_conv.py", line 5, in
from .. import deform_conv_cuda
ImportError: /root/mmdetection/mmdet/ops/dcn/deform_conv_cuda.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN3c105ErrorC1ENS_14SourceLocationERKSs
This issue has been discussed many times in this codebase.
Actually, in most cases, we think this error is caused by the environmental inconsistent between compiling and training/testing. You should confirm whether the environment you run is exactly the same as the one you compile. The differences include but not limited to cuda version / torch version.
Please note that even an extra cuda tool in your conda env may cause this error.
This issue has been discussed many times in this codebase.
Actually, in most cases, we think this error is caused by the environmental inconsistent between compiling and training/testing. You should confirm whether the environment you run is exactly the same as the one you compile. The differences include but not limited to cuda version / torch version.
Please note that even an extra cuda tools in your conda env may cause this error.
Thanks
The error is caused by an extra cuda tools in my conda env.
My env installs two verisons CUDA
This issue has been discussed many times in this codebase.
Actually, in most cases, we think this error is caused by the environmental inconsistent between compiling and training/testing. You should confirm whether the environment you run is exactly the same as the one you compile. The differences include but not limited to cuda version / torch version.
Please note that even an extra cuda tools in your conda env may cause this error.Thanks
The error is caused by an extra cuda tools in my conda env.
My env installs two verisons CUDA
My env also installs two verisons CUDA, and i have the same problem, could you please tell me how can i solve it? thks so much
This issue has been discussed many times in this codebase.
Actually, in most cases, we think this error is caused by the environmental inconsistent between compiling and training/testing. You should confirm whether the environment you run is exactly the same as the one you compile. The differences include but not limited to cuda version / torch version.
Please note that even an extra cuda tools in your conda env may cause this error.Thanks
The error is caused by an extra cuda tools in my conda env.
My env installs two verisons CUDAMy env also installs two verisons CUDA, and i have the same problem, could you please tell me how can i solve it? thks so much
have you solve this? thanks !
Most helpful comment
My env also installs two verisons CUDA, and i have the same problem, could you please tell me how can i solve it? thks so much