trackformer icon indicating copy to clipboard operation
trackformer copied to clipboard

ImportError: /home/simon/anaconda3/envs/trackFormer/lib/python3.7/site-packages/MultiScaleDeformableAttention-1.0-py3.7-linux-x86_64.egg/MultiScaleDeformableAttention.cpython-37m-x86_64-linux-gnu.so: undefined symbol: cudaSetupArgument

Open ildanhae-try opened this issue 2 years ago • 4 comments

thank you for your wonderful work i want run your code but i have import error I completed the installation according to docs/INSTALL.md and tried to run the test.py, but it can not import MultiScaleDeformableAttention there is importError about cudaSetupArgument and this is my cuda envs

(trackFormer) [simon@localhost ops]$ nvidia-smi Fri Mar 3 16:05:28 2023 +-----------------------------------------------------------------------------+ | NVIDIA-SMI 470.86 Driver Version: 470.86 CUDA Version: 11.4 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 NVIDIA TITAN Xp Off | 00000000:08:00.0 Off | N/A | | 49% 76C P2 127W / 250W | 4592MiB / 12196MiB | 78% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ | 1 NVIDIA TITAN Xp Off | 00000000:09:00.0 Off | N/A | | 62% 85C P2 128W / 250W | 2181MiB / 12196MiB | 87% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ | 2 NVIDIA TITAN Xp Off | 00000000:88:00.0 Off | N/A | | 50% 78C P2 98W / 250W | 2177MiB / 12196MiB | 65% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ | 3 NVIDIA TITAN Xp Off | 00000000:89:00.0 Off | N/A | | 54% 83C P2 200W / 250W | 2177MiB / 12196MiB | 84% Default | | | | N/A | +-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | 0 N/A N/A 12431 C .../cheus/pyTorch/bin/python 2161MiB | | 0 N/A N/A 12432 C .../cheus/pyTorch/bin/python 809MiB | | 0 N/A N/A 12433 C .../cheus/pyTorch/bin/python 809MiB | | 0 N/A N/A 12434 C .../cheus/pyTorch/bin/python 809MiB | | 1 N/A N/A 12432 C .../cheus/pyTorch/bin/python 2179MiB | | 2 N/A N/A 12433 C .../cheus/pyTorch/bin/python 2175MiB | | 3 N/A N/A 12434 C .../cheus/pyTorch/bin/python 2175MiB | +-----------------------------------------------------------------------------+ (trackFormer) [simon@localhost ops]$ nvcc -V nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2019 NVIDIA Corporation Built on Fri_Feb__8_19:08:17_PST_2019 Cuda compilation tools, release 10.1, V10.1.105

this is my conda list

Name Version Build Channel _libgcc_mutex 0.1 main _openmp_mutex 5.1 1_gnu argon2-cffi 20.1.0 pypi_0 pypi astroid 2.4.2 pypi_0 pypi async-generator 1.10 pypi_0 pypi attrs 19.3.0 pypi_0 pypi backcall 0.2.0 pypi_0 pypi blas 1.0 mkl bleach 3.2.3 pypi_0 pypi ca-certificates 2023.01.10 h06a4308_0 certifi 2020.4.5.2 pypi_0 pypi cffi 1.14.4 pypi_0 pypi chardet 3.0.4 pypi_0 pypi cloudpickle 1.6.0 pypi_0 pypi colorama 0.4.3 pypi_0 pypi cudatoolkit 10.1.243 h6bb024c_0 cycler 0.10.0 pypi_0 pypi cython 0.29.20 pypi_0 pypi decorator 4.4.2 pypi_0 pypi defusedxml 0.6.0 pypi_0 pypi docopt 0.6.2 pypi_0 pypi entrypoints 0.3 pypi_0 pypi filelock 3.0.12 pypi_0 pypi flake8 3.8.3 pypi_0 pypi flake8-import-order 0.18.1 pypi_0 pypi freetype 2.12.1 h4a9f257_0 future 0.18.2 pypi_0 pypi gdown 3.12.2 pypi_0 pypi giflib 5.2.1 h5eee18b_3 gitdb 4.0.5 pypi_0 pypi gitpython 3.1.3 pypi_0 pypi idna 2.9 pypi_0 pypi imageio 2.8.0 pypi_0 pypi importlib-metadata 1.6.1 pypi_0 pypi intel-openmp 2021.4.0 h06a4308_3561 ipykernel 5.4.3 pypi_0 pypi ipython 7.19.0 pypi_0 pypi ipython-genutils 0.2.0 pypi_0 pypi ipywidgets 7.6.3 pypi_0 pypi isort 5.6.4 pypi_0 pypi jedi 0.18.0 pypi_0 pypi jinja2 2.11.2 pypi_0 pypi jpeg 9e h7f8727e_0 jsonpatch 1.25 pypi_0 pypi jsonpickle 1.4.1 pypi_0 pypi jsonpointer 2.0 pypi_0 pypi jsonschema 3.2.0 pypi_0 pypi jupyter 1.0.0 pypi_0 pypi jupyter-client 6.1.11 pypi_0 pypi jupyter-console 6.2.0 pypi_0 pypi jupyter-core 4.7.0 pypi_0 pypi jupyterlab-pygments 0.1.2 pypi_0 pypi jupyterlab-widgets 1.0.0 pypi_0 pypi kiwisolver 1.2.0 pypi_0 pypi lap 0.4.0 pypi_0 pypi lapsolver 1.1.0 pypi_0 pypi lazy-object-proxy 1.4.3 pypi_0 pypi lcms2 2.12 h3be6417_0 ld_impl_linux-64 2.38 h1181459_1 lerc 3.0 h295c915_0 libdeflate 1.17 h5eee18b_0 libffi 3.4.2 h6a678d5_6 libgcc-ng 11.2.0 h1234567_1 libgomp 11.2.0 h1234567_1 libpng 1.6.37 hbc83047_0 libstdcxx-ng 11.2.0 h1234567_1 libtiff 4.5.0 h6a678d5_2 libwebp 1.2.4 h11a3e52_1 libwebp-base 1.2.4 h5eee18b_1 lz4-c 1.9.4 h6a678d5_0 markupsafe 1.1.1 pypi_0 pypi matplotlib 3.2.1 pypi_0 pypi mccabe 0.6.1 pypi_0 pypi mistune 0.8.4 pypi_0 pypi mkl 2021.4.0 h06a4308_640 mkl-service 2.4.0 py37h7f8727e_0 mkl_fft 1.3.1 py37hd3c417c_0 mkl_random 1.2.2 py37h51133e4_0 more-itertools 8.4.0 pypi_0 pypi motmetrics 1.2.0 pypi_0 pypi multiscaledeformableattention 1.0 pypi_0 pypi munch 2.5.0 pypi_0 pypi nbclient 0.5.1 pypi_0 pypi nbconvert 6.0.7 pypi_0 pypi nbformat 5.1.2 pypi_0 pypi ncurses 6.4 h6a678d5_0 nest-asyncio 1.5.1 pypi_0 pypi networkx 2.4 pypi_0 pypi ninja 1.10.0.post2 pypi_0 pypi ninja-base 1.10.2 hd09550d_5 notebook 6.2.0 pypi_0 pypi numpy 1.18.5 pypi_0 pypi numpy-base 1.21.5 py37ha15fc14_3 opencv-python 4.2.0.34 pypi_0 pypi openssl 1.1.1t h7f8727e_0 packaging 20.4 pypi_0 pypi pandas 1.0.5 pypi_0 pypi pandocfilters 1.4.3 pypi_0 pypi parso 0.8.1 pypi_0 pypi pexpect 4.8.0 pypi_0 pypi pickleshare 0.7.5 pypi_0 pypi pillow 7.1.2 pypi_0 pypi pip 22.3.1 py37h06a4308_0 pluggy 0.13.1 pypi_0 pypi prometheus-client 0.9.0 pypi_0 pypi prompt-toolkit 3.0.14 pypi_0 pypi ptyprocess 0.7.0 pypi_0 pypi py 1.8.2 pypi_0 pypi py-cpuinfo 6.0.0 pypi_0 pypi pyaml 20.4.0 pypi_0 pypi pycocotools 2.0 pypi_0 pypi pycodestyle 2.6.0 pypi_0 pypi pycparser 2.20 pypi_0 pypi pyflakes 2.2.0 pypi_0 pypi pygments 2.7.4 pypi_0 pypi pylint 2.6.0 pypi_0 pypi pyparsing 2.4.7 pypi_0 pypi pyrsistent 0.17.3 pypi_0 pypi pysocks 1.7.1 pypi_0 pypi pytest 5.4.3 pypi_0 pypi pytest-benchmark 3.2.3 pypi_0 pypi python 3.7.16 h7a1cb2a_0 python-dateutil 2.8.1 pypi_0 pypi pytorch 1.5.0 py3.7_cuda10.1.243_cudnn7.6.3_0 pytorch pytz 2020.1 pypi_0 pypi pywavelets 1.1.1 pypi_0 pypi pyyaml 5.3.1 pypi_0 pypi pyzmq 19.0.1 pypi_0 pypi qtconsole 5.0.2 pypi_0 pypi qtpy 1.9.0 pypi_0 pypi readline 8.2 h5eee18b_0 requests 2.23.0 pypi_0 pypi sacred 0.8.1 pypi_0 pypi scikit-image 0.17.2 pypi_0 pypi scipy 1.4.1 pypi_0 pypi seaborn 0.10.1 pypi_0 pypi send2trash 1.5.0 pypi_0 pypi setuptools 65.6.3 py37h06a4308_0 six 1.15.0 pypi_0 pypi smmap 3.0.4 pypi_0 pypi sqlite 3.40.1 h5082296_0 submitit 1.1.5 pypi_0 pypi terminado 0.9.2 pypi_0 pypi testpath 0.4.4 pypi_0 pypi tifffile 2020.6.3 pypi_0 pypi tk 8.6.12 h1ccaba5_0 toml 0.10.2 pypi_0 pypi torchfile 0.1.0 pypi_0 pypi torchvision 0.6.0 py37_cu101 pytorch tornado 6.1 pypi_0 pypi tqdm 4.46.1 pypi_0 pypi traitlets 5.0.5 pypi_0 pypi typed-ast 1.4.1 pypi_0 pypi typing-extensions 3.7.4.3 pypi_0 pypi urllib3 1.25.9 pypi_0 pypi visdom 0.1.8.9 pypi_0 pypi wcwidth 0.2.5 pypi_0 pypi webencodings 0.5.1 pypi_0 pypi websocket-client 0.57.0 pypi_0 pypi wheel 0.38.4 py37h06a4308_0 widgetsnbextension 3.5.1 pypi_0 pypi wrapt 1.12.1 pypi_0 pypi xmltodict 0.12.0 pypi_0 pypi xz 5.2.10 h5eee18b_1 zipp 3.1.0 pypi_0 pypi zlib 1.2.13 h5eee18b_0 zstd 1.5.2 ha4553b6_0

ildanhae-try avatar Mar 03 '23 07:03 ildanhae-try

Our README only supports virtualenv and not conda. There is most likely a version mismatch. Did the installation of the MultiScaleDeformableAttention run through without errors?

timmeinhardt avatar Mar 03 '23 10:03 timmeinhardt

thank you i will try on virtualenv and below is my log when i install the MultiScaleDeformableAttention

running build running build_ext running install /home/simon/anaconda3/envs/trackFormer/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. setuptools.SetuptoolsDeprecationWarning, /home/simon/anaconda3/envs/trackFormer/lib/python3.7/site-packages/setuptools/command/easy_install.py:147: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. EasyInstallDeprecationWarning, running bdist_egg running egg_info writing MultiScaleDeformableAttention.egg-info/PKG-INFO writing dependency_links to MultiScaleDeformableAttention.egg-info/dependency_links.txt writing top-level names to MultiScaleDeformableAttention.egg-info/top_level.txt reading manifest file 'MultiScaleDeformableAttention.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'MultiScaleDeformableAttention.egg-info/SOURCES.txt' installing library code to src/trackformer/models/ops/bdist.linux-x86_64/egg running install_lib creating src/trackformer/models/ops/bdist.linux-x86_64/egg copying src/trackformer/models/ops/lib.linux-x86_64-cpython-37/MultiScaleDeformableAttention.cpython-37m-x86_64-linux-gnu.so -> src/trackformer/models/ops/bdist.linux-x86_64/egg creating stub loader for MultiScaleDeformableAttention.cpython-37m-x86_64-linux-gnu.so byte-compiling src/trackformer/models/ops/bdist.linux-x86_64/egg/MultiScaleDeformableAttention.py to MultiScaleDeformableAttention.cpython-37.pyc creating src/trackformer/models/ops/bdist.linux-x86_64/egg/EGG-INFO copying MultiScaleDeformableAttention.egg-info/PKG-INFO -> src/trackformer/models/ops/bdist.linux-x86_64/egg/EGG-INFO copying MultiScaleDeformableAttention.egg-info/SOURCES.txt -> src/trackformer/models/ops/bdist.linux-x86_64/egg/EGG-INFO copying MultiScaleDeformableAttention.egg-info/dependency_links.txt -> src/trackformer/models/ops/bdist.linux-x86_64/egg/EGG-INFO copying MultiScaleDeformableAttention.egg-info/top_level.txt -> src/trackformer/models/ops/bdist.linux-x86_64/egg/EGG-INFO writing src/trackformer/models/ops/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt zip_safe flag not set; analyzing archive contents... pycache.MultiScaleDeformableAttention.cpython-37: module references file creating 'dist/MultiScaleDeformableAttention-1.0-py3.7-linux-x86_64.egg' and adding 'src/trackformer/models/ops/bdist.linux-x86_64/egg' to it removing 'src/trackformer/models/ops/bdist.linux-x86_64/egg' (and everything under it) Processing MultiScaleDeformableAttention-1.0-py3.7-linux-x86_64.egg removing '/home/simon/anaconda3/envs/trackFormer/lib/python3.7/site-packages/MultiScaleDeformableAttention-1.0-py3.7-linux-x86_64.egg' (and everything under it) creating /home/simon/anaconda3/envs/trackFormer/lib/python3.7/site-packages/MultiScaleDeformableAttention-1.0-py3.7-linux-x86_64.egg Extracting MultiScaleDeformableAttention-1.0-py3.7-linux-x86_64.egg to /home/simon/anaconda3/envs/trackFormer/lib/python3.7/site-packages MultiScaleDeformableAttention 1.0 is already the active version in easy-install.pth

Installed /home/simon/anaconda3/envs/trackFormer/lib/python3.7/site-packages/MultiScaleDeformableAttention-1.0-py3.7-linux-x86_64.egg Processing dependencies for MultiScaleDeformableAttention==1.0 Finished processing dependencies for MultiScaleDeformableAttention==1.0 (trackFormer) [simon@localhost trackformer]$

ildanhae-try avatar Mar 03 '23 12:03 ildanhae-try

i try on virtualenv. when i install MultiScaleDeformableAttention package by the command in INSTALL.md, i got AttributeError abuout no attribute 'co_names' what should i do at this situation?

(trackFormer) [simon@localhost trackformer]$ python src/trackformer/models/ops/setup.py build --build-base=src/trackformer/models/ops/ install running build running build_ext running install running bdist_egg running egg_info writing MultiScaleDeformableAttention.egg-info/PKG-INFO writing dependency_links to MultiScaleDeformableAttention.egg-info/dependency_links.txt writing top-level names to MultiScaleDeformableAttention.egg-info/top_level.txt reading manifest file 'MultiScaleDeformableAttention.egg-info/SOURCES.txt' writing manifest file 'MultiScaleDeformableAttention.egg-info/SOURCES.txt' installing library code to src/trackformer/models/ops/bdist.linux-x86_64/egg running install_lib creating stub loader for MultiScaleDeformableAttention.cpython-37m-x86_64-linux-gnu.so byte-compiling src/trackformer/models/ops/bdist.linux-x86_64/egg/MultiScaleDeformableAttention.py to MultiScaleDeformableAttention.cpython-37.pyc copying MultiScaleDeformableAttention.egg-info/PKG-INFO -> src/trackformer/models/ops/bdist.linux-x86_64/egg/EGG-INFO copying MultiScaleDeformableAttention.egg-info/SOURCES.txt -> src/trackformer/models/ops/bdist.linux-x86_64/egg/EGG-INFO copying MultiScaleDeformableAttention.egg-info/dependency_links.txt -> src/trackformer/models/ops/bdist.linux-x86_64/egg/EGG-INFO copying MultiScaleDeformableAttention.egg-info/top_level.txt -> src/trackformer/models/ops/bdist.linux-x86_64/egg/EGG-INFO writing src/trackformer/models/ops/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt zip_safe flag not set; analyzing archive contents... Traceback (most recent call last): File "src/trackformer/models/ops/setup.py", line 65, in cmdclass={"build_ext": torch.utils.cpp_extension.BuildExtension}, File "/usr/local/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/local/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/home/simon/Python-3.7.15/trackFormer/lib/python3.7/site-packages/setuptools/command/install.py", line 67, in run self.do_egg_install() File "/home/simon/Python-3.7.15/trackFormer/lib/python3.7/site-packages/setuptools/command/install.py", line 109, in do_egg_install self.run_command('bdist_egg') File "/usr/local/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/home/simon/Python-3.7.15/trackFormer/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 209, in run os.path.join(archive_root, 'EGG-INFO'), self.zip_safe() File "/home/simon/Python-3.7.15/trackFormer/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 245, in zip_safe return analyze_egg(self.bdist_dir, self.stubs) File "/home/simon/Python-3.7.15/trackFormer/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 355, in analyze_egg safe = scan_module(egg_dir, base, name, stubs) and safe File "/home/simon/Python-3.7.15/trackFormer/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 395, in scan_module symbols = dict.fromkeys(iter_symbols(code)) File "/home/simon/Python-3.7.15/trackFormer/lib/python3.7/site-packages/setuptools/command/bdist_egg.py", line 414, in iter_symbols for name in code.co_names: AttributeError: 'NoneType' object has no attribute 'co_names'

ildanhae-try avatar Mar 08 '23 06:03 ildanhae-try

I have never encountered that error. So its hard to say. But my best guess is sth related to wrong package versions.

timmeinhardt avatar Mar 08 '23 10:03 timmeinhardt