From f1b7e5f560e5c45b13f4c9dfb8114d67bb99d3d9 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Mon, 8 Jan 2024 23:37:45 -0500 Subject: [PATCH] update overhead to 15% --- gpu/gpu.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gpu/gpu.go b/gpu/gpu.go index 143e1467..56ed8cbd 100644 --- a/gpu/gpu.go +++ b/gpu/gpu.go @@ -131,9 +131,9 @@ func getCPUMem() (memInfo, error) { func CheckVRAM() (int64, error) { gpuInfo := GetGPUInfo() if gpuInfo.FreeMemory > 0 && (gpuInfo.Library == "cuda" || gpuInfo.Library == "rocm") { - // leave 10% or 400MiB of VRAM free for overhead - overhead := gpuInfo.FreeMemory / 10 - minOverhead := 400 * 1024 * 1024 + // leave 15% or 400MiB of VRAM free for overhead + overhead := gpuInfo.FreeMemory 3 / 20 + minOverhead := int64(400 * 1024 * 1024) if overhead < minOverhead { overhead = minOverhead }