RTK3090使用cuda11.0因算力不匹配报错

RTK3090使用cuda11.0报错:nvcc fatal : Unsupported gpu architecture ‘compute_86‘或者RuntimeError: CUDA error: no kernel image is available for execution on the device

问题描述

使用libtorch1.7+cuda11.0跑openpcdet,遇到报错:

nvcc fatal : Unsupported gpu architecture ‘compute_86‘

或者

RuntimeError: CUDA error: no kernel image is available for execution on the device

原因分析:

RTX3090算力太高,和cuda11.0不匹配,TORCH_CUDA_ARCH_LIST为8.6,应该设置为8.0(不是7.5)
参考链接(正确答案在评论区):

https://blog.csdn.net/qq_30614451/article/details/111173703

解决方案:

在终端设置环境变量:

export TORCH_CUDA_ARCH_LIST="8.0"

设置完成后再对openpcdet(或者其他项目)进行编译,安装和推理的时候都不会报错了,如果设置成7.5,可能安装编译成功,但是在训练模型的时候报这个错:

RuntimeError: CUDA error: no kernel image is available for execution on the device

需要进行以下操作:

unset TORCH_CUDA_ARCH_LIST
export TORCH_CUDA_ARCH_LIST="8.0"

然后对项目进行编译,再训练就不会报错了

  • 4
    点赞
  • 27
    收藏
    觉得还不错? 一键收藏
  • 7
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值