From 92f00303d527add9baa210bb2837f6ccf7154ef4 Mon Sep 17 00:00:00 2001 From: Lizonghang <870644199@qq.com> Date: Thu, 23 Jan 2025 16:58:11 +0400 Subject: [PATCH] set reserved mem to 100MiB --- common/common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/common.cpp b/common/common.cpp index d26384f7..89901af5 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -1160,7 +1160,7 @@ static void assign_device( } if (dev.gpu_support.cuda || dev.gpu_support.metal) { - float reserved_mem = 0.3f; // reserved shared memory to avoid potential OOM, set to 300 MiB by default + float reserved_mem = 0.1f; // reserved shared memory to avoid potential OOM, set to 100 MiB by default vec_z_gpu[m] = (double)((dev.gpu_props.memory_free - reserved_mem) * GIGABYTE - c_gpu[m]) / (double)(n_layer * b_prime); if (dev.gpu_support.metal && m == 0 && cparams.keep_inp_out_in_metal) { vec_z_gpu[m] -= (double)(bi + bo) / (double)(n_layer * b_prime);