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

相关推荐
All The Way North-3 小时前
PyTorch ExponentialLR:按指数学习率衰减原理、API、参数详解、实战
pytorch·深度学习·学习率优化算法·按指数学习率衰减
likerhood4 小时前
4. pytorch线性回归
人工智能·pytorch·线性回归
likerhood4 小时前
5. pytorch第一个神经网络
人工智能·pytorch·神经网络
咕噜船长6 小时前
使用Qwen3-VL模型批量标注视频内容(视频理解)
人工智能·pytorch·深度学习·音视频·视频
LDG_AGI7 小时前
【推荐系统】深度学习训练框架(十七):TorchRec之KeyedJaggedTensor
人工智能·pytorch·深度学习·机器学习·数据挖掘·embedding
爱学习的张大8 小时前
如何选择正确版本的CUDA和PyTorch安装
人工智能·pytorch·python
Francek Chen9 小时前
【自然语言处理】应用03:情感分析:使用卷积神经网络
人工智能·pytorch·深度学习·神经网络·自然语言处理·cnn
likerhood9 小时前
6. pytorch 卷积神经网络
人工智能·pytorch·神经网络
free-elcmacom9 小时前
深度学习<1>PyTorch与TensorFlow新特性深度解析
人工智能·pytorch·python·深度学习·tensorflow
whitelbwwww1 天前
Pytorch--张量表示实际数据
人工智能·pytorch·python