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.
NVML Permissions
----------------
Many of the `pynvml` wrappers assume that the underlying NVIDIA Management Library (NVML) API can be used without admin/root privileges. However, it is certainly possible for the system permissions to prevent pynvml from querying GPU performance counters. For example:
```
$ nvidia-smi nvlink -g 0
GPU 0: Tesla V100-SXM2-32GB (UUID: GPU-96ab329d-7a1f-73a8-a9b7-18b4b2855f92)
NVML: Unable to get the NvLink link utilization counter control for link 0: Insufficient Permissions
```
A simple way to check the permissions status is to look for `RmProfilingAdminOnly` in the driver `params` file (Note that `RmProfilingAdminOnly == 1` means that admin/sudo access is required):
For more information on setting/unsetting the relevant admin privileges, see [these notes](https://developer.nvidia.com/nvidia-development-tools-solutions-ERR_NVGPUCTRPERM-permission-issue-performance-counters) on resolving `ERR_NVGPUCTRPERM` errors.
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.
- Version 8.0.0
- Refactor code to a nvidia_smi singleton class
- Added DeviceQuery that returns a dictionary of (name, value).
- Added filter parameters on DeviceQuery to match query api in nvidia-smi
- Added filter parameters on XmlDeviceQuery to match query api in nvidia-smi
- Added integer enumeration for filter strings to reduce overhead for performance monitoring.
- Added loop(filter) method with async and callback support
- Version 8.0.1
- Restructuring directories into two packages (pynvml and nvidia_smi)
- Adding initial tests for both packages
- Some name-convention cleanup in pynvml
- Version 8.0.2
- Added NVLink function wrappers for pynvml module
- Version 8.0.3
- Added versioneer
- Fixed nvmlDeviceGetNvLinkUtilizationCounter bug
- Version 8.0.4
- Added nvmlDeviceGetTotalEnergyConsumption
- Added notes about NVML permissions
- Fixed version-check testing
- Version 11.0.0
- Updated nvml.py to CUDA 11
- Updated smi.py DeviceQuery to R460
- Aligned nvml.py with latest nvidia-ml-py deployment
- Version 11.4.0
- Updated nvml.py to CUDA 11.4
- Updated smi.py NVML_BRAND_NAMES
- Aligned nvml.py with latest nvidia-ml-py deployment (11.495.46)
- Version 11.4.1
- Fix comma bugs in nvml.py
- Version 11.5.0
- Updated nvml.py to support CUDA 11.5 and CUDA 12
- Aligned with latest nvidia-ml-py deployment (11.525.84)