Serial Number from GPU from C++ (without using nvidia-smi)

Is there a method to read the GPU 2050/2070 serial number from a C++ (linux) application without calling nvidia-smi?


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/

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.



Thanks! I’ll have a look.


Works great!

Thanks again.