faster-rcnn.pytorch
faster-rcnn.pytorch copied to clipboard
error: invalid redeclaration of type name "__half"
I received the error when I was running,
python setup.py build develop
running build
running build_py
running build_ext
building 'model._C' extension
gcc -pthread -B /cvdata/anaconda3/envs/krm2/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/cvdata/krm/PPG/faster-rcnn.pytorch/lib/model/csrc -I/cvdata/anaconda3/envs/krm2/lib/python3.7/site-packages/torch/lib/include -I/cvdata/anaconda3/envs/krm2/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/cvdata/anaconda3/envs/krm2/lib/python3.7/site-packages/torch/lib/include/TH -I/cvdata/anaconda3/envs/krm2/lib/python3.7/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/cvdata/anaconda3/envs/krm2/include/python3.7m -c /cvdata/krm/PPG/faster-rcnn.pytorch/lib/model/csrc/vision.cpp -o build/temp.linux-x86_64-3.7/cvdata/krm/PPG/faster-rcnn.pytorch/lib/model/csrc/vision.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -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++
gcc -pthread -B /cvdata/anaconda3/envs/krm2/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/cvdata/krm/PPG/faster-rcnn.pytorch/lib/model/csrc -I/cvdata/anaconda3/envs/krm2/lib/python3.7/site-packages/torch/lib/include -I/cvdata/anaconda3/envs/krm2/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/cvdata/anaconda3/envs/krm2/lib/python3.7/site-packages/torch/lib/include/TH -I/cvdata/anaconda3/envs/krm2/lib/python3.7/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/cvdata/anaconda3/envs/krm2/include/python3.7m -c /cvdata/krm/PPG/faster-rcnn.pytorch/lib/model/csrc/cpu/nms_cpu.cpp -o build/temp.linux-x86_64-3.7/cvdata/krm/PPG/faster-rcnn.pytorch/lib/model/csrc/cpu/nms_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -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++
gcc -pthread -B /cvdata/anaconda3/envs/krm2/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/cvdata/krm/PPG/faster-rcnn.pytorch/lib/model/csrc -I/cvdata/anaconda3/envs/krm2/lib/python3.7/site-packages/torch/lib/include -I/cvdata/anaconda3/envs/krm2/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/cvdata/anaconda3/envs/krm2/lib/python3.7/site-packages/torch/lib/include/TH -I/cvdata/anaconda3/envs/krm2/lib/python3.7/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/cvdata/anaconda3/envs/krm2/include/python3.7m -c /cvdata/krm/PPG/faster-rcnn.pytorch/lib/model/csrc/cpu/ROIAlign_cpu.cpp -o build/temp.linux-x86_64-3.7/cvdata/krm/PPG/faster-rcnn.pytorch/lib/model/csrc/cpu/ROIAlign_cpu.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -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 -DWITH_CUDA -I/cvdata/krm/PPG/faster-rcnn.pytorch/lib/model/csrc -I/cvdata/anaconda3/envs/krm2/lib/python3.7/site-packages/torch/lib/include -I/cvdata/anaconda3/envs/krm2/lib/python3.7/site-packages/torch/lib/include/torch/csrc/api/include -I/cvdata/anaconda3/envs/krm2/lib/python3.7/site-packages/torch/lib/include/TH -I/cvdata/anaconda3/envs/krm2/lib/python3.7/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/cvdata/anaconda3/envs/krm2/include/python3.7m -c /cvdata/krm/PPG/faster-rcnn.pytorch/lib/model/csrc/cuda/nms.cu -o build/temp.linux-x86_64-3.7/cvdata/krm/PPG/faster-rcnn.pytorch/lib/model/csrc/cuda/nms.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --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 -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
/usr/include/cuda_fp16.h(86): error: invalid redeclaration of type name "__half"
/usr/local/cuda/include/cuda_fp16.hpp(124): here
/usr/include/cuda_fp16.h(90): error: invalid redeclaration of type name "__half2"
/usr/local/cuda/include/cuda_fp16.hpp(224): here
/usr/include/cuda_fp16.h(93): error: invalid redeclaration of type name "half"
/usr/local/cuda/include/cuda_fp16.hpp(1793): here
/usr/include/cuda_fp16.h(94): error: invalid redeclaration of type name "half2"
/usr/local/cuda/include/cuda_fp16.hpp(1794): here
/usr/include/cuda_fp16.h(118): error: cannot overload functions distinguished by return type alone
/usr/include/cuda_fp16.h(139): error: cannot overload functions distinguished by return type alone
/usr/include/cuda_fp16.h(153): error: cannot overload functions distinguished by return type alone
/usr/include/cuda_fp16.h(167): error: cannot overload functions distinguished by return type alone
/usr/include/cuda_fp16.h(1001): error: cannot overload functions distinguished by return type alone
/usr/include/cuda_fp16.h(1013): error: cannot overload functions distinguished by return type alone
/usr/include/cuda_fp16.h(1021): error: cannot overload functions distinguished by return type alone
/usr/include/cuda_fp16.h(1030): error: cannot overload functions distinguished by return type alone
/usr/include/cuda_fp16.h(1032): error: no suitable user-defined conversion from "__half2" to "__half2" exists
13 errors detected in the compilation of "/cvdata/tmp//tmpxft_00006426_00000000-6_nms.cpp1.ii".
error: command '/usr/local/cuda/bin/nvcc' failed with exit status 1
Have you solved that? I meet the same problem as you.