mirror of
https://github.com/clearml/go-nvlib
synced 2025-06-26 18:28:08 +00:00
Allow options to be passed when creating an instance of the nvpci interface
Signed-off-by: Christopher Desiniotis <cdesiniotis@nvidia.com>
This commit is contained in:
@@ -380,5 +380,7 @@ func (p *ParentDevice) GetAvailableMDEVInstances(mdevType string) (int, error) {
|
||||
func newNvidiaPCIDeviceFromPath(devicePath string) (*nvpci.NvidiaPCIDevice, error) {
|
||||
root := filepath.Dir(devicePath)
|
||||
address := filepath.Base(devicePath)
|
||||
return nvpci.NewFrom(root).GetGPUByPciBusID(address)
|
||||
return nvpci.New(
|
||||
nvpci.WithPCIDevicesRoot(root),
|
||||
).GetGPUByPciBusID(address)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user