0
点赞
收藏
分享

微信扫一扫

阿里云大数据ACA及ACP复习题(61~80)

12a597c01003 2024-01-11 阅读 13

更加适合CUDA11.2的pytorch显卡版本

pip版本

pip install torch==1.12.0+cu113 torchvision==0.13.0+cu113 torchaudio==0.12.0 --extra-index-url https://download.pytorch.org/whl/cu113

conda版本

conda install pytorch==1.12.0 torchvision==0.13.0 torchaudio==0.12.0 cudatoolkit=11.3 -c pytorch

测试代码

import torch

if torch.cuda.is_available():
    device = torch.cuda.get_device_name(0)
    print(f"当前GPU型号: {device}")
else:
    print("未检测到可用的GPU")

举报

相关推荐

0 条评论