查询当前pytorch安装的对应cuda版本号

2022年12月25日08:55:16

由于自己笔记本cuda是11.1版本,安装图网络学习框架DGL总是环境问题报错,如:
gl._ffi.base.DGLError: [10:54:05] C:\Users\Administrator\dgl\src\runtime\c_runtime_api.cc:87: Check failed: allow_missin
g: Device API gpu is not enabled. Please install the cuda version of dgl.
发现DGL包需要跟环境中pytorch安装cuda版本一致,因此记录。

查询当前pytorch对应cuda版本号,在终端输入:

python
import torch
print(torch.version.cuda)

查询当前pytorch安装的对应cuda版本号

  • 作者:外星人喵宁
  • 原文链接:https://blog.csdn.net/qq_38667212/article/details/123950694
    更新时间:2022年12月25日08:55:16 ,共 321 字。