Closed csbnw closed 2 months ago
Nice addition, is it worth adding a test for this new functionality?
That is a good idea, a test is added.
Note that the unit of power is not mentioned in cudawrappers. Like for the other wrapped API calls, users should refer to the NVIDIA documentation for details.
Description
Support for
nvmlFieldValue_t
was added in CUDA 12 and can (amongst other things) be used to query power usage for a CUDA device. In earlier CUDA versions (e.g. CUDA 11.8), it was common to usenvmlDeviceGetPowerUsage
, but it is missing from the API. This function has therefore been added to thenvml::Device
class asgetPower
so that one can query power usage even when using older versions of CUDA.Related issues:
Instructions to review the pull request