Merge pull request #20025 from wanyaoqi/fix/gpu-probe

fix(host): fix gpu device vendor check strategy
This commit is contained in:
Zexi Li
2024-04-16 18:18:00 +08:00
committed by GitHub

View File

@@ -95,7 +95,7 @@ func getPassthroughGPUs(filteredAddrs []string, enableWhitelist bool, whitelistM
if !utils.IsInArray(dev.ClassCode, GpuClassCodes) {
continue
}
if !utils.IsInStringArray(dev.VendorId, []string{api.NVIDIA_VENDOR_ID, api.AMD_VENDOR_ID}) {
if dev.ClassCode == CLASS_CODE_DISP && !utils.IsInStringArray(dev.VendorId, []string{api.NVIDIA_VENDOR_ID, api.AMD_VENDOR_ID}) {
log.Infof("Skip add device %s vendor is unsupport", dev.Addr)
continue
}