mirror of
https://github.com/Lizonghang/prima.cpp.git
synced 2025-09-06 21:09:03 +00:00
fix n_m bound error
This commit is contained in:
parent
550fdcbc4f
commit
c8e615d69c
1 changed files with 1 additions and 1 deletions
|
@ -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<uint32_t>(std::round(W * vec_z_gpu[m]))) {
|
||||
if (n_m < static_cast<uint32_t>(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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue