From 43a726149df828e1557608bdffa97efc806ee448 Mon Sep 17 00:00:00 2001 From: Bruce MacDonald Date: Fri, 17 Nov 2023 18:05:28 -0500 Subject: [PATCH] fix potentially inaccurate error message --- llm/llama.go | 2 +- server/routes.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/llm/llama.go b/llm/llama.go index a7561f8d..35a2c556 100644 --- a/llm/llama.go +++ b/llm/llama.go @@ -226,7 +226,7 @@ type llama struct { } var ( - errNvidiaSMI = errors.New("nvidia-smi command failed") + errNvidiaSMI = errors.New("warning: gpu support may not be enabled, check you have installed GPU drivers: nvidia-smi command failed") errAvailableVRAM = errors.New("not enough VRAM available, falling back to CPU only") ) diff --git a/server/routes.go b/server/routes.go index cc53dc60..8a5a5a24 100644 --- a/server/routes.go +++ b/server/routes.go @@ -794,7 +794,7 @@ func Serve(ln net.Listener, allowOrigins []string) error { if runtime.GOOS == "linux" { // check compatibility to log warnings if _, err := llm.CheckVRAM(); err != nil { - log.Printf("Warning: GPU support may not be enabled, check you have installed GPU drivers: %v", err) + log.Printf(err.Error()) } }