This PR migrates to using go-nvlib for enumerating NVIDIA PCI and vGPU devices on the system, as well as parsing the pci database file. go-nvlib contains a set of common go packages used across many cloud-native components, including the k8s-device-plugin and vgpu-device-manager.
The nvpci package is used for enumerating all NVIDIA PCI devices and creating the iommuMap and deviceMap which represent all of the passthrough GPUs. The nvmdev package is used for enumerating all NVIDIA vGPU devices and creating the vGgpuMap and gpuVgpuMap which represent all the vGPU devices. The pciids package is used for parsing the pci database.
This PR migrates to using go-nvlib for enumerating NVIDIA PCI and vGPU devices on the system, as well as parsing the pci database file.
go-nvlib
contains a set of common go packages used across many cloud-native components, including the k8s-device-plugin and vgpu-device-manager.The
nvpci
package is used for enumerating all NVIDIA PCI devices and creating theiommuMap
anddeviceMap
which represent all of the passthrough GPUs. Thenvmdev
package is used for enumerating all NVIDIA vGPU devices and creating thevGgpuMap
andgpuVgpuMap
which represent all the vGPU devices. Thepciids
package is used for parsing the pci database.cc @rthallisey @zvonkok @elezar @shivamerla