Được TopGit lập chỉ mục từ metadata GitHub: nicolargo/nvidia-ml-py3 có 142 sao, viết chủ yếu bằng Python. Python 3 Bindings for the NVIDIA Management Library
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
PLEASE DID NOT USE IT ANYMORE AND SWITCH TO https://pypi.org/project/nvidia-ml-py/
======
pyNVML
Patched to support Python 3 (and Python 2)
Python bindings to the NVIDIA Management Library
Provides a Python interface to GPU management and monitoring functions.
This is a wrapper around the NVML library.
For information about the NVML library, see the NVML developer page
http://developer.nvidia.com/nvidia-management-library-nvml
Download the latest package from:
https://pypi.python.org/pypi/nvidia-ml-py3
Note this file can be run with 'python -m doctest -v README.txt'
although the results are system dependent
REQUIRES
Python 2.5, or an earlier version with the ctypes module.
INSTALLATION
sudo python setup.py install
or
pip install nvidia-ml-py3
USAGE
>>> from pynvml import *
>>> nvmlInit()
>>> print "Driver Version:", nvmlSystemGetDriverVersion()
Driver Version: 352.00
>>> deviceCount = nvmlDeviceGetCount()
>>> for i in range(deviceCount):
... handle = nvmlDeviceGetHandleByIndex(i)
... print "Device", i, ":", nvmlDeviceGetName(handle)
...
Device 0 : Tesla K40c
>>> nvmlShutdown()
Additionally, see nvidia_smi.py. A sample application.
FUNCTIONS
Python methods wrap NVML functions, implemented in a C shared library.
Each function's use is the same with the following exceptions:
Instead of returning error codes, failing error codes are raised as
Python exceptions.
nvmlReturn_t DECLDIR nvmlDeviceGetMemoryInfo(nvmlDevice_t device,
nvmlMemory_t *memory);
typedef struct nvmlMemory_st {
unsigned long long total;
unsigned long long free;
unsigned long long used;
} nvmlMemory_t;
>>> info = nvmlDeviceGetMemoryInfo(handle)
>>> print "Total memory:", info.total
Total memory: 5636292608
>>> print "Free memory:", info.free
Free memory: 5578420224
>>> print "Used memory:", info.used
Used memory: 57872384
Python handles string buffer creation.
::
nvmlReturn_t nvmlSystemGetDriverVersion(char* version,
unsigned int length);
>>> version = nvmlSystemGetDriverVersion();
>>> nvmlShutdown()
For usage information see the NVML documentation.
VARIABLES
All meaningful NVML constants and enums are exposed in Python.
The NVML_VALUE_NOT_AVAILABLE constant is not used. Instead None is mapped to the field.
RELEASE NOTES
Version 2.285.0
Added new functions for NVML 2.285. See NVML documentation for more information.
Ported to support Python 3.0 and Python 2.0 syntax.
Added nvidia_smi.py tool as a sample app.
Version 3.295.0
Added new functions for NVML 3.295. See NVML documentation for more information.
Updated nvidia_smi.py tool
Includes additional error handling
Version 4.304.0
Added new functions for NVML 4.304. See NVML documentation for more information.
Updated nvidia_smi.py tool
Version 4.304.3
Fixing nvmlUnitGetDeviceCount bug
Version 5.319.0
Added new functions for NVML 5.319. See NVML documentation for more information.
Version 6.340.0
Added new functions for NVML 6.340. See NVML documentation for more information.
Version 7.346.0
Added new functions for NVML 7.346. See NVML documentation for more information.
Version 7.352.0
Added new functions for NVML 7.352. See NVML documentation for more information.
COPYRIGHT
Copyright (c) 2011-2015, NVIDIA Corporation. All rights reserved.
LICENSE
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the NVIDIA Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/nicolargo/nvidia-ml-py3 là nguồn chính thức.
nicolargo/nvidia-ml-py3 có bao nhiêu sao?
nicolargo/nvidia-ml-py3 có 142 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/nicolargo/nvidia-ml-py3. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
nicolargo/nvidia-ml-py3 có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho nicolargo/nvidia-ml-py3. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
nicolargo/nvidia-ml-py3 còn đang phát triển không?
Commit gần nhất trên nicolargo/nvidia-ml-py3 là 2.3 năm trước (theo timestamp GitHub). Repo có 62 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
nicolargo/nvidia-ml-py3 viết bằng ngôn ngữ gì?
nicolargo/nvidia-ml-py3 chủ yếu viết bằng Python. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về nvidia-ml-py3?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về nvidia-ml-py3.