Kevin Klues
18ad7cd513
Merge branch 'add-brand' into 'main'
...
Pass device.GetBrand() through from NVML and wrap it to print a string
See merge request nvidia/cloud-native/go-nvlib!37
2023-03-27 17:12:25 +00:00
Kevin Klues
8d1b98baa6
Fix bug where MigProfile.Equals() would not work with wrapper type
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-27 16:43:56 +00:00
Kevin Klues
2b4f40a90b
Extract MockNVDeviceLib into helper function in nvdev tests
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-27 16:42:42 +00:00
Kevin Klues
82adde1bf4
Remove redundant tests and fix misleading tests
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-27 10:08:21 +00:00
Kevin Klues
18957773f2
Add function for AssertValidMigProfileFormat
...
This does not verify that the profile is a valid profile for the current
platform, but rather that it simply adheres to the proper formatting of a MIG
profile string.
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-27 10:04:32 +00:00
Kevin Klues
087de4f458
Pass device.GetBrand() through from NVMl and wrap it to print a string
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-26 21:15:51 +00:00
Kevin Klues
8c50f9f18f
Fix bug in heuristic for which MIG profiles to skip
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-25 22:01:20 +00:00
Kevin Klues
500a464b22
Cache mig profiles in devicelib, not just each device
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-25 18:48:18 +00:00
Kevin Klues
631bde023f
Add ability to query device architeture and cuda compute capability
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-24 14:24:19 +00:00
Kevin Klues
642041d1e0
Update mig-profile parsing / name generation after go-nvml v12.0 bump
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2023-03-23 19:29:57 +00:00
Kevin Klues
264c5dab79
Add NewDeviceByUUID() and NewMigDeviceByUUID() calls to nvlib.device
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2022-12-08 14:53:50 +00:00
Evan Lezar
7e5501f6a3
Skip DGX Display devices in addition to NVIDIA DGX Display devices
...
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2022-12-07 11:40:09 +01:00
Evan Lezar
1fc1eee392
Remove WithSelecteDeviceClasses option
...
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2022-11-21 15:47:44 +01:00
Evan Lezar
655eb9795c
Skip display devices based on device names
...
This allows devices to be skipped based on device names and
skips "NVIDIA DGX Display" devices by default.
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2022-11-21 15:46:15 +01:00
Evan Lezar
fa5d0408ce
Ensure pci bus ID is lower case
...
The PCI Bus ID returned by NVML is upper case and results in the following error:
error getting PCI device class for device:
failed to construct PCI device:
unable to read PCI device vendor id for 0000:0A:00.0:
open /sys/bus/pci/devices/0000:0A:00.0/vendor:
no such file or directory
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2022-11-16 12:12:07 +01:00
Evan Lezar
e37e145458
Add filtering of devices based on PCI device class
...
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2022-11-16 10:30:49 +01:00
Evan Lezar
f156c34310
Add private constructor for creating a device
...
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2022-11-15 17:42:22 +01:00
Evan Lezar
8b5e3d224d
Ensure that invalid MIG profiles are skipped
...
Signed-off-by: Evan Lezar <elezar@nvidia.com>
2022-10-14 10:31:50 +02:00
Kevin Klues
f933892965
Add extended APIs for top-level devices to the device package
...
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2022-09-16 13:34:17 +00:00
Kevin Klues
1d680a93b6
Move MIG apis to device package
...
We decided it makes sense to have top level device and MIG device abstractions
all under one package rather than trying to separate them. It will make it
easier to hav them clal between each other without package dependency loops.
Signed-off-by: Kevin Klues <kklues@nvidia.com>
2022-09-16 13:09:09 +00:00