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

相关推荐
铁手飞鹰19 小时前
[深度学习]Vision Transformer
人工智能·pytorch·python·深度学习·transformer
weixin_3954489119 小时前
average_weights.py
pytorch·python·深度学习
海天一色y19 小时前
使用 PyTorch RNN 识别手写数字
人工智能·pytorch·rnn
deephub19 小时前
torch.compile 加速原理:kernel 融合与缓冲区复用
人工智能·pytorch·深度学习·神经网络
爱打代码的小林20 小时前
用 PyTorch 实现 CBOW 模型
人工智能·pytorch·python
查无此人byebye21 小时前
深度解析:当前AI视频生成为何普遍“短小精悍”?
人工智能·pytorch·python·深度学习·音视频·transformer
林深现海21 小时前
【刘二大人】PyTorch深度学习实践笔记 —— 第一集:深度学习全景概述(凝练版)
pytorch·笔记·深度学习
zhangfeng11331 天前
大语言模型llm 量化模型 跑在 边缘设备小显存显卡 GGUF GGML PyTorch (.pth, .bin, SafeTensors)
人工智能·pytorch·深度学习·语言模型
纤纡.1 天前
深度学习环境搭建:CUDA+PyTorch+TorchVision+Torchaudio 一站式安装教程
人工智能·pytorch·深度学习
我材不敲代码1 天前
深度学习的准备工作:CUDA安装配置、pytorch库、torchvision库、torchaudio库安装
人工智能·pytorch·深度学习