8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33c1bbe commit 701a64dCopy full SHA for 701a64d
tools/server/server.hpp
@@ -2080,15 +2080,16 @@ struct server_context {
2080
2081
// find the slot that has been least recently used
2082
if (ret == nullptr) {
2083
- int64_t t_last = ggml_time_us();
+ int64_t t_last = -1;
2084
+
2085
for (server_slot & slot : slots) {
2086
// skip the slot if it is not available
2087
if (slot.is_processing()) {
2088
continue;
2089
}
2090
2091
// select the current slot if the criteria match
- if (slot.t_last_used < t_last) {
2092
+ if (!ret || slot.t_last_used <= t_last) {
2093
t_last = slot.t_last_used;
2094
ret = &slot;
2095
0 commit comments