types.go 565 B

123456789101112131415161718192021222324
  1. package gpu
  2. type memInfo struct {
  3. TotalMemory uint64 `json:"total_memory,omitempty"`
  4. FreeMemory uint64 `json:"free_memory,omitempty"`
  5. DeviceCount uint32 `json:"device_count,omitempty"`
  6. }
  7. // Beginning of an `ollama info` command
  8. type GpuInfo struct {
  9. memInfo
  10. Library string `json:"library,omitempty"`
  11. // Optional variant to select (e.g. versions, cpu feature flags)
  12. Variant string `json:"variant,omitempty"`
  13. // TODO add other useful attributes about the card here for discovery information
  14. }
  15. type Version struct {
  16. Major uint
  17. Minor uint
  18. Patch uint
  19. }