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

相关推荐
Sherlock Ma1 小时前
AI大模型面试题集锦:(1)基础入门题
人工智能·pytorch·自然语言处理·大模型·跳槽·机器翻译·改行学it
这张生成的图像能检测吗2 小时前
Wonder3D: 跨域扩散的单图像3D重建技术
pytorch·深度学习·机器学习·计算机视觉·3d·三维重建·扩散模型
小孟的CDN3 小时前
使用pytorch进行batch_size分批训练,并使用adam+lbfgs算法——波士顿房价预测
pytorch·算法·batch·代码·adam+lbfgs
爱ZW的小白猿3 小时前
【pytorch】tensorboard的使用
pytorch
淮北4945 小时前
图神经网络与pytorch
人工智能·pytorch·神经网络
爱ZW的小白猿6 小时前
【pytorch】transform的使用
pytorch
laocooon5238578867 小时前
TensorFlow与 PyTorch有什么关联么
人工智能·pytorch·tensorflow
盼小辉丶7 小时前
生成模型实战 | 残差流(Residual Flow)详解与实现
pytorch·深度学习·生成模型
IT老兵20251 天前
PyTorch DDP多GPU训练实践问题总结
人工智能·pytorch·python·分布式训练·ddp
All The Way North-1 天前
AdaGrad 深度解析:从数学原理到 PyTorch 实现,为什么它在稠密问题中“学不动”?
pytorch·深度学习·adagrad算法·梯度下降优化算法