Centralize GPU configuration vars

This should aid in troubleshooting by capturing and reporting the GPU
settings at startup in the logs along with all the other server settings.
This commit is contained in:
Daniel Hiltgen
2024-05-08 11:11:50 -07:00
parent 45cacbaf05
commit 6be309e1bd
3 changed files with 33 additions and 6 deletions

View File

@@ -10,6 +10,7 @@ import (
"strconv"
"strings"
"github.com/ollama/ollama/envconfig"
"github.com/ollama/ollama/format"
)
@@ -53,7 +54,7 @@ func AMDGetGPUInfo() []RocmGPUInfo {
}
var supported []string
gfxOverride := os.Getenv("HSA_OVERRIDE_GFX_VERSION")
gfxOverride := envconfig.HsaOverrideGfxVersion
if gfxOverride == "" {
supported, err = GetSupportedGFX(libDir)
if err != nil {