Skip to content

Commit c011712

Browse files
committed
More detailed log for number of found GPU devices / resource types
Signed-off-by: Eero Tamminen <[email protected]>
1 parent b56d1ec commit c011712

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cmd/gpu_plugin/gpu_plugin.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,13 @@ func (dp *devicePlugin) Scan(notifier dpapi.Notifier) error {
240240
klog.Warning("Failed to scan: ", err)
241241
}
242242

243-
found := len(devTree)
243+
found := 0
244+
for key := range devTree {
245+
found += len(devTree[key])
246+
}
244247
if found != previouslyFound {
245-
klog.V(1).Info("GPU scan update: devices found: ", found)
248+
klog.V(1).Infof("GPU scan update: %d device resources (with %dx sharing) of %d types found",
249+
found, dp.options.sharedDevNum, len(devTree))
246250
previouslyFound = found
247251
}
248252

0 commit comments

Comments
 (0)