Code Monkey home page Code Monkey logo

Comments (6)

cfzd avatar cfzd commented on June 4, 2024 2

@luweiqing
你确定你用来编译的cuda版本和pytorch的cuda版本是一致的吗?因为有可能你pytorch用的cuda是conda装上去的libcudatoolkit,而你用来编译的是系统里的cuda. 你可以通过以下方式确定他们的版本:
conda:

conda list | grep cuda

系统cuda:

ls -alF /usr/local | grep cuda

from ultra-fast-lane-detection-v2.

cfzd avatar cfzd commented on June 4, 2024

@luweiqing
可以贴一下编译my_interp的log吗?

from ultra-fast-lane-detection-v2.

luweiqing avatar luweiqing commented on June 4, 2024

running install
/home/hnu/anaconda3/envs/lane-det-V2/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/hnu/anaconda3/envs/lane-det-V2/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/hnu/anaconda3/envs/lane-det-V2/lib/python3.7/site-packages/torch/utils/cpp_extension.py:411: 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
raise RuntimeError(CUDA_MISMATCH_MESSAGE.format(cuda_str_version, torch.version.cuda))
/home/hnu/anaconda3/envs/lane-det-V2/lib/python3.7/site-packages/torch/utils/cpp_extension.py:813: UserWarning: The detected CUDA version (10.2) has a minor version mismatch with the version that was used to compile PyTorch (11.3). Most likely this shouldn't be a problem.
warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
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/hnu/anaconda3/envs/lane-det-V2/lib/python3.7/site-packages/my_interp-0.0.0-py3.7-linux-x86_64.egg' (and everything under it)
creating /home/hnu/anaconda3/envs/lane-det-V2/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/hnu/anaconda3/envs/lane-det-V2/lib/python3.7/site-packages
my-interp 0.0.0 is already the active version in easy-install.pth

Installed /home/hnu/anaconda3/envs/lane-det-V2/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

以上就是编译时候的log ,这时候我电脑中的cuda版本是10.2 这个环境中的pytorch中对应cuda是11.3,但这不是问题产生的关键,因为torch是可以向下兼容的,同时之前我电脑中的cuda是11.3的时候,pytorch是11.3的时候,也还是报同样的错误找不到libcudart.so.10.2文件。

from ultra-fast-lane-detection-v2.

luweiqing avatar luweiqing commented on June 4, 2024

我之前试过,都试过,各种搭配都试过,系统中的cuda是11.3,conda安装上去的cudatoolkit是11.3的,也是报这个错误,那如果系统中cuda安装是10.2的,conda安装的libcudatoolkit是11.3,那么同样报这个错误,另外一种情况,系统中cuda是10.2的,conda安装的cudatoolkit是10.2的,的确没这个错误了,但是,就会显示3090的算力必须得安装cuda11以上的版本才可以,程序依然无法运行。按照这样的话,程序在3090的硬件环境下貌似是无法运行的?

from ultra-fast-lane-detection-v2.

cfzd avatar cfzd commented on June 4, 2024

@luweiqing
其实只需要保证所有的cuda都是一个版本即可。

对于3090的问题,只需要将所有的cuda保持在cuda11以上就可以了(这个repo中的模型就是在3090上训出来的)。

如果你系统中的是cuda 11.3,可以确定用到的一定是这个版本吗?比如你可以使用

which nvcc

来查看一下路径是不是在11.3的cuda中

from ultra-fast-lane-detection-v2.

luweiqing avatar luweiqing commented on June 4, 2024

@cfzd
现在可以了,后面发现了原因是因为在my_interp包中,我没有把原先用cuda 10.2编译生成好的文件给删除,导致更换cuda版本不会重新编译。现在解决了,感谢!

from ultra-fast-lane-detection-v2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.