Home

Awesome

[!WARNING]

The pynvml module is NOT developed or maintained in this project!

This project provides unofficial NVML Python utilities (i.e. the pynvml_utils module). The pynvml_utils module is intended for demonstration purposes only. There is no guarantee for long-term maintenence or support.

The pynvml_utils module depends on the official NVML bindings published by NVIDIA under a different nvidia-ml-py project (see: https://pypi.org/project/nvidia-ml-py/).

Python utilities for the NVIDIA Management Library

This project provides unofficial Python utilities for the NVIDIA Management Library (NVML).

For information about the NVML library, see the NVML developer page http://developer.nvidia.com/nvidia-management-library-nvml

Requires

nvidia-ml-py.

Installation

pip install .

Usage

Bindings for the high-level nvidia-smi API are available in pynvml_utils.nvidia_smi:

[!WARNING] The nvidia_smi module is intended for demonstration purposes only. There is no guarantee for long-term maintenence or support.

from pynvml_utils import nvidia_smi
nvsmi = nvidia_smi.getInstance()
nvsmi.DeviceQuery('memory.free, memory.total')
from pynvml_utils import nvidia_smi
nvsmi = nvidia_smi.getInstance()
print(nvsmi.DeviceQuery('--help-query-gpu'), end='\n')

Release Notes

Old Releases