使用SoapUI测试webservice接口详细步骤
520
2022-09-03
python版本的两款NVIDIA显卡管理查询工具
本文所述如题;
给出两个python版本的NVIDIA显卡管理查询工具
1. py3nvml
github下载地址:
3.5+.
Installation
From PyPi:
$ pip install py3nvml
From GitHub:
$ pip install -e git+download and pip install:
$ git clone cd py3nvml$ pip install .
2. pyvnml
github地址:
3, or an earlier version with the ctypes module.
Installation
pip install .
Usage
You can use the lower level nvml bindings
>>> from pynvml import *>>> nvmlInit()>>> print("Driver Version:", nvmlSystemGetDriverVersion())Driver Version: 410.00>>> deviceCount = nvmlDeviceGetCount()>>> for i in range(deviceCount):... handle = nvmlDeviceGetHandleByIndex(i)... print("Device", i, ":", nvmlDeviceGetName(handle))...Device 0 : Tesla V100>>> nvmlShutdown()
Or the higher level nvidia_smi API
from pynvml.smi import nvidia_sminvsmi = nvidia_smi.getInstance()nvsmi.DeviceQuery('memory.free, memory.total')
from pynvml.smi import nvidia_sminvsmi = nvidia_smi.getInstance()print(nvsmi.DeviceQuery('--help-query-gpu'), end='\n')
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~