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