mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 10:35:01 +00:00
fix: change initialization order of llama-cpp-avx512 to go before avx2 variant (#4837)
changed to initialization order of the avx512 version of llama.cpp, now tries before avx2 Signed-off-by: Bas Hulsken <bhulsken@hotmail.com>
This commit is contained in:
parent
27617a1b06
commit
bbf30d416d
1 changed files with 7 additions and 7 deletions
|
@ -262,18 +262,18 @@ func selectGRPCProcessByHostCapabilities(backend, assetDir string, f16 bool) str
|
||||||
}
|
}
|
||||||
|
|
||||||
// IF we find any optimized binary, we use that
|
// IF we find any optimized binary, we use that
|
||||||
if xsysinfo.HasCPUCaps(cpuid.AVX2) {
|
if xsysinfo.HasCPUCaps(cpuid.AVX512F) {
|
||||||
p := backendPath(assetDir, LLamaCPPAVX2)
|
|
||||||
if _, err := os.Stat(p); err == nil {
|
|
||||||
log.Info().Msgf("[%s] attempting to load with AVX2 variant", backend)
|
|
||||||
selectedProcess = p
|
|
||||||
}
|
|
||||||
} else if xsysinfo.HasCPUCaps(cpuid.AVX512F) {
|
|
||||||
p := backendPath(assetDir, LLamaCPPAVX512)
|
p := backendPath(assetDir, LLamaCPPAVX512)
|
||||||
if _, err := os.Stat(p); err == nil {
|
if _, err := os.Stat(p); err == nil {
|
||||||
log.Info().Msgf("[%s] attempting to load with AVX512 variant", backend)
|
log.Info().Msgf("[%s] attempting to load with AVX512 variant", backend)
|
||||||
selectedProcess = p
|
selectedProcess = p
|
||||||
}
|
}
|
||||||
|
} else if xsysinfo.HasCPUCaps(cpuid.AVX2) {
|
||||||
|
p := backendPath(assetDir, LLamaCPPAVX2)
|
||||||
|
if _, err := os.Stat(p); err == nil {
|
||||||
|
log.Info().Msgf("[%s] attempting to load with AVX2 variant", backend)
|
||||||
|
selectedProcess = p
|
||||||
|
}
|
||||||
} else if xsysinfo.HasCPUCaps(cpuid.AVX) {
|
} else if xsysinfo.HasCPUCaps(cpuid.AVX) {
|
||||||
p := backendPath(assetDir, LLamaCPPAVX)
|
p := backendPath(assetDir, LLamaCPPAVX)
|
||||||
if _, err := os.Stat(p); err == nil {
|
if _, err := os.Stat(p); err == nil {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue