mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 18:36:41 +02:00
Fix darwin intel build
This commit is contained in:
parent
54dbfa4c4a
commit
6558f94ed0
4 changed files with 21 additions and 26 deletions
|
@ -4,6 +4,8 @@ package gpu
|
|||
|
||||
import "C"
|
||||
import (
|
||||
"runtime"
|
||||
|
||||
"github.com/jmorganca/ollama/api"
|
||||
)
|
||||
|
||||
|
@ -25,8 +27,12 @@ func GetGPUInfo() GpuInfo {
|
|||
}
|
||||
|
||||
func NumGPU(numLayer, fileSizeBytes int64, opts api.Options) int {
|
||||
// default to enable metal on macOS
|
||||
return 1
|
||||
if runtime.GOARCH == "arm64" {
|
||||
return 1
|
||||
}
|
||||
|
||||
// metal only supported on arm64
|
||||
return 0
|
||||
}
|
||||
|
||||
func nativeInit() error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue