查看pytorch对应的cuda版本

$ python
Python 3.7.0 (default, Jun 28 2018, 13:15:42) 
[GCC 7.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.version.cuda
'10.2'

查看torch版本

>>>
>>> import torch
>>> torch.__version__
'1.9.0+cu102'
>>> 

安装

python3下的安装

$sudo apt-get -y --force-yes install python3-pycuda

Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐