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博客

相关推荐
小女孩真可爱3 小时前
大模型学习记录(五)-------调用大模型API接口
pytorch·深度学习·学习
Predestination王瀞潞10 小时前
Windows环境下Pytorch的配置
人工智能·pytorch·python
夫唯不争,故无尤也11 小时前
PyTorch 的维度变形一站式入门
人工智能·pytorch·python
nix.gnehc13 小时前
PyTorch
人工智能·pytorch·python
z樾15 小时前
TorchRL-MADDPG
pytorch·python·深度学习
夫唯不争,故无尤也1 天前
梯度累计原理:数学可行性与PyTorch实现
人工智能·pytorch·python
八年。。2 天前
Ai笔记(二)-PyTorch 中各类数据类型(numpy array、list、FloatTensor、LongTensor、Tensor)的区别
人工智能·pytorch·笔记
Keep_Trying_Go3 天前
LightningCLI教程 + 视频讲解
人工智能·pytorch·语言模型·大模型·多模态·lightning
AI即插即用3 天前
即插即用系列 | 2024 SOTA LAM-YOLO : 无人机小目标检测模型
pytorch·深度学习·yolo·目标检测·计算机视觉·视觉检测·无人机
AIminminHu3 天前
底层视觉及图像增强-项目实践理论补充(十六-0-(25):PyTorch---》底层视觉及图像增强):从奥运大屏到手机小屏,快来挖一挖里面都有什么
pytorch