mirror of
https://github.com/Lizonghang/prima.cpp.git
synced 2025-09-08 17:09:16 +00:00
fix delay estimation on macos
This commit is contained in:
parent
215151918f
commit
83b3d01844
1 changed files with 2 additions and 11 deletions
|
@ -1145,27 +1145,18 @@ static bool assign_layers_to_device(
|
||||||
std::vector<float> vec_a(n_world, 0.0f), vec_b(n_world, 0.0f), vec_c(n_world, 0.0f);
|
std::vector<float> 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) {
|
for (uint32_t m = 0; m < n_world; ++m) {
|
||||||
if (in_set(m, M1)) {
|
if (!in_set(m, M4)) {
|
||||||
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)) {
|
|
||||||
vec_a[m] = alpha[m] + b_prime / (disk_speed[m] * 1e9) * 1000; // in ms
|
vec_a[m] = alpha[m] + b_prime / (disk_speed[m] * 1e9) * 1000; // in ms
|
||||||
if (dev_gpu[m]) {
|
if (dev_gpu[m]) {
|
||||||
vec_b[m] = beta[m] - b_prime / (disk_speed[m] * 1e9) * 1000; // in ms
|
vec_b[m] = beta[m] - b_prime / (disk_speed[m] * 1e9) * 1000; // in ms
|
||||||
}
|
}
|
||||||
vec_c[m] = xi[m];
|
|
||||||
} else {
|
} else {
|
||||||
vec_a[m] = alpha[m];
|
vec_a[m] = alpha[m];
|
||||||
if (dev_gpu[m]) {
|
if (dev_gpu[m]) {
|
||||||
vec_b[m] = beta[m];
|
vec_b[m] = beta[m];
|
||||||
}
|
}
|
||||||
vec_c[m] = xi[m];
|
|
||||||
}
|
}
|
||||||
|
vec_c[m] = xi[m];
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------
|
// -------------------------------------------------------------
|
||||||
|
|
Loading…
Add table
Reference in a new issue