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

相关推荐
大模型真好玩16 小时前
大模型训练全流程实战指南基础篇(二)——大模型文件结构解读与原理解析
人工智能·pytorch·langchain
棒棒的皮皮17 小时前
【深度学习】YOLO 模型核心部署格式全解析(PyTorch/ONNX/TensorRT/TFLite)
pytorch·深度学习·yolo·计算机视觉
koo36418 小时前
pytorch深度学习笔记15
pytorch·笔记·深度学习
程序员老赵19 小时前
PyTorch Docker 容器化部署与生产运行实践
pytorch·docker·容器
有为少年20 小时前
PyTorch 的统计三剑客:bucketize, bincount 与 histogram
pytorch·python·学习·机器学习·统计
姓刘的哦21 小时前
推理PyTorch模型的方法
人工智能·pytorch·python
__如风__21 小时前
国产海光CPU+DCU+麒麟OS上使用Docker成功部署PaddleSpeech实战
pytorch·python·paddlepaddle
躺平的赶海人21 小时前
PyTorch 安装指南:快速开启深度学习之旅
人工智能·pytorch·深度学习
:mnong1 天前
深度学习框架TensorFlow与PyTorch的对比
pytorch·深度学习·tensorflow
知乎的哥廷根数学学派1 天前
面向可信机械故障诊断的自适应置信度惩罚深度校准算法(Pytorch)
人工智能·pytorch·python·深度学习·算法·机器学习·矩阵