You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some models of NVIDIA GPUs do not support the retrieval of power usages in NVML. These errors are currently suppressed and power usage retrieval is skipped.
It should instead throw a descriptive error when the GPU model does not support power retrieval (see power_usage() in nvidia.py).
See e.g. error by Princec711 when running this code snippet:
import pynvml
pynvml.nvmlInit()
device_indices = range(pynvml.nvmlDeviceGetCount())
handles = [pynvml.nvmlDeviceGetHandleByIndex(i) for i in device_indices]
for handle in handles:
name = pynvml.nvmlDeviceGetName(handle)
device = name.decode("utf-8")
power_usage = pynvml.nvmlDeviceGetPowerUsage(handle) / 1000
print(f"{device} uses {power_usage} W")
pynvml.nvmlShutdown()
---------------------------------------------------------------------------
NVMLError_NotSupported Traceback (most recent call last)
<ipython-input-2-7e19c443106e> in <module>
9 name = pynvml.nvmlDeviceGetName(handle)
10 device = name.decode("utf-8")
---> 11 power_usage = pynvml.nvmlDeviceGetPowerUsage(handle) / 1000
12 print(f"{device} uses {power_usage} W")
13
C:\ProgramData\Anaconda3\lib\site-packages\pynvml\nvml.py in nvmlDeviceGetPowerUsage(handle)
1243 fn = get_func_pointer("nvmlDeviceGetPowerUsage")
1244 ret = fn(handle, byref(c_mWatts))
-> 1245 check_return(ret)
1246 return c_mWatts.value
1247
C:\ProgramData\Anaconda3\lib\site-packages\pynvml\nvml.py in check_return(ret)
364 def check_return(ret):
365 if (ret != NVML_SUCCESS):
--> 366 raise NVMLError(ret)
367 return ret
368
NVMLError_NotSupported: Not Supported
Release 1.1.7 addresses this issue by informing the user of missing support for power usage retrieval through the NVML API and refers the user to this issue thread.
Some models of NVIDIA GPUs do not support the retrieval of power usages in NVML. These errors are currently suppressed and power usage retrieval is skipped.
It should instead throw a descriptive error when the GPU model does not support power retrieval (see
power_usage()
in nvidia.py).See e.g. error by Princec711 when running this code snippet:
Originally posted by @Princec711 in #33 (comment)
The text was updated successfully, but these errors were encountered: