Instantiate nvpci.Interface with logger

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2023-08-18 11:34:26 +02:00
parent 546f810159
commit 9ac313f551

View File

@ -73,6 +73,7 @@ func newAllPossible(logger logger.Interface, devRoot string) (nodeLister, error)
func (m allPossible) DeviceNodes() ([]deviceNode, error) {
gpus, err := nvpci.New(
nvpci.WithPCIDevicesRoot(filepath.Join(m.devRoot, nvpci.PCIDevicesRoot)),
nvpci.WithLogger(m.logger),
).GetGPUs()
if err != nil {
return nil, fmt.Errorf("failed to get GPU information: %v", err)