失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > CUDA——调试“ImportError: libcudart.so.9.2: cannot open shared object file: No such file or directory”

CUDA——调试“ImportError: libcudart.so.9.2: cannot open shared object file: No such file or directory”

时间:2023-04-05 22:59:37

相关推荐

CUDA——调试“ImportError: libcudart.so.9.2: cannot open shared object file: No such file or directory”

1 致谢

感谢陈助教的指导!

2 问题描述

昨天一直在调试景润给的R2CNN的代码,基本的依赖环境配置号之后,运行代码,出现了“ImportError: libcudart.so.9.2: cannot open shared object file: No such file or directory”的问题,查看函数的调用过程之后发现,程序是调用了与CUDA相关的CPP代码之后出现问题的;我开始怀疑是TF对CUDA版本有要求引起的,后来查看了一下编译TF的Python文件,发现我使用的 TensorFlow 1.15编译的CUDA版本的确是10.0,所以排除了TF的问题;后来又再次看了一下函数调用的过程,发现程序调用了与CUDA相关的CPP代码,于是感觉可能是跟CPP的编译有关;

3 配置信息

CUDA 10.0

3 解决方案

在解决CUDA的ImportError时,十分重要的就是查看函数的调用,Here it has been proved that it is very useful to learn about the technology of the assistant, which can develop our thinking about understanding how program is working; 经过查看函数调用过程我们发现,程序在出错前最后调用了so文件的代码,所以问题肯定是编译相关,于是我们想到这里出现的问题应该是代码自带的SO文件是使用 CUDA 9.2进行编译的,所以出现了libcudart.so.9.2文件无法找到的错误;

如果觉得《CUDA——调试“ImportError: libcudart.so.9.2: cannot open shared object file: No such file or directory”》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。