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

相关推荐
蹦蹦跳跳真可爱5898 小时前
Python----大模型(GPT-2模型训练,预测)
开发语言·人工智能·pytorch·python·gpt·深度学习·embedding
子夜江寒13 小时前
基于 PyTroch 的卷积神经网络在图像分类中应用与实践
pytorch·cnn
心态特好15 小时前
pytorch和tenserflow详解
人工智能·pytorch·python
重生之我要成为代码大佬16 小时前
深度学习2-在2024pycharm版本中导入pytorch
人工智能·pytorch·深度学习
Easonmax17 小时前
从0到1:Qwen-1.8B-Chat 在昇腾Atlas 800T A2上的部署与实战指南前言
人工智能·pytorch·深度学习
BOF_dcb1 天前
【无标题】
pytorch·深度学习·机器学习
Keep_Trying_Go1 天前
文生图算法C4Synth: Cross-Caption Cycle-Consistent Text-to-Image Synthesis详解
人工智能·pytorch·深度学习·计算机视觉·文生图
Niuguangshuo1 天前
# PyTorch 中 `nn.ModuleList` 详解
人工智能·pytorch·python
TonyLee0172 天前
卷积操作记录(pytorch)
人工智能·pytorch·深度学习
其美杰布-富贵-李2 天前
PyTorch Lightning 中 TorchMetrics
人工智能·pytorch·python·计算损失