mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 10:26:53 +02:00
Fix windows system memory lookup
This refines the gpu package error handling and fixes a bug with the system memory lookup on windows.
This commit is contained in:
parent
5fea4410be
commit
a2ad952440
8 changed files with 68 additions and 20 deletions
|
@ -18,12 +18,18 @@ func CheckVRAM() (int64, error) {
|
|||
|
||||
func GetGPUInfo() GpuInfo {
|
||||
// TODO - Metal vs. x86 macs...
|
||||
|
||||
mem, _ := getCPUMem()
|
||||
return GpuInfo{
|
||||
Library: "default",
|
||||
Library: "default",
|
||||
memInfo: mem,
|
||||
}
|
||||
}
|
||||
|
||||
func getCPUMem() (memInfo, error) {
|
||||
return memInfo{
|
||||
TotalMemory: 0,
|
||||
FreeMemory: 0,
|
||||
}
|
||||
}, nil
|
||||
}
|
||||
|
||||
func NumGPU(numLayer, fileSizeBytes int64, opts api.Options) int {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue