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

相关推荐
数据与后端架构提升之路14 小时前
深度学习学习率调度器指南:PyTorch 四大 scheduler 对决
人工智能·pytorch·深度学习·调度器
越轨15 小时前
【Pytorch学习笔记】模型模块08——AlexNet模型详解
人工智能·pytorch·笔记·深度学习·学习·机器学习
leo030816 小时前
torch.distributed.launch 、 torchrun 和 torch.distributed.run 无法与 nohup 兼容
人工智能·pytorch·python·深度学习·分布式训练
请输入验证码16 小时前
PyTorch 入门学习笔记(数字识别实战)
人工智能·pytorch·python·神经网络
西猫雷婶18 小时前
深度学习|pytorch基本运算-乘除法和幂运算
人工智能·pytorch·深度学习
YYXZZ。。18 小时前
PyTorch——线性层及其他层介绍(6)
pytorch·python·深度学习
YYXZZ。。1 天前
PyTorch——卷积层(3)
人工智能·pytorch·python
YYXZZ。。1 天前
PyTorch——卷积操作(2)
人工智能·pytorch·python
YYXZZ。。1 天前
PyTorch-Transforms的使用(二)
人工智能·pytorch·python
扫地僧9852 天前
2023 年 PYTORCH[特殊字符]深入课程
人工智能·pytorch·python