fpn.pytorch报错:undefined symbol: __cudaPopCallConfiguration

问题背景:

在运行fpn.pytorch项目时,遇到了undefined symbol: __cudaPopCallConfiguration错误。

原因分析:

笔者遇到该问题的原因是,fpn.pytorch需要用nvcc-9.0对模型进行编译,但笔者的系统默认nvcc版本为10.2(系统默认在PATH路径下搜索nvcc)。

(能发现是由cuda版本不匹配而导致的错误,多亏了jshi31大佬的解答

I find the root of the problem is the mismatch of the nvcc version and the torchcuda version. You must make sure they are the same.
Check nvcc version:
nvcc --version
Check torch cuda version, go to the python interface and type
import torch
torch.version.cuda
make sure they are the same and I solved my problem.)

解决方案:

在自己的系统上安装cuda9.0,并将系统默认cuda版本切换为cuda9.0。(相关教程:多版本cuda安装和切换

引申阅读:

1. torch如何得知系统默认cuda版本:

(1)在torch.utils.ffi.__init__.py 中

cuda_include_dirs = glob.glob('/usr/local/cuda/include')#这句话指定了与cuda相关的include路径

(2)运行时动态库的搜索路径的先后顺序是(引自生信技能树):
1.编译目标代码时指定的动态库搜索路径;
2.环境变量LD_LIBRARY_PATH指定的动态库搜索路径;
3.配置文件/etc/ld.so.conf中指定的动态库搜索路径;
4.默认的动态库搜索路径/lib和/usr/lib;

2. 如何修改linux环境变量

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值