From c8e615d69c35899fe1661940d7284fa37ed16279 Mon Sep 17 00:00:00 2001 From: Lizonghang <870644199@qq.com> Date: Thu, 27 Feb 2025 21:59:04 +0400 Subject: [PATCH] fix n_m bound error --- common/common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/common.cpp b/common/common.cpp index e528d347..f2f76698 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -1376,7 +1376,7 @@ static bool assign_layers_to_device( uint32_t w_m = best_solution[m], n_m = best_solution[m + n_world]; if (dev_gpu[m]) { - if (n_m < static_cast(std::round(W * vec_z_gpu[m]))) { + if (n_m < static_cast(std::floor(W * vec_z_gpu[m]))) { // if there is still free GPU memory has_free_gpu_memory = true; } else if (w_m > n_m) {