cuda/nvml 库中的哪个函数 returns "nvmlDevice_t" 类型变量?
Which function returns "nvmlDevice_t" type variable in cuda/nvml library?
我正在使用 gpu,想获取 gpu 的序列号's.In NVIDIA Management Library 有一个我可以使用的函数。函数原型是。
nvmlReturn_t nvmlDeviceGetSerial ( nvmlDevice_t device, char* serial, unsigned int length );
第一个参数是"nvmlDevice_t device"。我找了很多都没有找到returns这个type.So我怎么能得到这个?
引自documentation序言:
This chapter describes that queries that NVML can perform against each
device. In each case the device is identified with an nvmlDevice_t
handle. This handle is obtained by calling one of
nvmlDeviceGetHandleByIndex(), nvmlDeviceGetHandleBySerial(),
nvmlDeviceGetHandleByPciBusId(). or nvmlDeviceGetHandleByUUID().
这样一来,获得所需句柄应该是不言自明的。
我正在使用 gpu,想获取 gpu 的序列号's.In NVIDIA Management Library 有一个我可以使用的函数。函数原型是。
nvmlReturn_t nvmlDeviceGetSerial ( nvmlDevice_t device, char* serial, unsigned int length );
第一个参数是"nvmlDevice_t device"。我找了很多都没有找到returns这个type.So我怎么能得到这个?
引自documentation序言:
This chapter describes that queries that NVML can perform against each device. In each case the device is identified with an nvmlDevice_t handle. This handle is obtained by calling one of nvmlDeviceGetHandleByIndex(), nvmlDeviceGetHandleBySerial(), nvmlDeviceGetHandleByPciBusId(). or nvmlDeviceGetHandleByUUID().
这样一来,获得所需句柄应该是不言自明的。