PyTorch no longer supports this GPU because it is too old.
2018-03-23 18:44
1786 查看
今天在linux系统,gtx 960显卡, cuda 9.1版本上用pytorch操作显卡,报出了如下warning“PyTorch no longer supports this GPU because it is too old.”,且程序出现 Runtime Error。谷歌半天后,解决方法如下:
首先,我的 pytorch 是在安装完 anaconda 后用 pytorch 官网给出的 conda 指令直接安装的,谷歌上的大牛说这种方法对于一些老版本gpu不行,得卸载 pytorch 改用 source 的方法重新安装。大牛的具体说法如下: https://discuss.pytorch.org/t/found-gpu0-geforce-gtx-960m-which-is-of-cuda-capability-5-0/15135 卸载 pytorch 的指令:
conda uninstall pytorch
根据里面的提示,我们参考下面这个网站进行 pytorch 的 source 安装: https://github.com/pytorch/pytorch#installation 注意,当这里面的指令涉及到 cuda 版本的时候要根据自己电脑实际安装的 cuda 版本来填写,例如,cuda 8.0 就在指令中写 cuda80,我安装的是 cuda 9.1 所以在指令中写的就是 cuda91。另外就是,教程中需要填写 anaconda 的安装目录,不知道的小伙伴只要在终端执行“which anaconda”,就能得到它的完整路径了。
之后,根据里面的教程很顺利的安装完 pytorch 了,然后就迫不及待地打开 python 然后 import torch,结果又报错,can not import name_c,然后又查查查,发现问题居然是不能在 pytorch 的根目录 import torch,重新打开一个终端,再 import 一次问题就自动消失了(瀑布汗......)。
大牛的分析在此: https://blog.csdn.net/draco_mystack/article/details/71191924
这样再用 pytorch 操作显卡虽然仍会抛出 warning,但是不会影响程序运行。
首先,我的 pytorch 是在安装完 anaconda 后用 pytorch 官网给出的 conda 指令直接安装的,谷歌上的大牛说这种方法对于一些老版本gpu不行,得卸载 pytorch 改用 source 的方法重新安装。大牛的具体说法如下: https://discuss.pytorch.org/t/found-gpu0-geforce-gtx-960m-which-is-of-cuda-capability-5-0/15135 卸载 pytorch 的指令:
conda uninstall pytorch
根据里面的提示,我们参考下面这个网站进行 pytorch 的 source 安装: https://github.com/pytorch/pytorch#installation 注意,当这里面的指令涉及到 cuda 版本的时候要根据自己电脑实际安装的 cuda 版本来填写,例如,cuda 8.0 就在指令中写 cuda80,我安装的是 cuda 9.1 所以在指令中写的就是 cuda91。另外就是,教程中需要填写 anaconda 的安装目录,不知道的小伙伴只要在终端执行“which anaconda”,就能得到它的完整路径了。
之后,根据里面的教程很顺利的安装完 pytorch 了,然后就迫不及待地打开 python 然后 import torch,结果又报错,can not import name_c,然后又查查查,发现问题居然是不能在 pytorch 的根目录 import torch,重新打开一个终端,再 import 一次问题就自动消失了(瀑布汗......)。
大牛的分析在此: https://blog.csdn.net/draco_mystack/article/details/71191924
这样再用 pytorch 操作显卡虽然仍会抛出 warning,但是不会影响程序运行。
相关文章推荐
- It's because your R is too old
- 转:SVN 出现This client is too old to work with working copy...错误
- The service cannot be started, either because it is disabled or because it has no enabled deices ass
- CFURLCopyResourcePropertyForKey failed because it was passed this URL which has no scheme:
- Can't install '*' from pristine store, because no checksum is recorded for this file
- SVN 出现This client is too old to work with working copy...错误
- SVN版本问题:svn: E155021: This client is too old to work with the working copy at
- SVN版本问题:This client is too old to work with working copy
- eclipse 插件subclipse 错误 This client is too old to work with working copy
- SVN:This client is too old to work with working copy…解决的方法
- The database schema is too old to perform this operation in this SharePoint cluster. Please upgrade the database and...
- 微软职位内部推荐-This Job is no longer available.
- SVN This client is too old to work with working copy的问题
- SVN 出现This client is too old to work with working copy...错误
- Unity5.4.1与NGUI出现的问题Ignoring menu item NGUI because it is in no submenu!
- IDEA13+subversion1.8 svn问题"This client is too old"
- IDEA SVN 插件svn: This client is too old to work with working copy
- svn: This client is too old to work with the working...
- SVN update problem: This client is too old to work with working copy
- org.apache.subversion.javahl.ClientException: svn: E155021: This client is too old to work with the