出现错误(已解决)RuntimeError: CUDA error: no kernel image is available for execution on the device CUDA ker

这篇具有很好参考价值的文章主要介绍了出现错误(已解决)RuntimeError: CUDA error: no kernel image is available for execution on the device CUDA ker。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

出现问题(已解决)RuntimeError: CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

问题——警告

为什么把警告po出来,是因为警告可以让我们了解一些有用信息。
linux系统中ubuntun版本470 cuda版本11.4,报错runtimeerror: cuda error: no kern,图像分割,深度学习,pytorch,python

问题——错误

linux系统中ubuntun版本470 cuda版本11.4,报错runtimeerror: cuda error: no kern,图像分割,深度学习,pytorch,python

分析原因

首先警告里的内容不可忽略,翻译过来就是NVIDIA RTX GeForce 3060Ti(我使用的服务器)支持的CUDA的算力为8.6,与当前的pytorch的版本不匹配。说白了就是CUDA和pytorch版本不一致。

当前的pytorch版本支持的CUDA的算力为3.7、5.0、6.0、7.0

解决办法

我安装的cuda是11.3,对应的pytorch版本为1.10.1,但是为了跑这个代码,我又安装了pytorch1.10,这就导致了CUDA和pytorch版本不一致
因此我重新安装cuda11.1,然后在pytorch官网找到对应的pytorch1.10的安装语句

pip install torch==1.10.0+cpu torchvision==0.11.0+cpu torchaudio==0.10.0 -f https://download.pytorch.org/whl/torch_stable.html

现在风扇已经在转了!

pytorch官网 链接: https://pytorch.org/get-started/previous-versions/

参考博客

深度学习环境配置避坑: https://blog.csdn.net/weixin_46065198/article/details/125642546文章来源地址https://www.toymoban.com/news/detail-687868.html

到了这里,关于出现错误(已解决)RuntimeError: CUDA error: no kernel image is available for execution on the device CUDA ker的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

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

    导致的原因一般都是显卡算力和cuda或者torch版本不匹配 比如在conda中安装的pytorch=1.5.0 cuda=10.2 错误:RuntimeError: CUDA error: no kernel image is available for execution on the device 参考pytorch 报错 RuntimeError: CUDA error: no kernel image is available for execution on the device_可豌豆的博客-CSDN博客 则应该安装

    2024年02月15日
    浏览(47)
  • 已解决RuntimeError: CUDA error: invalid device ordinal CUDA kernel errors might be asynchronously repo

    参考链接 当运行以下代码出现报错: 报错信息如下 RuntimeError: CUDA error: invalid device ordinal CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. 报错完整截图 报错的信息告诉我们,编号\\\"1\\\"是无效的设

    2024年02月04日
    浏览(38)
  • BUG:RuntimeError: CUDA error: invalid device ordinal CUDA kernel errors might be asynchronously repo

    参考链接 当运行以下代码出现报错: 报错信息如下 RuntimeError: CUDA error: invalid device ordinal CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. 报错完整截图 报错的信息告诉我们,编号\\\"1\\\"是无效的设

    2024年02月12日
    浏览(40)
  • Bug小能手系列(python)_13: RuntimeError: CUDA error: device-side assert triggered CUDA kernel errors might

    在运行 Python 代码时出现报错: RuntimeError: CUDA error: device-side assert triggered CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. 注意:报错对应的代码部分与实际出现错误的部分是不同的。具体报错

    2024年02月04日
    浏览(30)
  • CUDA kernel errors might be asynchronously reported at some other API call 错误解决

    CUDA kernel errors might be asynchronously reported at some other API call 在运行基于pytorch的深度学习项目时,有时候会遇到上述错误,并且在报错时没有定位到正确的位置。 这里查阅了很多网上的相关资料,说是分类数目和模型里的实际分类数目不匹配,大家可以仔细查看一下这个。也有

    2024年02月13日
    浏览(29)
  • 解决RuntimeError:No CUDA GPUs are available

    解决RuntimeError:No CUDA GPUs are available 如果本来显卡是能用的 版本这些也能对的上。 基本解决方法为 在使用之前检查cuda是否可用 不检测默认不可用。 或者在文件头加入import torch torch.cuda.current_device() torch.cuda._initialized = True // 检测一下cuda是否可用 print(torch.cuda.is_available()) F

    2024年02月03日
    浏览(25)
  • 解决:RuntimeError: CUDA error: device-side assert triggered

    @[TOC]解决办法:RuntimeError: CUDA error: device-side assert triggered CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1. RuntimeError: CUDA error: device-side assert triggered CUDA kernel errors might be asynchronously reported at

    2024年02月12日
    浏览(29)
  • 【Lora模型训练过程报错】Error no kernel image is available for execution on the device at line

    在使用 sd-script训练自己的Lora模型时,可能会出现“Error no kernel image is available for execution on the device at line 167 ”的错误: 这是因为旧的显卡 例如10系列不支持unit8类型 ,需要在 训练的配置文件中,修改:

    2024年02月11日
    浏览(30)
  • 【RuntimeError: CUDA error: device-side assert triggered】问题与解决

    当我在调试模型的时候,出现了如下的问题 /opt/conda/conda-bld/pytorch_1656352465323/work/aten/src/ATen/native/cuda/IndexKernel.cu:91: operator(): block: [5,0,0], thread: [63,0,0] Assertion `index = -sizes[i] index sizes[i] “index out of bounds”` failed. 通过提示信息可以知道是个数组越界的问题。但是如图一中第二行

    2024年01月21日
    浏览(30)
  • 已解决RuntimeError: CUDA error: device-side assert triggered异常的正确解决方法,亲测有效!!!

    已解决RuntimeError: CUDA error: device-side assert triggered异常的正确解决方法,亲测有效!!! RuntimeError: CUDA error: device-side assert triggered 出现 CUDA error: device-side assert triggered 错误通常是由于 GPU 上的某些计算出现了问题,导致 CUDA 运行时库触发了设备端断言。 下滑查看解决方法 要解

    2024年02月07日
    浏览(32)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包