torch.cuda.is_available()返回flase 问题排查

查看torch版本是否为GPU版本

复制代码
import torch
print(torch.__version__)    //我的是CPU版本

如果不是GPU版本下载GPU版本

  • 查看cuda版本

    nvcc --version

    nvcc: NVIDIA (R) Cuda compiler driver
    Copyright (c) 2005-2022 NVIDIA Corporation
    Built on Wed_Sep_21_10:41:10_Pacific_Daylight_Time_2022
    Cuda compilation tools, release 11.8, V11.8.89
    Build cuda_11.8.r11.8/compiler.31833905_0 //我的是11.8版本

  • 下载与cuda版本一致的pytorch

    //下载pytorch 11.8版本,去pytorch官网生成11.8对应的pytorch版本

    pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

相关推荐
It's now7 小时前
Spring AI 基础开发流程
java·人工智能·后端·spring
Glad_R7 小时前
巧用AI流程图,让信息呈现更全面
人工智能·信息可视化·产品运营·流程图·产品经理
西南胶带の池上桜7 小时前
1.Pytorch模型应用(线性与非线性预测)
人工智能·pytorch·python
杀生丸学AI7 小时前
【无标题】VGGT4D:用于4D场景重建的视觉Transformer运动线索挖掘
人工智能·深度学习·3d·aigc·transformer·三维重建·视觉大模型
小和尚同志8 小时前
还在手动配置?这款开源软件让你一键配置 Claude Code 和 Codex
人工智能·aigc
阿正的梦工坊8 小时前
ProRL:延长强化学习训练,扩展大语言模型推理边界——NeurIPS 2025论文解读
人工智能·语言模型·自然语言处理
致Great8 小时前
Ollama 进阶指南
人工智能·gpt·chatgpt·agent·智能体
Nautiluss8 小时前
一起玩XVF3800麦克风阵列(八)
大数据·人工智能·嵌入式硬件·github·音频·语音识别
yzx9910138 小时前
人工智能大模型新浪潮:五大突破性工具深度解析
人工智能