ollama/gpu/cpu_common.go
2024-06-14 14:55:50 -07:00

16 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
}