mirror of
https://github.com/ollama/ollama.git
synced 2025-04-05 18:38:47 +02:00
17 lines
232 B
Go
17 lines
232 B
Go
package gpu
|
|
|
|
import (
|
|
"golang.org/x/sys/cpu"
|
|
)
|
|
|
|
func GetCPUCapability() CPUCapability {
|
|
if cpu.X86.HasAVX2 {
|
|
return CPUCapabilityAVX2
|
|
}
|
|
if cpu.X86.HasAVX {
|
|
return CPUCapabilityAVX
|
|
}
|
|
// else LCD
|
|
return CPUCapabilityNone
|
|
}
|