gpu命令cuda命令
# device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
os.environ["CUDA_VISIBLE_DEVICES"]="0,1"
# test=torch.cuda.is_available()
print(torch.cuda.device_count())
print(torch.cuda.get_device_name(1))
print(torch.cuda.current_device())
torch.cuda.set_device(0)

gpu命令cuda命令的更多相关文章
- linux管道命令grep命令参数及用法详解---附使用案例|grep
功能说明:查找文件里符合条件的字符串. 语 法:grep [-abcEFGhHilLnqrsvVwxy][-A<显示列数>][-B<显示列数>][-C<显示列数>] ...
- Linux常用命令学习2---(文件搜索命令locate find、命令搜索命令whereis which、字符串搜索命令grep、帮助命令man)
1.文件搜索命令:locate [文件名] 在后台数据库中按文件名搜索,搜索速度比find快,耗费资源更少 例子:locate test.txt,就会显示文件名包含 test.txt的所 ...
- linux命令:crontab命令(转)
一.crond简介 二.crond服务 三.crontab命令详解 四.使用注意事项 linux系统是由 cron (crond) 这个系统服务来控制的.Linux 系统上面原本就有非常多的计划性工作 ...
- win10 用cmake 3.5.2 和 vs 2015 update1 编译 GPU版本(cuda 8.0, cudnn v5 for cuda 8.0)
win10 用cmake 3.5.2 和 vs 2015 update1 编译 GPU版本(cuda 8.0, cudnn v5 for cuda 8.0) 用vs 2015打开 编译Release ...
- Linux 常用命令 :cd命令
ls命令是linux下最常用的命令.ls命令就是list的缩写缺省下ls用来打印出当前目录的清单如果ls指定其他目录那么就会显示指定目录里的文件及文件夹清单. 通过ls 命令不仅可以查看linu ...
- Linux 常用命令 :ls命令
ls命令是linux下最常用的命令.ls命令就是list的缩写缺省下ls用来打印出当前目录的清单如果ls指定其他目录那么就会显示指定目录里的文件及文件夹清单. 通过ls 命令不仅可以查看linu ...
- 《The Linux Command Line》 读书笔记02 关于命令的命令
<The Linux Command Line> 读书笔记02 关于命令的命令 命令的四种类型 type type—Indicate how a command name is inter ...
- GNU make规则的命令④书写命令
命令回显 通常, make 在执行命令行之前会把要执行的命令行输出到标准输出设备.我们称之为"回显",就好像我们在 shell 环境下输入命令执行时一样. 如果规则的命令行以字符& ...
- grep 和 wc命令 --- !管道命令!
Linux系统中grep命令是一种强大的文本搜索工具,它能使用正则表达式搜索文本,并把匹 配的行打印出来.grep全称是Global Regular Expr ession Print,表示全局正则表 ...
随机推荐
- python初学小记
使用PyCharm向世界打招呼! print (“Hello world!”) 介绍自己的基本信息的方法 name = input("name:")age = int(input( ...
- postfix+自签证书,实现加密传输
说明:当前在centos 6.x环境下: cd /etc/pki/tls/misc ./CA -newca ..... 生成根证书 openssl req -new -nodes -keyout ma ...
- react-native start停止在Loading dependency graph, done.
在试验的过程中. 发现运行 react-native start会卡住,停留在Loading dependency graph, done. 原因大概是之前运行过 react-native run-a ...
- Aspose Words、Excel导出等操作
/*Word先保存再输出-下载*/ strReportFilePath = Server.MapPath("~") + strReportFilePath; doc.Save(st ...
- random模块&hashlib模块
random模块1.random.randrange(1, 10):返回1-10之间的一个随机数,不包括102.random.randint(1,10):返回1-10之间的一个随机数,包括103.ra ...
- 机房收费系统vb.net之打包与部署(二)
版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/wangdan199112/article/details/28286365 ...
- day36 07-Hibernate抓取策略:many-to-one上的抓取策略
package cn.itcast.test; import java.util.List; import org.hibernate.Hibernate; import org.hibernate. ...
- 2019-9-2-windows-10「设置」应用完整ms-settings快捷方式汇总
title author date CreateTime categories windows-10「设置」应用完整ms-settings快捷方式汇总 lindexi 2019-09-02 12:57 ...
- Redis 复制、Sentinel的搭建和原理说明(转)
Redis 复制.Sentinel的搭建和原理说明 转自:http://www.cnblogs.com/zhoujinyi/p/5570024.html. 背景: Redis-Sentinel是Re ...
- 解决git的the remote end hung up问题_百度经验
使用git更新或提交中途有时出现The remote end hung up unexpectedly的异常,特别是资源库在国外的情况下.此问题可能由网络原因引起. 工具/原料 git 方法/步骤 ...