Ultra-Fast-Lane-Detection-v2 icon indicating copy to clipboard operation
Ultra-Fast-Lane-Detection-v2 copied to clipboard

my_interp.cpython-37m-x86_64-linux-gnu.so: undefined symbol:

Open the-cat-crying opened this issue 1 year ago • 8 comments

(lanedetv2) [zp@localhost Ultra-Fast-Lane-Detection-V2]$ python train.py configs/tusimple_res18.py --log_path ./ Traceback (most recent call last): File "train.py", line 8, in from utils.common import calc_loss, get_model, get_train_loader, inference, merge_config, save_model, cp_projects File "/home/zp/work/Ultra-Fast-Lane-Detection-V2/utils/common.py", line 2, in from data.dali_data import TrainCollect File "/home/zp/work/Ultra-Fast-Lane-Detection-V2/data/dali_data.py", line 11, in import my_interp ImportError: /home/zp/.conda/envs/lanedetv2/lib/python3.7/site-packages/my_interp-0.0.0-py3.7-linux-x86_64.egg/my_interp.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN2at4_ops5zeros4callEN3c108ArrayRefIlEENS2_8optionalINS2_10ScalarTypeEEENS5_INS2_6LayoutEEENS5_INS2_6DeviceEEENS5_IbEE

the-cat-crying avatar Feb 02 '23 09:02 the-cat-crying

Have you installed myinterp as the INSTALL.md says?

cfzd avatar Feb 03 '23 05:02 cfzd

yes!

(lanedetv2) [zp@localhost Ultra-Fast-Lane-Detection-V2]$ ls configs data demo.py evaluation INSTALL.md LICENSE model my_interp README.md requirements.txt scripts speed_simple.py test.py train_gt.txt train.py tusimple_anno_cache.json ufldv2.png utils (lanedetv2) [zp@localhost Ultra-Fast-Lane-Detection-V2]$ vi INSTALL.md (lanedetv2) [zp@localhost Ultra-Fast-Lane-Detection-V2]$ ls configs data demo.py evaluation INSTALL.md LICENSE model my_interp README.md requirements.txt scripts speed_simple.py test.py train_gt.txt train.py tusimple_anno_cache.json ufldv2.png utils (lanedetv2) [zp@localhost Ultra-Fast-Lane-Detection-V2]$ cd my_interp/ (lanedetv2) [zp@localhost my_interp]$ ls build build.sh dist my_interp_cuda.cpp my_interp_cuda_kernel.cu my_interp.egg-info setup.py test.py (lanedetv2) [zp@localhost my_interp]$ cd build/ (lanedetv2) [zp@localhost build]$ ls bdist.linux-x86_64 lib.linux-x86_64-cpython-37 temp.linux-x86_64-cpython-37 (lanedetv2) [zp@localhost build]$

the-cat-crying avatar Feb 09 '23 01:02 the-cat-crying

(lanedetv2) [zp@localhost my_interp]$ sh build.sh running install /home/zp/.conda/envs/lanedetv2/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/zp/.conda/envs/lanedetv2/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 my_interp.egg-info/PKG-INFO writing dependency_links to my_interp.egg-info/dependency_links.txt writing top-level names to my_interp.egg-info/top_level.txt /home/zp/.conda/envs/lanedetv2/lib/python3.7/site-packages/torch/utils/cpp_extension.py:476: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) reading manifest file 'my_interp.egg-info/SOURCES.txt' writing manifest file 'my_interp.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_ext creating build/bdist.linux-x86_64/egg copying build/lib.linux-x86_64-cpython-37/my_interp.cpython-37m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg creating stub loader for my_interp.cpython-37m-x86_64-linux-gnu.so byte-compiling build/bdist.linux-x86_64/egg/my_interp.py to my_interp.cpython-37.pyc creating build/bdist.linux-x86_64/egg/EGG-INFO copying my_interp.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO copying my_interp.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying my_interp.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO copying my_interp.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt zip_safe flag not set; analyzing archive contents... pycache.my_interp.cpython-37: module references file creating 'dist/my_interp-0.0.0-py3.7-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it removing 'build/bdist.linux-x86_64/egg' (and everything under it) Processing my_interp-0.0.0-py3.7-linux-x86_64.egg removing '/home/zp/.conda/envs/lanedetv2/lib/python3.7/site-packages/my_interp-0.0.0-py3.7-linux-x86_64.egg' (and everything under it) creating /home/zp/.conda/envs/lanedetv2/lib/python3.7/site-packages/my_interp-0.0.0-py3.7-linux-x86_64.egg Extracting my_interp-0.0.0-py3.7-linux-x86_64.egg to /home/zp/.conda/envs/lanedetv2/lib/python3.7/site-packages my-interp 0.0.0 is already the active version in easy-install.pth

Installed /home/zp/.conda/envs/lanedetv2/lib/python3.7/site-packages/my_interp-0.0.0-py3.7-linux-x86_64.egg Processing dependencies for my-interp==0.0.0 Finished processing dependencies for my-interp==0.0.0

the-cat-crying avatar Feb 09 '23 01:02 the-cat-crying

(lanedetv2) [zp@localhost Ultra-Fast-Lane-Detection-V2]$ python train.py configs/tusimple_res18.py --log_path ./ Traceback (most recent call last): File "train.py", line 8, in from utils.common import calc_loss, get_model, get_train_loader, inference, merge_config, save_model, cp_projects File "/home/zp/work/Ultra-Fast-Lane-Detection-V2/utils/common.py", line 2, in from data.dali_data import TrainCollect File "/home/zp/work/Ultra-Fast-Lane-Detection-V2/data/dali_data.py", line 11, in import my_interp ImportError: /home/zp/.conda/envs/lanedetv2/lib/python3.7/site-packages/my_interp-0.0.0-py3.7-linux-x86_64.egg/my_interp.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN2at4_ops5zeros4callEN3c108ArrayRefIlEENS2_8optionalINS2_10ScalarTypeEEENS5_INS2_6LayoutEEENS5_INS2_6DeviceEEENS5_IbEE (lanedetv2) [zp@localhost Ultra-Fast-Lane-Detection-V2]$

the-cat-crying avatar Feb 09 '23 01:02 the-cat-crying

@the-cat-crying I think it might be a problem of cuda version mismatch. The cuda used for build my_interp is called by nvcc, which you can find by:

nvcc -V

This is the local cuda.

However, the cuda that pytorch uses might comes from conda, which you can find by:

conda list | grep cuda

This is the conda cuda.

You can compare the information to find the problem.

cfzd avatar Feb 11 '23 05:02 cfzd

Thanks!

but,, I installed it according to your documentation, so how do I replace it with the local cuda path?

the-cat-crying avatar Feb 11 '23 09:02 the-cat-crying

@cfzd

the-cat-crying avatar Feb 11 '23 09:02 the-cat-crying

Thanks!

Solved!

the-cat-crying avatar Feb 13 '23 06:02 the-cat-crying