Skip to content

Commit

Permalink
Support all NVidia devices (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 authored Oct 15, 2024
1 parent 9a01121 commit eaceba8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/register/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,12 @@ func (r *Register) detectGPUs() (pci.Devices, error) {
if !strings.Contains(strings.ToLower(device.VendorName), "nvidia") {
continue
}
r.log.Info("add gpu", "vendor", device.VendorName, "device", device.DeviceName, "classname", device.ClassName)

// TODO if new models must be supported, this code must be refactored
if strings.Contains(strings.ToLower(device.DeviceName), "rtx") {
r.log.Info("add gpu", "vendor", device.VendorName, "device", device.DeviceName)
result = append(result, device)
if !strings.Contains(strings.ToLower(device.ClassName), "display") {
continue
}
result = append(result, device)
}

return result, nil
Expand Down

0 comments on commit eaceba8

Please sign in to comment.