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>
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>
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>
This change adds a GetGPUByPciBusID method to the nvpci Interface.
The exising NewDevice function is moved to nvmdev where it is used.
Signed-off-by: Evan Lezar <elezar@nvidia.com>
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>
For now this package only has functions to work with MIG profiles. More
functionality will be added here in the future.
Signed-off-by: Kevin Klues <kklues@nvidia.com>
Add the following functions to the Device interface:
* GetCudaComputeCapability
* GetAttributes
* GetName
Signed-off-by: Evan Lezar <elezar@nvidia.com>
There is a default implementation for these that is overwritten if the
underlying NVML library ends up being used.
Signed-off-by: Kevin Klues <kklues@nvidia.com>
The 'mdev' string now represents the absolute path to an
mdev device (/sys/bus/pci/devices/<addr>/<uuid>) instead
of the mdev_type directory for the mdev device
(/sys/bus/pci/devices/<addr>/mdev_supported_types/<mdev-type>).
This is more intuitive and will make it easier to get
more information about a particular mdev device -
like the driver or iommu_group it belongs to - which can
be found at /sys/bus/pci/devices/<addr>/<uuid>.
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
This change adds an nvinfo package with HasNVML and IsTegraSystem
functions. These functions can be used to control behaviour on
different platforms.
Signed-off-by: Evan Lezar <elezar@nvidia.com>