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) {