Is there a method to read the GPU 2050/2070 serial number from a C++ (linux) application without calling nvidia-smi?
Thanks!
Is there a method to read the GPU 2050/2070 serial number from a C++ (linux) application without calling nvidia-smi?
Thanks!
Check out NVML. It is a public API for querying GPU information like this. The nvidia-smi tool is built on NVML.
NVML ships with the display driver and is typically installed to /usr/lib64/libnvidia-ml.so.
http://developer.download.nvidia.com/compute/DevZone/NVML/doxygen/index.html
Keep in mind that the serial number is a board serial number, as opposed to a GPU serial number.
Also worth noting, are the Perl and Python bindings to NVML.
http://search.cpan.org/search?query=nvidia%3A%3Aml
http://packages.python.org/nvidia-ml-py/
-Robert
Robert,
Thanks! I’ll have a look.
Robert,
Works great!
Thanks again.