types.go 671 B

123456789101112131415161718192021222324252627
  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. // MinimumMemory represents the minimum memory required to use the GPU
  14. MinimumMemory uint64 `json:"-"`
  15. // TODO add other useful attributes about the card here for discovery information
  16. }
  17. type Version struct {
  18. Major uint
  19. Minor uint
  20. Patch uint
  21. }