megvii-model / YOLOF

MIT License
808 stars 115 forks source link

YOLOF/cvpods/_C.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _Z39tree_filter_refine_backward_edge_weightRKN2at6TensorES2_S2_S2_S2_S2_S2_S2_S2_ #24

Open sundaykingg opened 3 years ago

sundaykingg commented 3 years ago

when I run cd playground/detection/coco/yolof/yolof.res50.C5.1x pods_train --num-gpus 8 i get a problem: YOLOF/cvpods/_C.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _Z39tree_filter_refine_backward_edge_weightRKN2at6TensorES2_S2_S2_S2_S2_S2_S2S2 How should I solve it?

chensnathan commented 3 years ago

This may help you.

sundaykingg commented 3 years ago

This may help you.

my CUDA==11.1 and pytorch== 1.8.1+cu111 The problem is still not solved

chensnathan commented 3 years ago

You may provide more environmental details so that I can help.

sundaykingg commented 3 years ago

You may provide more environmental details so that I can help.

sorry i check my environmental that cuda and pytorch not match. when i reinstall cuda and torch,i found a new problem:

In file included from /home/hznu/.conda/envs/yolof/lib/python3.7/site-packages/torch/include/THC/THCGeneral.h:7:0, from /home/hznu/.conda/envs/yolof/lib/python3.7/site-packages/torch/include/THC/THC.h:4, from /home/hznu/mysoftware/pyproject/YOLOF/cvpods/layers/csrc/PSROIPool/psroi_pool_cuda.h:4, from /home/hznu/mysoftware/pyproject/YOLOF/cvpods/layers/csrc/vision.cpp:14: /home/hznu/.conda/envs/yolof/lib/python3.7/site-packages/torch/include/c10/cuda/CUDAStream.h:6:10: fatal error: cuda_runtime_api.h: No such file or directory

include

      ^~~~~~~~~~~~~~~~~~~~

compilation terminated. error: command 'gcc' failed with exit status 1

python:3.7 cuda:11.1 pytorch: 1.8.1+cu111 torchvision:0.9.1+cu111

i just run 'python setup.py develop'

tangjiuqi097 commented 3 years ago

This may help you.

my CUDA==11.1 and pytorch== 1.8.1+cu111 The problem is still not solved

Hi, could you try pytorch<1.8?

ghost commented 2 years ago

You may provide more environmental details so that I can help.

sorry i check my environmental that cuda and pytorch not match. when i reinstall cuda and torch,i found a new problem:

In file included from /home/hznu/.conda/envs/yolof/lib/python3.7/site-packages/torch/include/THC/THCGeneral.h:7:0, from /home/hznu/.conda/envs/yolof/lib/python3.7/site-packages/torch/include/THC/THC.h:4, from /home/hznu/mysoftware/pyproject/YOLOF/cvpods/layers/csrc/PSROIPool/psroi_pool_cuda.h:4, from /home/hznu/mysoftware/pyproject/YOLOF/cvpods/layers/csrc/vision.cpp:14: /home/hznu/.conda/envs/yolof/lib/python3.7/site-packages/torch/include/c10/cuda/CUDAStream.h:6:10: fatal error: cuda_runtime_api.h: No such file or directory #include ^~~~~~~~ compilation terminated. error: command 'gcc' failed with exit status 1

python:3.7 cuda:11.1 pytorch: 1.8.1+cu111 torchvision:0.9.1+cu111

i just run 'python setup.py develop'

Adding these paths to include_dirs in setup.py may solve your problem: include_dirs = [os.path.realpath('../include'), '/usr/local/cuda/include/']

However, you may still encounter a new problem when using even if you can successfully setup. Please use 'conda list | grep "cuda" ' to see if the version of conda's cudatoolkit is higer than that of cuda_driver_api(using 'nvidia-smi'), if so, that may be the reason.

BTW, I have also met this error: "YOLOF/cvpods/_C.cpython-37m-x86_64-linux-gnu.so: undefined symbol : Z39tree_filter_refine_backward_edge_weightRKN2at6TensorES2_S2_S2_S2_S2_S2_S2_S2", and solved it by matching versions of these components. I wrote down the steps in https://zhuanlan.zhihu.com/p/446495433, I hope this will help you.