8000 update PR #14079 of main branch · Lalalili1122/llama.cpp@701a64d · GitHub
[go: up one dir, main page]

Skip to content

Commit 701a64d

Browse files
committed
update PR ggml-org#14079 of main branch
1 parent 33c1bbe commit 701a64d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/server/server.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2080,15 +2080,16 @@ struct server_context {
20802080

20812081
// find the slot that has been least recently used
20822082
if (ret == nullptr) {
2083-
int64_t t_last = ggml_time_us();
2083+
int64_t t_last = -1;
2084+
20842085
for (server_slot & slot : slots) {
20852086
// skip the slot if it is not available
20862087
if (slot.is_processing()) {
20872088
continue;
20882089
}
20892090

20902091
// select the current slot if the criteria match
2091-
if (slot.t_last_used < t_last) {
2092+
if (!ret || slot.t_last_used <= t_last) {
20922093
t_last = slot.t_last_used;
20932094
ret = &slot;
20942095
}

0 commit comments

Comments
 (0)
0