Using scopeId NVML_POWER_SCOPE_MEMORY with nvmlDeviceGetFieldValues

Hello,

For the below discussion I was running on a machine with 1 * H100 and 1 * V100 using Cuda Toolkit 12.9.0. However, I will keep this discussion to just the H100.

When working with the function nvmlDeviceGetFieldValues, two member variables to set are:

  1. fieldId
  2. scopeId

In my current workflow, I have set fieldIdto NVML_FI_DEV_POWER_AVERAGEand scopeIdto NVML_POWER_SCOPE_MEMORY; however, this will result in the member variable nvmlReturn returning NVML_ERROR_NOT_SUPPORTED.

If I change the scopeIdto NVML_POWER_SCOPE_GPUI do not error and I get a value back.

As NVML_ERROR_NOT_SUPPORTEDmeans the requested operation is not available on the target device, is there a device that supports this operation?

From looking through nvml.h I gathered it may not be possible to use the scope NVML_POWER_SCOPE_MEMORYwith the function nvmlDeviceGetFieldValues due to how the sections are broken up, but I wanted to be certain if this indeed was the case.

Below is a reproducer:

nvml_get_device_field_vendor_reproducer.cu.txt (3.2 KB)

Best

From testing, setting fieldIdto NVML_FI_DEV_POWER_AVERAGEand scopeIdto NVML_POWER_SCOPE_MEMORYis successful on a NVIDIA GH200.

1 Like