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

相关推荐
FriendshipT9 小时前
图像生成:PyTorch从零开始实现一个简单的扩散模型
人工智能·pytorch·python
zhan11451412 小时前
解析平面卷积/pytorch的nn.Conv2d的计算步骤,in_channels与out_channels如何计算而来
人工智能·pytorch·深度学习·cnn·卷积神经网络
Xander W14 小时前
基于K8s集群的PyTorch DDP 框架分布式训练测试(开发机版)
人工智能·pytorch·分布式·python·深度学习·kubernetes
Wah-Aug14 小时前
基于 PyTorch 的 UNet 与 NestedUNet 图像分割
人工智能·pytorch·计算机视觉
MDLZH1 天前
WSL实践二
人工智能·pytorch·深度学习
倦王1 天前
PyTorch图片数据载入方法
人工智能·pytorch·python
Anson Jiang2 天前
PyTorch轻松实现CV模型:零基础到实战
pytorch·python·django·flask·python开发
10岁的博客2 天前
PyTorch快速搭建CV模型实战
人工智能·pytorch·python
Geoking.2 天前
PyTorch torch.unique() 基础与实战
人工智能·pytorch·python
be_humble3 天前
GPU机器-显卡占用
pytorch·python·深度学习