UniAD icon indicating copy to clipboard operation
UniAD copied to clipboard

ImportError:undefined symbol: _ZNK2at10TensorBase8data_ptrIdEEPT_v

Open Christinepan881 opened this issue 1 year ago • 2 comments

Hello, thanks for your great work!

When I run the evaluation example using the provided command, it raises the following error:

Traceback (most recent call last): File "./tools/test.py", line 14, in from mmdet3d.apis import single_gpu_test File "/home/xxx/.conda/envs/uniad/lib/python3.8/site-packages/mmdet3d-0.17.1-py3.8-linux-x86_64.egg/mmdet3d/apis/init.py", line 2, in from .inference import (convert_SyncBN, inference_detector, File "/home/xxx/.conda/envs/uniad/lib/python3.8/site-packages/mmdet3d-0.17.1-py3.8-linux-x86_64.egg/mmdet3d/apis/inference.py", line 11, in from mmdet3d.core import (Box3DMode, CameraInstance3DBoxes, File "/home/xxx/.conda/envs/uniad/lib/python3.8/site-packages/mmdet3d-0.17.1-py3.8-linux-x86_64.egg/mmdet3d/core/init.py", line 2, in from .anchor import * # noqa: F401, F403 File "/home/xxx/.conda/envs/uniad/lib/python3.8/site-packages/mmdet3d-0.17.1-py3.8-linux-x86_64.egg/mmdet3d/core/anchor/init.py", line 2, in from mmdet.core.anchor import build_prior_generator File "/home/xxx/.conda/envs/uniad/lib/python3.8/site-packages/mmdet/core/init.py", line 2, in from .bbox import * # noqa: F401, F403 File "/home/xxx/.conda/envs/uniad/lib/python3.8/site-packages/mmdet/core/bbox/init.py", line 7, in from .samplers import (BaseSampler, CombinedSampler, File "/home/xxx/.conda/envs/uniad/lib/python3.8/site-packages/mmdet/core/bbox/samplers/init.py", line 9, in from .score_hlr_sampler import ScoreHLRSampler File "/home/xxx/.conda/envs/uniad/lib/python3.8/site-packages/mmdet/core/bbox/samplers/score_hlr_sampler.py", line 2, in from mmcv.ops import nms_match File "/home/xxx/.conda/envs/uniad/lib/python3.8/site-packages/mmcv/ops/init.py", line 2, in from .assign_score_withk import assign_score_withk File "/home/xxx/.conda/envs/uniad/lib/python3.8/site-packages/mmcv/ops/assign_score_withk.py", line 5, in ext_module = ext_loader.load_ext( File "/home/xxx/.conda/envs/uniad/lib/python3.8/site-packages/mmcv/utils/ext_loader.py", line 13, in load_ext ext = importlib.import_module('mmcv.' + name) File "/home/xxx/.conda/envs/uniad/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: /home/xxx/.conda/envs/uniad/lib/python3.8/site-packages/mmcv/_ext.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZNK2at10TensorBase8data_ptrIdEEPT_v

Below are my installed packages and versions: absl-py 1.4.0 addict 2.4.0 aiohttp 3.8.4 aiosignal 1.3.1 anyio 3.7.0 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 arrow 1.2.3 asttokens 2.2.1 async-timeout 4.0.2 attrs 23.1.0 backcall 0.2.0 beautifulsoup4 4.12.2 black 23.3.0 bleach 6.0.0 cachetools 5.3.1 casadi 3.5.5 certifi 2023.5.7 cffi 1.15.1 charset-normalizer 3.1.0 click 8.1.3 comm 0.1.3 contourpy 1.1.0 cycler 0.11.0 debugpy 1.6.7 decorator 5.1.1 defusedxml 0.7.1 descartes 1.1.0 einops 0.4.1 exceptiongroup 1.1.1 executing 1.2.0 fastjsonschema 2.17.1 fire 0.5.0 flake8 6.0.0 fonttools 4.40.0 fqdn 1.5.1 frozenlist 1.3.3 fsspec 2023.6.0 future 0.18.3 google-api-core 2.11.1 google-auth 2.20.0 google-auth-oauthlib 1.0.0 google-cloud-bigquery 3.11.1 google-cloud-core 2.3.2 google-crc32c 1.5.0 google-resumable-media 2.5.0 googleapis-common-protos 1.59.1 grpcio 1.54.2 grpcio-status 1.54.2 idna 3.4 importlib-metadata 6.7.0 importlib-resources 5.12.0 iniconfig 2.0.0 ipykernel 6.23.2 ipython 8.12.2 ipython-genutils 0.2.0 ipywidgets 8.0.6 isoduration 20.11.0 jedi 0.18.2 Jinja2 3.1.2 joblib 1.2.0 jsonpointer 2.4 jsonschema 4.17.3 jupyter 1.0.0 jupyter_client 8.2.0 jupyter-console 6.6.3 jupyter_core 5.3.1 jupyter-events 0.6.3 jupyter_server 2.6.0 jupyter_server_terminals 0.4.4 jupyterlab-pygments 0.2.2 jupyterlab-widgets 3.0.7 kiwisolver 1.4.4 lyft-dataset-sdk 0.0.8 Markdown 3.4.3 MarkupSafe 2.1.3 matplotlib 3.5.2 matplotlib-inline 0.1.6 mccabe 0.7.0 mistune 3.0.1 mmcv-full 1.4.0 mmdet 2.14.0 mmdet3d 0.17.1 mmsegmentation 0.14.1 motmetrics 1.1.3 multidict 6.0.4 mypy-extensions 1.0.0 nbclassic 1.0.0 nbclient 0.8.0 nbconvert 7.6.0 nbformat 5.9.0 nest-asyncio 1.5.6 networkx 2.2 notebook 6.5.4 notebook_shim 0.2.3 numba 0.48.0 numpy 1.20.0 nuscenes-devkit 1.1.10 oauthlib 3.2.2 opencv-python 4.7.0.72 overrides 7.3.1 packaging 23.1 pandas 1.4.4 pandocfilters 1.5.0 parso 0.8.3 pathspec 0.11.1 pexpect 4.8.0 pickleshare 0.7.5 Pillow 9.5.0 pip 23.1.2 pkgutil_resolve_name 1.3.10 platformdirs 3.6.0 plotly 5.15.0 pluggy 1.0.0 plyfile 0.9 prettytable 3.8.0 prometheus-client 0.17.0 prompt-toolkit 3.0.38 proto-plus 1.22.2 protobuf 4.23.3 psutil 5.9.5 ptyprocess 0.7.0 pure-eval 0.2.2 pyasn1 0.5.0 pyasn1-modules 0.3.0 pycocotools 2.0.6 pycodestyle 2.10.0 pycparser 2.21 pyflakes 3.0.1 Pygments 2.15.1 pyparsing 3.1.0 pyquaternion 0.9.9 pyrsistent 0.19.3 pytest 7.3.2 python-dateutil 2.8.2 python-json-logger 2.0.7 pytorch-lightning 1.2.5 pytz 2023.3 PyYAML 6.0 pyzmq 25.1.0 qtconsole 5.4.3 QtPy 2.3.1 requests 2.31.0 requests-oauthlib 1.3.1 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 rsa 4.9 scikit-image 0.21.0 scikit-learn 1.2.2 scipy 1.10.1 Send2Trash 1.8.2 setuptools 67.8.0 Shapely 1.8.5 six 1.16.0 sniffio 1.3.0 soupsieve 2.4.1 stack-data 0.6.2 tenacity 8.2.2 tensorboard 2.13.0 tensorboard-data-server 0.7.1 termcolor 2.3.0 terminado 0.17.1 terminaltables 3.1.10 threadpoolctl 3.1.0 tinycss2 1.2.1 tomli 2.0.1 torch 1.9.1+cu111 torchaudio 0.9.1 torchmetrics 0.11.4 torchvision 0.10.1+cu111 tornado 6.3.2 tqdm 4.65.0 traitlets 5.9.0 trimesh 2.35.39 typing_extensions 4.6.3 uri-template 1.2.0 urllib3 1.26.16 wcwidth 0.2.6 webcolors 1.13 webencodings 0.5.1 websocket-client 1.6.0 Werkzeug 2.3.6 wheel 0.38.4 widgetsnbextension 4.0.7 yapf 0.40.1 yarl 1.9.2 zipp 3.15.0

Do you have solutions for that problem? Thanks!

Christinepan881 avatar Jun 22 '23 00:06 Christinepan881

ImportError: /home/xxx/.conda/envs/uniad/lib/python3.8/site-packages/mmcv/_ext.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZNK2at10TensorBase8data_ptrIdEEPT_v

Hi @Christinepan881, it seems that the mmcv is not installed successfully. You might need to uninstall mmcv/mmdetection/xxx first, then follow the installation instruction step by step and make sure everything is installed successfully without errors.

YTEP-ZHI avatar Jun 22 '23 03:06 YTEP-ZHI

ImportError: /home/xxx/.conda/envs/uniad/lib/python3.8/site-packages/mmcv/_ext.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZNK2at10TensorBase8data_ptrIdEEPT_v

Hi @Christinepan881, it seems that the mmcv is not installed successfully. You might need to uninstall mmcv/mmdetection/xxx first, then follow the installation instruction step by step and make sure everything is installed successfully without errors.

Thanks for your reply. That is what I did, but the issue still occurs. Do you consider to update this repo with a higher version of mmcv, torch, cuda?

Christinepan881 avatar Jun 22 '23 16:06 Christinepan881

Although I have followed the instructions, the same happens for me too. FYI: The reason for the problem seems to be the compatibility between torch and mmcv modules. Installing pytorch 1.9.1+cu111 (where I used different version due to CUDA before.) and reinstalling all mmcv modules solved the problem for me.

saeyoon17 avatar Jul 12 '23 09:07 saeyoon17