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

相关推荐
封奚泽优21 分钟前
使用mmdetection项目进行训练记录
pytorch·python·cuda·mmdetection·mmcv
tony3651 小时前
pytorch分布式训练解释
人工智能·pytorch·分布式
weixin_贾1 小时前
深度学习基础理论与 PyTorch 实战 —— 从传统机器学习到前沿模型全攻略
pytorch·深度学习·机器学习
大连好光景15 小时前
PyTorch深度学习----优化器
pytorch·深度学习·学习
多恩Stone1 天前
【3D-AICG 系列-11】Trellis 2 的 Shape VAE 训练流程梳理
人工智能·pytorch·算法·3d·aigc
隔壁大炮2 天前
08. PyTorch_张量基本创建方式
人工智能·pytorch·python
隔壁大炮2 天前
07. PyTorch框架简介
人工智能·pytorch·python
大鹏的NLP博客2 天前
Rust + PyTorch 实现 BGE 向量检索系统
人工智能·pytorch·rust
勾股导航4 天前
蚁群优化算法
人工智能·pytorch·python
All The Way North-4 天前
【LSTM系列·终篇】PyTorch nn.LSTM 终极指南:从API原理到双向多层实战,彻底告别维度错误!
pytorch·rnn·lstm·多层lstm·api详解·序列模型·双向lstm