Skip to content

Does this work for 0.4.1 / how to install? #12

Description

@andrewjong

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!

Activity

  1. andrewjong commented on Dec 3, 2018

    @andrewjong
    Author

    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"
    
  2. andrewjong commented on Dec 3, 2018

    @andrewjong
    Author

    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/
    
  3. andrewjong commented on Dec 3, 2018

    @andrewjong
    Author

    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.
    
  4. changed the title [-]Does this work for 0.4.1?[/-] [+]Does this work for 0.4.1 / How to Install?[/+] on Dec 3, 2018
  5. 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
  6. vacancy commented on Dec 29, 2018

    @vacancy
    Owner

    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?

  7. lianxintao commented on Jan 22, 2019

    @lianxintao

    I also encountered the same problem, I don't know if this is a common problem.

  8. lianxintao commented on Jan 22, 2019

    @lianxintao

    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.

  9. deepbrainme commented on Apr 25, 2019

    @deepbrainme

    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

  10. vacancy commented on Apr 25, 2019

    @vacancy
    Owner

    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?

  11. deepbrainme commented on Apr 26, 2019

    @deepbrainme
  12. vacancy commented on Apr 26, 2019

    @vacancy
    Owner

    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()
    
  13. Hevans123 commented on May 14, 2019

    @Hevans123

    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'
    Done

  14. 20143698lhy commented on Jul 11, 2019

    @20143698lhy

    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'
    Done

    I 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? thanks

    @vacancy

  15. QIQIVTrackingY commented on Aug 12, 2019

    @QIQIVTrackingY

    How do you slove the first problem? I have the same problem with you. Thank you. @DeepBrainsMe

  16. haodongze commented on Sep 27, 2019

    @haodongze

    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:没有那个文件或目录
    请问怎么解决这个问题

  17. Manguotree commented on Oct 19, 2019

    @Manguotree

    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?@DeepBrainsMe ,thanks

  18. deepbrainme commented on Oct 19, 2019

    @deepbrainme
  19. aqqw2000 commented on Feb 29, 2020

    @aqqw2000

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions