vacancy / PreciseRoIPooling

Precise RoI Pooling with coordinate gradient support, proposed in the paper "Acquisition of Localization Confidence for Accurate Object Detection" (https://arxiv.org/abs/1807.11590).
MIT License
770 stars 152 forks source link

help! build error #58

Closed bebebe666 closed 3 years ago

bebebe666 commented 3 years ago

Hi, when I call the PreciseRoiPooling, and then build the library, meet some problems,

ubuntu18.04 cuda10.0 python3.6 pytorch1.1.0 gcc7 and the repo was git from the website

the following is the building error when I enter the ninja -v in the ninja build file directory How can I solve it,thank you

[1/3] /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=_prroi_pooling -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/bebebe/anaconda3/envs/pytracking2/lib/python3.6/site-packages/torch/include -isystem /home/bebebe/anaconda3/envs/pytracking2/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/bebebe/anaconda3/envs/pytracking2/lib/python3.6/site-packages/torch/include/TH -isystem /home/bebebe/anaconda3/envs/pytracking2/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /home/bebebe/anaconda3/envs/pytracking2/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --compiler-options '-fPIC' -std=c++11 -c /home/bebebe/tracking/new/new/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu_impl.cu -o prroi_pooling_gpu_impl.cuda.o FAILED: prroi_pooling_gpu_impl.cuda.o /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=_prroi_pooling -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/bebebe/anaconda3/envs/pytracking2/lib/python3.6/site-packages/torch/include -isystem /home/bebebe/anaconda3/envs/pytracking2/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/bebebe/anaconda3/envs/pytracking2/lib/python3.6/site-packages/torch/include/TH -isystem /home/bebebe/anaconda3/envs/pytracking2/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /home/bebebe/anaconda3/envs/pytracking2/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --compiler-options '-fPIC' -std=c++11 -c /home/bebebe/tracking/new/new/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu_impl.cu -o prroi_pooling_gpu_impl.cuda.o /home/bebebe/tracking/new/new/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu_impl.cu(1): error: expected a declaration

1 error detected in the compilation of "/tmp/tmpxft_00000aaf_00000000-6_prroi_pooling_gpu_impl.cpp1.ii". [2/3] c++ -MMD -MF prroi_pooling_gpu.o.d -DTORCH_EXTENSION_NAME=_prroi_pooling -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/bebebe/anaconda3/envs/pytracking2/lib/python3.6/site-packages/torch/include -isystem /home/bebebe/anaconda3/envs/pytracking2/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/bebebe/anaconda3/envs/pytracking2/lib/python3.6/site-packages/torch/include/TH -isystem /home/bebebe/anaconda3/envs/pytracking2/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /home/bebebe/anaconda3/envs/pytracking2/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/bebebe/tracking/new/new/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c -o prroi_pooling_gpu.o FAILED: prroi_pooling_gpu.o c++ -MMD -MF prroi_pooling_gpu.o.d -DTORCH_EXTENSION_NAME=_prroi_pooling -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/bebebe/anaconda3/envs/pytracking2/lib/python3.6/site-packages/torch/include -isystem /home/bebebe/anaconda3/envs/pytracking2/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/bebebe/anaconda3/envs/pytracking2/lib/python3.6/site-packages/torch/include/TH -isystem /home/bebebe/anaconda3/envs/pytracking2/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda/include -isystem /home/bebebe/anaconda3/envs/pytracking2/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/bebebe/tracking/new/new/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c -o prroi_pooling_gpu.o In file included from /home/bebebe/tracking/new/new/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c:19:0: /home/bebebe/tracking/new/new/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu_impl.cuh:1:1: error: expected unqualified-id before ‘.’ token ../../../src/prroi_pooling_gpu_impl.cuh ^ /home/bebebe/tracking/new/new/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c: In function ‘at::Tensor prroi_pooling_backward_cuda(const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, int, int, float)’: /home/bebebe/tracking/new/new/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c:66:5: error: ‘PrRoIPoolingBackwardGpu’ was not declared in this scope PrRoIPoolingBackwardGpu( ^~~~~~~ /home/bebebe/tracking/new/new/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c:66:5: note: suggested alternative: ‘prroi_pooling_backward_cuda’ PrRoIPoolingBackwardGpu( ^~~~~~~ prroi_pooling_backward_cuda /home/bebebe/tracking/new/new/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c: In function ‘at::Tensor prroi_pooling_coor_backward_cuda(const at::Tensor&, const at::Tensor&, const at::Tensor&, const at::Tensor&, int, int, float)’: /home/bebebe/tracking/new/new/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c:97:5: error: ‘PrRoIPoolingCoorBackwardGpu’ was not declared in this scope PrRoIPoolingCoorBackwardGpu( ^~~~~~~ /home/bebebe/tracking/new/new/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c:97:5: note: suggested alternative: ‘prroi_pooling_coor_backward_cuda’ PrRoIPoolingCoorBackwardGpu( ^~~~~~~ prroi_pooling_coor_backward_cuda /home/bebebe/tracking/new/new/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c: In function ‘void pybind11_init__prroi_pooling(pybind11::module&)’: /home/bebebe/tracking/new/new/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c:110:42: error: ‘prroi_pooling_forward_cuda’ was not declared in this scope m.def("prroi_pooling_forward_cuda", &prroi_pooling_forward_cuda, "PRRoIPooling_forward"); ^~~~~~ /home/bebebe/tracking/new/new/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c:110:42: note: suggested alternative: ‘prroi_pooling_backward_cuda’ m.def("prroi_pooling_forward_cuda", &prroi_pooling_forward_cuda, "PRRoIPooling_forward"); ^~~~~~ prroi_pooling_backward_cuda ninja: build stopped: subcommand failed.

vacancy commented 3 years ago

Please use the git clone tool to download the repo.

bebebe666 commented 3 years ago

thank you very much, I have already solve it. The problem is that the repo I use was copy from windows(use git clone to download), and it does not work. I try to git in ubuntu and then solve it! thank you

vacancy commented 3 years ago

Thanks for reporting. Putting up an updated note in the readme about windows git versions.