torch.cuda.is_available()返回false
【摘要】
torch.cuda.is_available()返回false
解决方法:已经安装torch的:
import platform import torch sysstr = platform.system()use_cuda = torch.cuda.is_available()print('cuda',torch.cud...
torch.cuda.is_available()返回false
解决方法:已经安装torch的:
-
import platform
-
-
import torch
-
-
sysstr = platform.system()
-
use_cuda = torch.cuda.is_available()
-
print('cuda',torch.cuda.is_available(),torch._C._cuda_getDriverVersion())
-
-
-
daa=torch.Tensor([1,23])
-
-
print(daa.cuda())
cuda10 不行的10000 411.31 升级完412.36
后来也不行,重装torch1.2.0
http://download.pytorch.org/whl/cu100/torch-1.2.0-cp36-cp36m-win_amd64.whl
cuda10 可以的 10020 442.19
没有安装torch的:
检查CUDA版本,目前Pytorch仅支持到CUDA 10.0版本。
检查驱动,更新到新版本。
cuda,cudnn安装后,我们可以验证是否配置成功,主要使用CUDA内置的deviceQuery.exe 和 bandwithTest.exe:
首先win+R启动cmd,cd到安装目录下的 ...\extras\demo_suite
,然后分别执行bandwidthTest.exe
和deviceQuery.exe
,应该得到下图:
Result=PASS,就验证通过了
文章来源: blog.csdn.net,作者:网奇,版权归原作者所有,如需转载,请联系作者。
原文链接:blog.csdn.net/jacke121/article/details/105289964
【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)