From 83b3d01844ff7d318d3be7e87566ed43126e1301 Mon Sep 17 00:00:00 2001 From: Lizonghang <870644199@qq.com> Date: Sat, 1 Feb 2025 10:37:56 +0400 Subject: [PATCH] fix delay estimation on macos --- common/common.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/common/common.cpp b/common/common.cpp index 16344f4d..a172bb72 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -1145,27 +1145,18 @@ static bool assign_layers_to_device( std::vector vec_a(n_world, 0.0f), vec_b(n_world, 0.0f), vec_c(n_world, 0.0f); for (uint32_t m = 0; m < n_world; ++m) { - if (in_set(m, M1)) { - vec_a[m] = alpha[m] + b / (disk_speed[m] * 1e9) * 1000; // in ms - vec_b[m] = 0.0f; - vec_c[m] = xi[m]; - } else if (in_set(m, M2)) { - vec_a[m] = alpha[m] + b / (disk_speed[m] * 1e9) * 1000; // in ms - vec_b[m] = beta[m]; - vec_c[m] = xi[m]; - } else if (in_set(m, M3)) { + if (!in_set(m, M4)) { vec_a[m] = alpha[m] + b_prime / (disk_speed[m] * 1e9) * 1000; // in ms if (dev_gpu[m]) { vec_b[m] = beta[m] - b_prime / (disk_speed[m] * 1e9) * 1000; // in ms } - vec_c[m] = xi[m]; } else { vec_a[m] = alpha[m]; if (dev_gpu[m]) { vec_b[m] = beta[m]; } - vec_c[m] = xi[m]; } + vec_c[m] = xi[m]; } // -------------------------------------------------------------