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

deform_conv_cuda ImportError #583

Closed
starry-xin opened this issue May 22, 2020 · 13 comments
Closed

deform_conv_cuda ImportError #583

starry-xin opened this issue May 22, 2020 · 13 comments

Comments

@starry-xin
Copy link

Is there a requirement for the CUDA version?
ImportError happens when I run the demo:

$ ./scripts/inference.sh configs/coco/resnet/256x192_res50_lr1e-3_1x.yaml pretrained_models/simple_res50_256x192.pth ./data/1.mp4
++ CONFIG=configs/coco/resnet/256x192_res50_lr1e-3_1x.yaml
++ CKPT=pretrained_models/simple_res50_256x192.pth
++ VIDEO=./data/1.mp4
++ OUTDIR=./examples/res
++ python scripts/demo_inference.py --cfg configs/coco/resnet/256x192_res50_lr1e-3_1x.yaml --checkpoint pretrained_models/simple_res50_256x192.pth --video ./data/1.mp4 --outdir ./examples/res --detector yolo --save_img --save_video
Traceback (most recent call last):
  File "scripts/demo_inference.py", line 13, in <module>
    from alphapose.models import builder
  File "/home/tianxin/AlphaPose/alphapose/models/__init__.py", line 1, in <module>
    from .fastpose import FastPose
  File "/home/tianxin/AlphaPose/alphapose/models/fastpose.py", line 10, in <module>
    from .layers.SE_Resnet import SEResnet
  File "/home/tianxin/AlphaPose/alphapose/models/layers/SE_Resnet.py", line 9, in <module>
    from .dcn import DeformConv, ModulatedDeformConv
  File "/home/tianxin/AlphaPose/alphapose/models/layers/dcn/__init__.py", line 1, in <module>
    from .deform_conv import (DeformConv, DeformConvPack, ModulatedDeformConv,
  File "/home/tianxin/AlphaPose/alphapose/models/layers/dcn/deform_conv.py", line 9, in <module>
    from . import deform_conv_cuda
ImportError: /home/tianxin/AlphaPose/alphapose/models/layers/dcn/deform_conv_cuda.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN2at7getTypeERKNS_6TensorE

Current environment:
pytorch==1.2.0
torchvision==0.4.0
cudatoolkit=9.2

@Fang-Haoshu
Copy link
Member

Hi, I think it should work with this cuda version. It's pretty weird. Maybe you can google related errors.

@Fang-Haoshu
Copy link
Member

Would it be related to GCC version? What is the GCC version. You may want to check this link:
facebookresearch/maskrcnn-benchmark#25

@Fang-Haoshu Fang-Haoshu reopened this May 24, 2020
@GuoHaiYang123
Copy link

I have already tried, and this error will still appear on the gcc5.4which version<6.0 @Fang-Haoshu @starry-xin

@starry-xin
Copy link
Author

The GCC version is 4.9.3 now, and I will check and try to update it. Thanks!

@IMBINGO95
Copy link

IMBINGO95 commented May 31, 2020

I met this problem too! But I dont kown how to solve it.
Current environment:
pytorch==1.1.0
torchvision==0.3.0
cudatoolkit=10.0
gcc==4.9.3
@Fang-Haoshu

@Fang-Haoshu
Copy link
Member

@IMBINGO95 How about using GCC5.4?

@IMBINGO95
Copy link

@IMBINGO95 How about using GCC5.4?

I tried on another machine with the same environment except gcc==5.4 ,but it failed again !
I don't konw why .

@IMBINGO95
Copy link

Is there a requirement for the CUDA version?
ImportError happens when I run the demo:

$ ./scripts/inference.sh configs/coco/resnet/256x192_res50_lr1e-3_1x.yaml pretrained_models/simple_res50_256x192.pth ./data/1.mp4
++ CONFIG=configs/coco/resnet/256x192_res50_lr1e-3_1x.yaml
++ CKPT=pretrained_models/simple_res50_256x192.pth
++ VIDEO=./data/1.mp4
++ OUTDIR=./examples/res
++ python scripts/demo_inference.py --cfg configs/coco/resnet/256x192_res50_lr1e-3_1x.yaml --checkpoint pretrained_models/simple_res50_256x192.pth --video ./data/1.mp4 --outdir ./examples/res --detector yolo --save_img --save_video
Traceback (most recent call last):
  File "scripts/demo_inference.py", line 13, in <module>
    from alphapose.models import builder
  File "/home/tianxin/AlphaPose/alphapose/models/__init__.py", line 1, in <module>
    from .fastpose import FastPose
  File "/home/tianxin/AlphaPose/alphapose/models/fastpose.py", line 10, in <module>
    from .layers.SE_Resnet import SEResnet
  File "/home/tianxin/AlphaPose/alphapose/models/layers/SE_Resnet.py", line 9, in <module>
    from .dcn import DeformConv, ModulatedDeformConv
  File "/home/tianxin/AlphaPose/alphapose/models/layers/dcn/__init__.py", line 1, in <module>
    from .deform_conv import (DeformConv, DeformConvPack, ModulatedDeformConv,
  File "/home/tianxin/AlphaPose/alphapose/models/layers/dcn/deform_conv.py", line 9, in <module>
    from . import deform_conv_cuda
ImportError: /home/tianxin/AlphaPose/alphapose/models/layers/dcn/deform_conv_cuda.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN2at7getTypeERKNS_6TensorE

Current environment:
pytorch==1.2.0
torchvision==0.4.0
cudatoolkit=9.2

Have you solved the probem? If you did, can you tell me how to solve it ? Please, thank you very much!

@starry-xin
Copy link
Author

starry-xin commented Jun 10, 2020

solve

I change the environment into pytorch==1.1.0, torchvision==0.3.0, cudatoolkit=10.0 and install cuda==10.0 instead of cuda==9.2 which have existed in system. Then the error disappeared.
And my GCC version is 4.9.3, which seems feasible. @IMBINGO95

@starry-xin
Copy link
Author

The GCC version is 4.9.3 now, and I will check and try to update it. Thanks!

It dosen't seem to matter.

@Fang-Haoshu
Copy link
Member

I see, thanks! @starry-xin

@RSKothari
Copy link

So is the solution to move to CUDA 10?

@starry-xin
Copy link
Author

So is the solution to move to CUDA 10?

I guess so in the environment required.

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

5 participants