ollama/gpu/cpu_common.go

17 lines
232 B
Go
Raw Normal View History

package gpu
import (
"golang.org/x/sys/cpu"
)
2024-06-05 19:07:20 +00:00
func GetCPUCapability() CPUCapability {
if cpu.X86.HasAVX2 {
return CPUCapabilityAVX2
}
if cpu.X86.HasAVX {
return CPUCapabilityAVX
}
// else LCD
2024-06-05 19:07:20 +00:00
return CPUCapabilityNone
}