Revert "Revert "ggml: Export GPU UUIDs" (#11115)" (#11117)

Reverts PR #11115. The original change was mistakingly reverted instead of #10822
This commit is contained in:
Jeffrey Morgan
2025-06-18 07:30:49 -07:00
committed by GitHub
parent ed567ef43b
commit 6baf1e31e2
6 changed files with 151 additions and 0 deletions

View File

@@ -124,6 +124,10 @@ type DeviceMemory struct {
// may not be persistent across instances of the runner.
Name string
// UUID is a unique persistent identifier for the device for matching
// with system management libraries
UUID string
// Weights is the per-layer memory needed for the model weights.
Weights []Memory
@@ -152,6 +156,10 @@ func (m DeviceMemory) LogValue() slog.Value {
attrs = append(attrs, slog.Any("Graph", m.Graph))
}
if len(attrs) > 0 && m.UUID != "" {
attrs = append([]slog.Attr{slog.String("UUID", m.UUID)}, attrs...)
}
return slog.GroupValue(attrs...)
}