Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use public kernels #38

Closed
Karim-53 opened this issue Jun 1, 2020 · 2 comments
Closed

Unable to use public kernels #38

Karim-53 opened this issue Jun 1, 2020 · 2 comments

Comments

@Karim-53
Copy link
Contributor

Karim-53 commented Jun 1, 2020

Dear reader,

I am unable to install this repo on a win10 machine (using these instructions)
and unable to install it on public kernels: Google Colab and the kernel provided by Kaggle.

Steps to Reproduce

  1. Open this jupyter notebook (link) with Google Colaboratory
  2. Activate the GPU (Edit -> parameter of the notebook -> ...)
  3. Run all cells
    Section "install PyTorch Detection (Scene-Graph-Benchmark.pytorch)" will not work

if the installation succeed the output should be

Installed /content/Scene
Processing dependencies for maskrcnn-benchmark==0.1
Finished processing dependencies for maskrcnn-benchmark==0.1

otherwise you can get:

RuntimeError: Error compiling objects for extension

Environment

PyTorch version: 1.5.0+cu101
Is debug build: No
CUDA used to build PyTorch: 10.1

OS: Ubuntu 18.04.3 LTS
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
CMake version: version 3.12.0

Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: 10.1.243
GPU models and configuration: GPU 0: Tesla P100-PCIE-16GB
Nvidia driver version: 418.67
cuDNN version: /usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5

Versions of relevant libraries:
[pip3] numpy==1.18.4
[pip3] torch==1.5.0+cu101
[pip3] torchsummary==1.5.1
[pip3] torchtext==0.3.1
[pip3] torchvision==0.6.0+cu101
[conda] Could not collect

Additional context

Surprisingly, the installation is successful if the used kernel is not equipped with a GPU, but it is useless.
If we compare pip freeze on a CPU kernel with a GPU kernel the difference is:
only in GPU: cupy-cuda101==6.5.0
only in CPU: -e git+https://github.com/KaihuaTang/Scene-Graph-Benchmark.pytorch.git@db02790a60bb9b9f7c270352820968b2f2089469#egg=maskrcnn_benchmark because the installation was successful
Therefore, I strongly think that this cannot be solved by installing another version of a certain package, but who knows...

Thank you for your help. Once this would be fixed I hope we can provide a public Jupiter notebook that anyone can run directly and use online.

@KaihuaTang
Copy link
Owner

Maybe the original maskrcnn-benchmark guidance can help. It contains the win10 environment installation.
https://github.com/facebookresearch/maskrcnn-benchmark/blob/master/INSTALL.md

@Karim-53
Copy link
Contributor Author

Karim-53 commented Jun 4, 2020

Thanks for the hint ! This solved the problem for Google colab

Execute this python code after cloning this repo and before installing it.

def line_prepender(filename, line):
    with open(filename, 'r+') as f:
        content = f.read()
        f.seek(0, 0)
        f.write(line.rstrip('\r\n') + '\n' + content)

file1 = r"/content/Scene-Graph-Benchmark/maskrcnn_benchmark/csrc/cuda/deform_conv_cuda.cu"
file2 = r"/content/Scene-Graph-Benchmark/maskrcnn_benchmark/csrc/cuda/deform_pool_cuda.cu"

to_add = """#ifndef AT_CHECK
#define AT_CHECK TORCH_CHECK 
#endif"""

line_prepender(filename=file1, line=to_add)
line_prepender(filename=file2, line=to_add)

I will soon suggest a Pull request to fix this

Karim-53 added a commit to Karim-53/Scene-Graph-Benchmark.pytorch that referenced this issue Jul 18, 2020
Karim-53 added a commit to Karim-53/Scene-Graph-Benchmark.pytorch that referenced this issue Jul 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants