【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:

相关推荐
Yao.Li1 小时前
PVN3D ORT CUDA Custom Ops 实现与联调记录
人工智能·3d·具身智能
诺伦1 小时前
LocalClaw 在智能制造的新机会:6部门AI+电商政策下的工厂AI升级方案
人工智能·制造
疯狂成瘾者1 小时前
语义分块提升RAG检索精度
python
小陈工3 小时前
Python Web开发入门(十七):Vue.js与Python后端集成——让前后端真正“握手言和“
开发语言·前端·javascript·数据库·vue.js·人工智能·python
A__tao7 小时前
Elasticsearch Mapping 一键生成 Java 实体类(支持嵌套 + 自动过滤注释)
java·python·elasticsearch
墨染天姬7 小时前
【AI】端侧AIBOX可以部署哪些智能体
人工智能
研究点啥好呢7 小时前
Github热门项目推荐 | 创建你的像素风格!
c++·python·node.js·github·开源软件
AI成长日志7 小时前
【Agentic RL】1.1 什么是Agentic RL:从传统RL到智能体学习
人工智能·学习·算法
2501_948114247 小时前
2026年大模型API聚合平台技术评测:企业级接入层的治理演进与星链4SAPI架构观察
大数据·人工智能·gpt·架构·claude
小小工匠7 小时前
LLM - awesome-design-md 从 DESIGN.md 到“可对话的设计系统”:用纯文本驱动 AI 生成一致 UI 的新范式
人工智能·ui