pytorch常见错误

pytorch常见错误

  • [1 RuntimeError: CUDA error: no kernel image is available for execution on the device。](#1 RuntimeError: CUDA error: no kernel image is available for execution on the device。)

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

报错信息:安装带gpu的pytorch的时候,

(1)先警告

NVIDIA GeForce RTX 3090 with CUDA capability sm_86 is not compatible with the current PyTorch installation.

The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_70 sm_75.

If you want to use the NVIDIA GeForce RTX 3090 GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/

(2)紧接着报错执行深度学习代码报错:

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

原因: 是因为pytorch1.6的版本不支持gpu硬件RTX 3090,需要下载更高版本的pytorch才行。

解决: 下载1.8以上版本的pytorch,算力要支持

cpp 复制代码
// 查看包支持的算力
 import torch
 torch.cuda.is_available()
// 上面返回true
 torch.cuda.get_arch_list()

torch与gpu硬件对应:

幸福的烦恼:显卡算力太高而pytorch版本太低不支持_cuda版本太高 pytorch不支持_是Yu欸的博客-CSDN博客

相关推荐
学术小李8 小时前
基于Pytorch,如何用CUDA自己写算子?(一)
人工智能·pytorch·python
a11177611 小时前
基于PyTorch的动物图像识别系统 开源
人工智能·pytorch·python
FriendshipT12 小时前
Ultralytics:解读Proto模块
人工智能·pytorch·python·深度学习·目标检测
程序员羽痕2 天前
基于 Django + PyTorch 的中文字体识别系统
pytorch·python·django
培之2 天前
RTX 5090 安装 pytorch3d
人工智能·pytorch·python
延卿2 天前
nnDetection:基于 PyTorch 的目标检测框架
人工智能·pytorch·目标检测
不懒不懒2 天前
Windows 深度学习环境配置(CUDA12.8 + cuDNN9.x + PyTorch)最简避坑指南(2026 最新)
人工智能·pytorch·深度学习
丨白色风车丨2 天前
PyTorch 迁移学习实战:ResNet18 实现 20 类食物图像分类(完整可运行代码)
pytorch·分类·迁移学习
七夜zippoe2 天前
深入解析CANN仓库中的HCCL分布式通信库
pytorch·分布式·cann·hccl·通信库