2023-11-29 19:00:37 +00:00
|
|
|
package gpu
|
|
|
|
|
2023-12-22 23:43:31 +00:00
|
|
|
type memInfo struct {
|
2023-11-29 19:00:37 +00:00
|
|
|
TotalMemory uint64 `json:"total_memory,omitempty"`
|
|
|
|
FreeMemory uint64 `json:"free_memory,omitempty"`
|
2024-01-09 20:53:33 +00:00
|
|
|
DeviceCount uint32 `json:"device_count,omitempty"`
|
2023-12-22 23:43:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Beginning of an `ollama info` command
|
|
|
|
type GpuInfo struct {
|
|
|
|
memInfo
|
|
|
|
Library string `json:"library,omitempty"`
|
2023-11-29 19:00:37 +00:00
|
|
|
|
2024-01-05 20:13:08 +00:00
|
|
|
// Optional variant to select (e.g. versions, cpu feature flags)
|
|
|
|
Variant string `json:"variant,omitempty"`
|
|
|
|
|
2023-11-29 19:00:37 +00:00
|
|
|
// TODO add other useful attributes about the card here for discovery information
|
|
|
|
}
|