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

相关推荐
Li emily3 小时前
解决了加密货币api多币种订阅时的数据乱序问题
人工智能·python·api·fastapi
山川绿水4 小时前
bugku——PWN——overflow2
人工智能·web安全·网络安全
程序员cxuan4 小时前
微信读书官方发了 skills,把我给秀麻了。
人工智能·后端·程序员
fake_ss1984 小时前
AI时代学习全栈项目开发的新范式
java·人工智能·学习·架构·个人开发·学习方法
nassi_4 小时前
对AI工程问题的一些思考
大数据·人工智能·hadoop
AI技术控4 小时前
《Transformers are Inherently Succinct》论文解读:从“能表达什么”到“多紧凑地表达”
人工智能·python·深度学习·机器学习·自然语言处理
蔡俊锋4 小时前
AI记忆压缩术:从305GB到7.4GB的魔法
人工智能·ai·ai 记忆
Upsy-Daisy5 小时前
AI Agent 项目学习笔记(二):Spring AI 与 ChatClient 主链路解析
人工智能·笔记·学习
zhangxingchao5 小时前
AI应用开发六:企业知识库
前端·人工智能·后端
Terrence Shen5 小时前
关于传统软件工程后端技术和当代AI智能体agent构建的harness engineering的一点思考
人工智能·软件工程