Skip to content

Commit af030d0

Browse files
committed
extra debugging logs
Signed-off-by: Avi Deitcher <[email protected]>
1 parent 428be39 commit af030d0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/nvcdi/full-gpu-nvml.go

+7
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,23 @@ var _ discover.Discover = (*byPathHookDiscoverer)(nil)
8484

8585
// newFullGPUDiscoverer creates a discoverer for the full GPU defined by the specified device.
8686
func newFullGPUDiscoverer(logger logger.Interface, devRoot string, nvidiaCDIHookPath string, d device.Device) (discover.Discover, error) {
87+
logger.Debugf("newFullGPUDiscoverer() devRoot %s device %#v", devRoot, d)
8788
// TODO: The functionality to get device paths should be integrated into the go-nvlib/pkg/device.Device interface.
8889
// This will allow reuse here and in other code where the paths are queried such as the NVIDIA device plugin.
8990
minor, ret := d.GetMinorNumber()
9091
if ret != nvml.SUCCESS {
9192
return nil, fmt.Errorf("error getting GPU device minor number: %v", ret)
9293
}
9394
path := fmt.Sprintf("/dev/nvidia%d", minor)
95+
logger.Debugf("newFullGPUDiscoverer() minor %d", minor)
9496

9597
pciInfo, ret := d.GetPciInfo()
9698
if ret != nvml.SUCCESS {
9799
return nil, fmt.Errorf("error getting PCI info for device: %v", ret)
98100
}
101+
logger.Debugf("newFullGPUDiscoverer() pciInfo %#v", pciInfo)
99102
pciBusID := getBusID(pciInfo)
103+
logger.Debugf("newFullGPUDiscoverer() pciBusID %s", pciBusID)
100104

101105
drmDeviceNodes, err := drm.GetDeviceNodesByBusID(pciBusID)
102106
if err != nil {
@@ -172,7 +176,9 @@ func (d *byPathHookDiscoverer) Mounts() ([]discover.Mount, error) {
172176
}
173177

174178
func (d *byPathHookDiscoverer) deviceNodeLinks() ([]string, error) {
179+
d.logger.Debugf("byPathHookDiscoverer.deviceNodeLinks() for %#v", *d)
175180
devices, err := d.deviceNodes.Devices()
181+
d.logger.Debugf("byPathHookDiscoverer.deviceNodeLinks() devices %#v", devices)
176182
if err != nil {
177183
return nil, fmt.Errorf("failed to discover device nodes: %v", err)
178184
}
@@ -190,6 +196,7 @@ func (d *byPathHookDiscoverer) deviceNodeLinks() ([]string, error) {
190196
fmt.Sprintf("/dev/dri/by-path/pci-%s-card", d.pciBusID),
191197
fmt.Sprintf("/dev/dri/by-path/pci-%s-render", d.pciBusID),
192198
}
199+
d.logger.Debugf("byPathHookDiscoverer.deviceNodeLinks() candidates %v", candidates)
193200

194201
var links []string
195202
for _, c := range candidates {

0 commit comments

Comments
 (0)