Load dynamic cpu lib on windows

On linux, we link the CPU library in to the Go app and fall back to it
when no GPU match is found. On windows we do not link in the CPU library
so that we can better control our dependencies for the CLI.  This fixes
the logic so we correctly fallback to the dynamic CPU library
on windows.
This commit is contained in:
Daniel Hiltgen
2024-01-04 08:41:41 -08:00
parent 4ad6c9b11f
commit e9ce91e9a6
4 changed files with 16 additions and 8 deletions

View File

@@ -87,7 +87,8 @@ func newLlmServer(library, model string, adapters, projectors []string, numLayer
if err == nil {
return srv, nil
}
log.Printf("Failed to load dynamic library - falling back to CPU mode %s", err)
log.Printf("Failed to load dynamic library %s - falling back to CPU mode %s", library, err)
// TODO - update some state to indicate we were unable to load the GPU library for future "info" ux
}
return newDefaultExtServer(model, adapters, projectors, numLayers, opts)