cpu_common.go 232 B

1234567891011121314151617
  1. package gpu
  2. import (
  3. "golang.org/x/sys/cpu"
  4. )
  5. func GetCPUCapability() CPUCapability {
  6. if cpu.X86.HasAVX2 {
  7. return CPUCapabilityAVX2
  8. }
  9. if cpu.X86.HasAVX {
  10. return CPUCapabilityAVX
  11. }
  12. // else LCD
  13. return CPUCapabilityNone
  14. }