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

相关推荐
嵌入式-老费2 小时前
自己动手写深度学习框架(pytorch入门)
人工智能·pytorch·深度学习
ifeng09189 小时前
HarmonyOS功耗优化实战:减少冗余计算与传感器合理调用
pytorch·华为·harmonyos
西猫雷婶13 小时前
CNN的四维Pytorch张量格式
人工智能·pytorch·python·深度学习·神经网络·机器学习·cnn
王哈哈^_^1 天前
Ubuntu系统CUDA完整安装指南
linux·运维·服务器·pytorch·ubuntu
学历真的很重要1 天前
PyTorch 零基础入门:从张量到 GPU 加速完全指南
人工智能·pytorch·后端·深度学习·语言模型·职场和发展
AAA小肥杨2 天前
探索K8s与AI的结合:PyTorch训练任务在k8s上调度实践
人工智能·pytorch·docker·ai·云原生·kubernetes
1***Q7842 天前
PyTorch图像分割实战,U-Net模型训练与部署
人工智能·pytorch·python
AI即插即用2 天前
即插即用涨点系列 (八):AMDNet 详解!AAAI 2025 SOTA,MLP 融合多尺度分解(MDM)与 AMS 的涨点新范式。
人工智能·pytorch·深度学习·目标检测·计算机视觉·transformer
Keep_Trying_Go2 天前
论文STEERER人群计数,车辆计数以及农作物计数算法详解(pytorch)
人工智能·pytorch·python
gzu_012 天前
基于昇腾 配置pytorch环境
人工智能·pytorch·python