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

相关推荐
GoCodingInMyWay1 天前
PaddleOCR 开始
pytorch·ai·ocr
FriendshipT2 天前
ComfyUI 使用 MiniMax H3 进行文生视频
人工智能·pytorch·python·深度学习·音视频
天疆说3 天前
Ubuntu 26.04 下 Intel Meteor Lake 核显 + NPU 驱动配置与 PyTorch NPU 推理实测
linux·pytorch·ubuntu
程序猿编码3 天前
不用PyTorch,不用CUDA,我用C++手写了一个能跑GPT和Whisper的推理库
c++·pytorch·gpt·大模型·whisper
zhangfeng11333 天前
Windows AMD显卡跑PyTorch
人工智能·pytorch·windows
Eloudy4 天前
一键构建 pytorch cpp lib 前端和 wheel
人工智能·pytorch·gpu
FriendshipT4 天前
Ultralytics:解读 YOLO26 知识蒸馏
人工智能·pytorch·python·深度学习·yolo
一碗白开水一5 天前
入门实践工程十:PyTorch 模型量化与 ONNX 导出~附:安装依赖库及工程源码
人工智能·pytorch·python·rnn·深度学习·机器学习
hhzz5 天前
《深度学习框架PyTorch入门与实践》系列:04-nn模块详解:用积木搭建神经网络
pytorch·深度学习·神经网络
阳光开朗男孩5 天前
Pytorch的安装与配置
人工智能·pytorch·python