验证linux gpu是否可用

通过torch验证

python 复制代码
import torch
 
print(torch.__version__)  # 查看torch当前版本号
print(torch.version.cuda)  # 编译当前版本的torch使用的cuda版本号
print(torch.cuda.is_available())  # 查看当前cuda是否可用于当前版本的Torch,如果输出True,则表示可用
print(torch.backends.cudnn.version()) # 查看cudnn版本是否正确
print(torch.backends.cudnn.is_available())
相关推荐
Flynt1 天前
我实测了 HN 923 分的"浏览器跑 Linux":数字没有水分,水分在网速里
linux·浏览器·webassembly
八月瓜科技1 天前
专精特新企业如何搭建专利资产中台?三步落地法
大数据·数据库·人工智能·科技·深度学习·机器学习·oracle
timeDifference₇1 天前
Python Vibe Coding实操实验报告
开发语言·jvm·python
geovindu1 天前
python:DecisionTree
开发语言·后端·python·算法
怒放的生命19911 天前
代码知识库 RAG 问答系统 —— 从 0 到 1 实现教程
python·状态模式·fastapi·全栈开发·ai agent应用开发
geovindu1 天前
python: Decision Tree Regressor
开发语言·后端·python·算法·决策树
fengkai45451 天前
Python运维
运维·python·监控·psutil·ipy
Fancy.7611 天前
:Python条件与循环语句学习总结
python
Wellijohn1 天前
Python 容器选型实测:list.insert(0) 慢 925 倍,in 慢 6000 倍
python
新*1 天前
标题全变成一级?靠编号规律找回章节边界
python·正则表达式·pdf解析·文本处理