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

11次阅读
没有评论

由于自己笔记本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版本号

正文完
 0