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

P3AFormer/DCNv2/_ext.cpython-38-x86_64-linux-gnu.so: undefined symbol: THPVariableClass #8

Open
WesLee88524 opened this issue Aug 20, 2022 · 5 comments

Comments

@WesLee88524
Copy link

Dear Zelin,
I compile DCN_v2 by using 'pip install -U torch==1.4 torchvision==0.5 -f https://download.pytorch.org/whl/cu101/torch_stable.html' as this url (CharlesShang/DCNv2#63) said.
And then I run 'bash configs/standard/v100_mot17_coco.sh',some errors accur like:

Traceback (most recent call last): File "main.py", line 13, in <module> import datasets File "/home/B/lyh/code/P3AFormer/datasets/__init__.py", line 2, in <module> from .detmot import build as build_e2e_mot File "/home/B/lyh/code/P3AFormer/datasets/detmot.py", line 23, in <module> from models.structures import Instances File "/home/B/lyh/code/P3AFormer/models/__init__.py", line 12, in <module> from .p3aformer.p3aformer import build as build_p3aformer File "/home/B/lyh/code/P3AFormer/models/p3aformer/p3aformer.py", line 13, in <module> from .p3aformer_dla import IDAUpV3 File "/home/B/lyh/code/P3AFormer/models/p3aformer/p3aformer_dla.py", line 14, in <module> from dcn_v2 import DCN File "/home/B/lyh/code/P3AFormer/DCNv2/dcn_v2.py", line 13, in <module> import _ext as _backend ImportError: /home/B/lyh/code/P3AFormer/DCNv2/_ext.cpython-38-x86_64-linux-gnu.so: undefined symbol: THPVariableClass

Do u have ever met?

@sjtuytc
Copy link
Contributor

sjtuytc commented Aug 20, 2022

I understand your issues and I think installing DCN v2 via pip is not possible currently. This is because the prebuilt dcn via pip is not compatible with your local CUDAs. As for your issue, you may refer to deformable detr repo for more details.

@WesLee88524
Copy link
Author

I understand your issues and I think installing DCN v2 via pip is not possible currently. This is because the prebuilt dcn via pip is not compatible with your local CUDAs. As for your issue, you may refer to deformable detr repo for more details.

I scan the Deformable-DETR here but there is no description about DCNv2.

@sjtuytc
Copy link
Contributor

sjtuytc commented Aug 20, 2022

It should be deformable cnn, not deformable detr. Sorry foe the confusion.

@sjtuytc
Copy link
Contributor

sjtuytc commented Aug 20, 2022

You may not find the exact issue but the problem here is clear that your lib versions are not compatible so you cannot import dcn v2. https://www.google.com/amp/s/varhowto.com/check-pytorch-cuda-version/%3Famp

@smart-face
Copy link

smart-face commented Sep 29, 2022

https://github.com/jinfagang/DCNv2_latest
Please use this and rebuild the code.
It worked in my case for newer PyTorch versions.

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

3 participants