types.go 671 Bytes
Newer Older
1
2
package gpu

3
type memInfo struct {
4
5
	TotalMemory uint64 `json:"total_memory,omitempty"`
	FreeMemory  uint64 `json:"free_memory,omitempty"`
6
	DeviceCount uint32 `json:"device_count,omitempty"`
7
8
9
10
11
12
}

// Beginning of an `ollama info` command
type GpuInfo struct {
	memInfo
	Library string `json:"library,omitempty"`
13

14
15
16
	// Optional variant to select (e.g. versions, cpu feature flags)
	Variant string `json:"variant,omitempty"`

Michael Yang's avatar
Michael Yang committed
17
	// MinimumMemory represents the minimum memory required to use the GPU
Michael Yang's avatar
Michael Yang committed
18
	MinimumMemory uint64 `json:"-"`
Michael Yang's avatar
Michael Yang committed
19

20
21
	// TODO add other useful attributes about the card here for discovery information
}
22
23
24
25
26
27

type Version struct {
	Major uint
	Minor uint
	Patch uint
}