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

相关推荐
2401_831896035 小时前
深度学习(1):pytorch
人工智能·pytorch·深度学习
浊酒南街20 小时前
Pytorch基础入门1
pytorch·python
啾啾Fun21 小时前
PyTorch 核心三件套:Tensor、Module、Autograd
人工智能·pytorch·python
阿巴阿阿巴巴巴巴1 天前
【深度学习】动手深度学习PyTorch版——安装书本附带的环境和代码(Windows11)
人工智能·pytorch·深度学习
马老c1 天前
[windows]torchsig 1.1.0 gr-spectrumdetect模块安装
pytorch
麦兜*2 天前
Spring Boot整合PyTorch Pruning工具链,模型瘦身手术
java·pytorch·spring boot·后端·spring cloud·ai编程·剪枝
无规则ai2 天前
动手学深度学习(pytorch版):第一章节——引言
人工智能·pytorch·深度学习·算法·机器学习
Gyoku Mint2 天前
自然语言处理×第四卷:文本特征与数据——她开始准备:每一次输入,都是为了更像你地说话
人工智能·pytorch·神经网络·语言模型·自然语言处理·数据分析·nlp
Ly2020Wj2 天前
pytorch入门3:使用pytorch进行多输出手写数据集模型预测
人工智能·pytorch·python
2202_756749692 天前
3深度学习Pytorch-神经网络--全连接神经网络、数据准备(构建数据类Dataset、TensorDataset 和数据加载器DataLoader)
pytorch·深度学习·神经网络·机器学习