mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 02:16:36 +02:00
gpu: add 512MiB to darwin minimum, metal doesn't have partial offloading overhead (#4068)
This commit is contained in:
parent
b9f74ff3d6
commit
f0c454ab57
2 changed files with 12 additions and 1 deletions
|
@ -10,6 +10,12 @@ package gpu
|
|||
import "C"
|
||||
import (
|
||||
"runtime"
|
||||
|
||||
"github.com/ollama/ollama/format"
|
||||
)
|
||||
|
||||
const (
|
||||
metalMinimumMemory = 512 * format.MebiByte
|
||||
)
|
||||
|
||||
func GetGPUInfo() GpuInfoList {
|
||||
|
@ -32,7 +38,7 @@ func GetGPUInfo() GpuInfoList {
|
|||
// TODO is there a way to gather actual allocated video memory? (currentAllocatedSize doesn't work)
|
||||
info.FreeMemory = info.TotalMemory
|
||||
|
||||
info.MinimumMemory = 0
|
||||
info.MinimumMemory = metalMinimumMemory
|
||||
return []GpuInfo{info}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue