mirror of
https://github.com/Lizonghang/prima.cpp.git
synced 2025-09-06 23:09:02 +00:00
set reserved mem to 100MiB
This commit is contained in:
parent
38e4a3eaa0
commit
92f00303d5
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue