【debug】解决 5070ti 与 pytorch 版本不兼容的问题

遇到的报错:

packages\torch\cuda\init.py:435: UserWarning: Found GPU0 NVIDIA GeForce RTX 5070 Ti Laptop GPU which is of cuda capability 12.0. Minimum and Maximum cuda capability supported by this version of PyTorch is (5.0) - (9.0) queued_call() D:\my_programs\Anconda\conda_envs\rec\lib\site-packages\torch\cuda\init.py:435: UserWarning: Please install PyTorch with a following CUDA configurations: 12.8 13.0 following instructions at https://pytorch.org/get-started/locally/ queued_call() D:\my_programs\Anconda\conda_envs\rec\lib\site-packages\torch\cuda\init.py:435: UserWarning: NVIDIA GeForce RTX 5070 Ti Laptop GPU with CUDA capability sm_120 is not compatible with the current PyTorch installation. The current PyTorch install supports CUDA capabilities sm_50 sm_60 sm_61 sm_70 sm_75 sm_80 sm_86 sm_90. If you want to use the NVIDIA GeForce RTX 5070 Ti Laptop GPU GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/ queued_call()

5070ti 与 pytorch 版本不兼容,cuda 与 pytorch 不兼容

核心宗旨是确保:

nvidia-smi查到的可容纳的最大cuda的版本>=cuda版本>=pytorch版本

比如:

我查到的是12.8,那么我的cuda也下载12.8

接下来 pytorch 在Get Started中选择12.8的nightly,进入所给pip里面的链接

下载torch, torchvision( torchvision要比torch日期晚一天)到本地,然后:pip install 本地的下载路径

比如我的是:torchvision-0.25.0.dev20251124 +cu128-cp310-cp310-win_amd64.whl和orch- 2.10.0.dev20251123+cu128-cp310-cp310-win_amd64.whl

测试文件:

复制代码
import torch
print(torch.cuda.is_available())  # 应该返回 True
print(torch.cuda.current_device())  # 获取当前设备
print(torch.cuda.get_device_name(0))  # 获取第一个 GPU 的名字
print(torch.cuda.get_arch_list())  # 应包含'sm_120'

成功有了sm_120:

相关推荐
回眸&啤酒鸭3 天前
【回眸】Minicart 电商购物车核心功能落地指南
人工智能
一隅论数智3 天前
给AI一张“业务概念地图“:本体如何从哲学走向企业智能
大数据·人工智能·经验分享·笔记·学习·学习方法·政务
默_笙3 天前
🍙 给每个请求过安检:FastAPI 是怎么把校验写进类型注解的
python
AI的探索之旅3 天前
97 个 OpenCV 实例(三十):双目立体,从标定到点云
人工智能·opencv·计算机视觉
AlbertZein3 天前
Step-5-Preview 上手实测:3D 游戏、金融分析、网页设计一次跑完
人工智能·aigc
LaughingZhu3 天前
Product Hunt 每日热榜 | 2026-09-19
人工智能·深度学习·神经网络·搜索引擎·百度
qq_426003963 天前
启动playwright录制codegen生成自动化测试脚本
python·自动化
虎头金猫3 天前
4K 视频总卡在公网带宽?用 N1 + OpenList 把网盘播放链路重新理顺
运维·服务器·网络·python·容器·beautifulsoup·pandas
美狐美颜SDK开放平台3 天前
开发直播APP时如何接入视频美颜SDK?开发流程与注意事项
android·人工智能·计算机视觉·音视频·直播美颜sdk