Merge pull request #20027 from wanyaoqi/automated-cherry-pick-of-#20025-upstream-master

Automated cherry pick of #20025: fix(host): fix gpu device vendor check strategy
This commit is contained in:
Zexi Li
2024-04-16 18:19:37 +08:00
committed by GitHub
+1 -1
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
}