Repository navigation
Does this work for 0.4.1 / how to install? #12
Description
Activity
I get the following compile error when running
./travis.sh.conda/envs/pt0.4/lib/python3.7/site-packages/torch/utils/ffi/../../lib/include/THC/THCGeneral.h:12:10: fatal error: cuda.h: No such file or directory #include "cuda.h"Nevermind, got it to compile by symlinking the include files from my cuda install location.
ln -s /opt/cuda/include/* ~/.conda/envs/pt0.4/lib/python3.7/site-packages/torch/utils/ffi/../../lib/include/THC/I now get this error in python after running travis.sh:
>>> from prroi_pool import PrRoIPool2D Traceback (most recent call last): File "/home/user/Development/PreciseRoIPooling-master/pytorch/prroi_pool/functional.py", line 16, in <module> from . import _prroi_pooling File "/home/user/Development/PreciseRoIPooling-master/pytorch/prroi_pool/_prroi_pooling/__init__.py", line 3, in <module> from .__prroi_pooling import lib as _lib, ffi as _ffi ImportError: /home/user/Development/PreciseRoIPooling-master/pytorch/prroi_pool/_prroi_pooling/__prroi_pooling.so: undefined symbol: __cudaPopCallConfiguration During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/user/Development/PreciseRoIPooling-master/pytorch/prroi_pool/__init__.py", line 12, in <module> from .prroi_pool import * File "/home/user/Development/PreciseRoIPooling-master/pytorch/prroi_pool/prroi_pool.py", line 14, in <module> from .functional import prroi_pool2d File "/home/user/Development/PreciseRoIPooling-master/pytorch/prroi_pool/functional.py", line 18, in <module> raise ImportError('Can not found the compiled Precise RoI Pooling library. Run ./travis.sh in the directory first.') ImportError: Can not found the compiled Precise RoI Pooling library. Run ./travis.sh in the directory first.- changed the title
[-]Does this work for 0.4.1?[/-][+]Does this work for 0.4.1 / How to Install?[/+]on Dec 3, 2018 - changed the title
[-]Does this work for 0.4.1 / How to Install?[/-][+]Does this work for 0.4.1 / how to install?[/+]on Dec 3, 2018 Hi Andrew. I think this is not a problem with pytorch but your cuda installation. Could you please check if the version of your cuda runtime libraries matches the compile-time headers/libraries?
I also encountered the same problem, I don't know if this is a common problem.
ImportError: /home/user/Development/PreciseRoIPooling-master/pytorch/prroi_pool/_prroi_pooling/__prroi_pooling.so: undefined symbol: __cudaPopCallConfiguration>
I don't know how to solve this problem.Hi,I can't compile this library , could you give me some advice about this?
Creating extension directory /tmp/torch_extensions/prroi_pooling...
Detected CUDA files, patching ldflags
Emitting ninja build file /tmp/torch_extensions/prroi_pooling/build.ninja...
Building extension module prroi_pooling...
[1/3] /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=prroi_pooling -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include/TH -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /home/ning/miniconda3/envs/ATOM/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -std=c++11 -c /home/ning/code/atom/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu_impl.cu -o prroi_pooling_gpu_impl.cuda.o
[2/3] c++ -MMD -MF prroi_pooling_gpu.o.d -DTORCH_EXTENSION_NAME=_prroi_pooling -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include/TH -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /home/ning/miniconda3/envs/ATOM/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/ning/code/atom/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c -o prroi_pooling_gpu.o
[3/3] c++ prroi_pooling_gpu.o prroi_pooling_gpu_impl.cuda.o -shared -L/usr/local/cuda/lib64 -lcudart -o _prroi_pooling.so
Loading extension module _prroi_pooling...
Can not compile Precise RoI Pooling library.
DoneHi @DeepBrainsMe This looks like a cuda setup problem. Can you go to https://github.com/vacancy/PreciseRoIPooling/blob/master/pytorch/prroi_pool/functional.py#L24-L25 and see why an ImportError is raised?
- Thanks for your answer, I have compiled it just now ,however a new bug arise.The GPU Don't execute .My GPU is 2080ti。GPU driver is 418,cuda9。请问这个prpooling程序对显卡有特殊的要求么?我怀疑是不是我的显卡版本问题。另外使用的是虚拟环境下的pytorch 0.4.1。 发自我的iPhone…------------------ Original ------------------ From: Jiayuan Mao <notifications@github.com> Date: Fri,Apr 26,2019 3:18 AM To: vacancy/PreciseRoIPooling <PreciseRoIPooling@noreply.github.com> Cc: Jesse Wang <1098069058@qq.com>, Mention <mention@noreply.github.com> Subject: Re: [vacancy/PreciseRoIPooling] Does this work for 0.4.1 / how to install? (#12) Hi @DeepBrainsMe This looks like a cuda setup problem. Can you go to https://github.com/vacancy/PreciseRoIPooling/blob/master/pytorch/prroi_pool/functional.py#L24-L25 and see why an ImportError is raised? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Hi @DeepBrainsMe It seems that this is a bug with other functions you are using in your code. Perhaps this issue is related? facebookresearch/Detectron#260
Also, can you run a small script to test whether the PrRoIPooling are working? Here is a small snippet:
pool = PrRoIPool2D(2, 2, spatial_scale=0.5) features = torch.rand((4, 2, 24, 32)).cuda() rois = torch.tensor([ [0, 0, 0, 4, 4], [1, 14, 14, 18, 18], ]).float().cuda() features.requires_grad = rois.requires_grad = True out = pool(features, rois) loss = out.sum() loss.backward()Hi, @DeepBrainsMe @vacancy I meet some problem when I compile this library.It seems that there is something wrong using Ninja-build. Could you give me some advice. Thanks.
[1/3] /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=prroi_pooling -DTORCH_API_INCLUDE_EXTENSION_H -isystem ....... -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS_ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -std=c++11 -c /../PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu_impl.cu -o prroi_pooling_gpu_impl.cuda.o
FAILED: prroi_pooling_gpu_impl.cuda.o
error: expected a declaration
1 error detected in the compilation of "/tmp/tmpxft_0000becb_00000000-6_prroi_pooling_gpu_impl.cpp1.ii".
......
......
ninja: build stopped: subcommand failed.
Error building extension '_prroi_pooling'
DoneReacted by 20143698lhyHi, @DeepBrainsMe @vacancy I meet some problem when I compile this library.It seems that there is something wrong using Ninja-build. Could you give me some advice. Thanks.
[1/3] /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=prroi_pooling -DTORCH_API_INCLUDE_EXTENSION_H -isystem ....... -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS_ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -std=c++11 -c /../PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu_impl.cu -o prroi_pooling_gpu_impl.cuda.o
FAILED: prroi_pooling_gpu_impl.cuda.o
error: expected a declaration
1 error detected in the compilation of "/tmp/tmpxft_0000becb_00000000-6_prroi_pooling_gpu_impl.cpp1.ii".
......
......
ninja: build stopped: subcommand failed.
Error building extension '_prroi_pooling'
DoneI meet the same issue with you , my issue is following:
prroi_pooling_gpu_impl.cu(1): error: expected a declaration
1 error detected in the compilation of "/tmp/tmpxft_00001823_00000000-6_prroi_pooling_gpu_impl.cpp1.ii".my environment of CUDA and NVCC is ok
can you give me some advices? thanksHow do you slove the first problem? I have the same problem with you. Thank you. @DeepBrainsMe
Detected CUDA files, patching ldflags
Emitting ninja build file /tmp/torch_extensions/prroi_pooling/build.ninja...
Building extension module prroi_pooling...
[1/3] /home/haodongze/tools/cuda-9.0/bin/nvcc -DTORCH_EXTENSION_NAME=prroi_pooling -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/haodongze/.local/lib/python3.6/site-packages/torch/include -isystem /home/haodongze/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/haodongze/.local/lib/python3.6/site-packages/torch/include/TH -isystem /home/haodongze/.local/lib/python3.6/site-packages/torch/include/THC -isystem /home/haodongze/tools/cuda-9.0/include -isystem /home/haodongze/.conda/envs/pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS_ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -std=c++11 -c /home/haodongze/tracking/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
/home/haodongze/tools/cuda-9.0/bin/nvcc -DTORCH_EXTENSION_NAME=prroi_pooling -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/haodongze/.local/lib/python3.6/site-packages/torch/include -isystem /home/haodongze/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/haodongze/.local/lib/python3.6/site-packages/torch/include/TH -isystem /home/haodongze/.local/lib/python3.6/site-packages/torch/include/THC -isystem /home/haodongze/tools/cuda-9.0/include -isystem /home/haodongze/.conda/envs/pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS_ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -std=c++11 -c /home/haodongze/tracking/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu_impl.cu -o prroi_pooling_gpu_impl.cuda.o
/bin/sh: 1: /home/haodongze/tools/cuda-9.0/bin/nvcc: not found
[2/3] c++ -MMD -MF prroi_pooling_gpu.o.d -DTORCH_EXTENSION_NAME=_prroi_pooling -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/haodongze/.local/lib/python3.6/site-packages/torch/include -isystem /home/haodongze/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/haodongze/.local/lib/python3.6/site-packages/torch/include/TH -isystem /home/haodongze/.local/lib/python3.6/site-packages/torch/include/THC -isystem /home/haodongze/tools/cuda-9.0/include -isystem /home/haodongze/.conda/envs/pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/haodongze/tracking/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/haodongze/.local/lib/python3.6/site-packages/torch/include -isystem /home/haodongze/.local/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/haodongze/.local/lib/python3.6/site-packages/torch/include/TH -isystem /home/haodongze/.local/lib/python3.6/site-packages/torch/include/THC -isystem /home/haodongze/tools/cuda-9.0/include -isystem /home/haodongze/.conda/envs/pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/haodongze/tracking/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c -o prroi_pooling_gpu.o
In file included from /home/haodongze/.local/lib/python3.6/site-packages/torch/include/ATen/cuda/CUDAContext.h:5:0,
from /home/haodongze/tracking/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c:15:
/home/haodongze/.local/lib/python3.6/site-packages/torch/include/c10/cuda/CUDAStream.h:6:10: 致命错误:cuda_runtime_api.h:没有那个文件或目录
请问怎么解决这个问题Hi,I can't compile this library , could you give me some advice about this?
Creating extension directory /tmp/torch_extensions/prroi_pooling... Detected CUDA files, patching ldflags Emitting ninja build file /tmp/torch_extensions/prroi_pooling/build.ninja... Building extension module prroi_pooling... [1/3] /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=prroi_pooling -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include/TH -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /home/ning/miniconda3/envs/ATOM/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -std=c++11 -c /home/ning/code/atom/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu_impl.cu -o prroi_pooling_gpu_impl.cuda.o
[2/3] c++ -MMD -MF prroi_pooling_gpu.o.d -DTORCH_EXTENSION_NAME=_prroi_pooling -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include/TH -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /home/ning/miniconda3/envs/ATOM/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/ning/code/atom/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c -o prroi_pooling_gpu.o
[3/3] c++ prroi_pooling_gpu.o prroi_pooling_gpu_impl.cuda.o -shared -L/usr/local/cuda/lib64 -lcudart -o _prroi_pooling.so
Loading extension module _prroi_pooling...
Can not compile Precise RoI Pooling library.
DoneHow do you slove the first problem?@DeepBrainsMe ,thanks
- For this question ,you can contact me with e-mail 1098069058@qq.com 发自我的iPhone…------------------ Original ------------------ From: Manguotree <notifications@github.com> Date: Sat,Oct 19,2019 3:55 PM To: vacancy/PreciseRoIPooling <PreciseRoIPooling@noreply.github.com> Cc: Jesse Wang <1098069058@qq.com>, Mention <mention@noreply.github.com> Subject: Re: [vacancy/PreciseRoIPooling] Does this work for 0.4.1 / how to install? (#12) Hi,I can't compile this library , could you give me some advice about this? Creating extension directory /tmp/torch_extensions/prroi_pooling... Detected CUDA files, patching ldflags Emitting ninja build file /tmp/torch_extensions/prroi_pooling/build.ninja... Building extension module prroi_pooling... [1/3] /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=prroi_pooling -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include/TH -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /home/ning/miniconda3/envs/ATOM/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -D__CUDA_NO_HALF_OPERATORS -D__CUDA_NO_HALF_CONVERSIONS -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -std=c++11 -c /home/ning/code/atom/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu_impl.cu -o prroi_pooling_gpu_impl.cuda.o [2/3] c++ -MMD -MF prroi_pooling_gpu.o.d -DTORCH_EXTENSION_NAME=_prroi_pooling -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include/TH -isystem /home/ning/miniconda3/envs/ATOM/lib/python3.6/site-packages/torch/lib/include/THC -isystem /usr/local/cuda/include -isystem /home/ning/miniconda3/envs/ATOM/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/ning/code/atom/pytracking/ltr/external/PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c -o prroi_pooling_gpu.o [3/3] c++ prroi_pooling_gpu.o prroi_pooling_gpu_impl.cuda.o -shared -L/usr/local/cuda/lib64 -lcudart -o _prroi_pooling.so Loading extension module _prroi_pooling... Can not compile Precise RoI Pooling library. Done How do you slove the first problem? thank!!! — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
Hi,I can't compile this library , could you give me some advice about this? thank you
myemail :37913772@qq.com
python run_tracker.py dimp dimp50 --dataset otb --sequence Basketball
Evaluating 1 trackers on 1 sequences
Tracker: dimp dimp50 None , Sequence: Basketball
/home/zzy/anaconda3/lib/python3.7/site-packages/torch/nn/functional.py:2479: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode))
Using /tmp/torch_extensions as PyTorch extensions root...
Command '['which', 'c++']' returned non-zero exit status 1.
Done
Just checking if this works with PT 0.4.1 as well, because the README only specifies 0.4. I ask because I noticed the PyTorch 0.4.1 release tag includes "Breaking changes". Thanks!