NVIDIA / kubevirt-gpu-device-plugin

NVIDIA k8s device plugin for Kubevirt
BSD 3-Clause "New" or "Revised" License
209 stars 66 forks source link

Draft: Migrate to go-nvlib #73

Open cdesiniotis opened 1 year ago

cdesiniotis commented 1 year ago

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.

cc @rthallisey @zvonkok @elezar @shivamerla