pynvml_utils
NVML_VALUE_NOT_AVAILABLE_uint = c_uint(-1)
module-attribute
Field Identifiers.
All Identifiers pertain to a device. Each ID is only used once and is guaranteed never to change.
NVMLError
Bases: Exception
Source code in omnigibson/utils/pynvml_utils.py
__new__(typ, value)
Maps value to a proper subclass of NVMLError. See _extractNVMLErrorsAsClasses function for more details
Source code in omnigibson/utils/pynvml_utils.py
convertStrBytes(func)
In python 3, strings are unicode instead of bytes, and need to be converted for ctypes Args from caller: (1, 'string', <main.c_nvmlDevice_t at 0xFFFFFFFF>) Args passed to function: (1, b'string', <main.c_nvmlDevice_t at 0xFFFFFFFF)>
Returned from function: b'returned string' Returned to caller: 'returned string'