Skip to content

Commit fa222c5

Browse files
committed
disable debug prints
1 parent ba574ba commit fa222c5

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/llama-memory-recurrent.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ void llama_memory_recurrent::clear(bool data) {
136136
}
137137

138138
bool llama_memory_recurrent::seq_rm(llama_seq_id seq_id, llama_pos p0, llama_pos p1) {
139-
printf("[DEBUG] calling llama_memory_recurrent::seq_rm` with `seq_id=%d, p0=%d, p1=%d`\n", seq_id, p0, p1);
139+
//printf("[DEBUG] calling llama_memory_recurrent::seq_rm` with `seq_id=%d, p0=%d, p1=%d`\n", seq_id, p0, p1);
140140
uint32_t new_head = size;
141141

142142
if (p0 < 0) {
@@ -158,7 +158,7 @@ bool llama_memory_recurrent::seq_rm(llama_seq_id seq_id, llama_pos p0, llama_pos
158158
const auto & cell = cells[tail_id];
159159
// partial intersection is invalid
160160
if ((0 < p0 && p0 < cell.pos) || (0 < p1 && p1 <= cell.pos)) {
161-
printf("[DEBUG] inside `llama_memory_recurrent::seq_rm`: partial intersection is invalid, so returning false\n");
161+
//printf("[DEBUG] inside `llama_memory_recurrent::seq_rm`: partial intersection is invalid, so returning false\n");
162162
return false;
163163
}
164164
// invalidate tails which will be cleared
@@ -169,7 +169,7 @@ bool llama_memory_recurrent::seq_rm(llama_seq_id seq_id, llama_pos p0, llama_pos
169169
} else {
170170
// seq_id is negative, then the range should include everything or nothing
171171
if (p0 != p1 && (p0 != 0 || p1 != std::numeric_limits<llama_pos>::max())) {
172-
printf("[DEBUG] inside `llama_memory_recurrent::seq_rm`: `seq_id` is negative, so returning false\n");
172+
//printf("[DEBUG] inside `llama_memory_recurrent::seq_rm`: `seq_id` is negative, so returning false\n");
173173
return false;
174174
}
175175
}

tools/server/server.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3565,7 +3565,7 @@ struct server_context {
35653565
);
35663566

35673567
bool do_reset = it == slot.ctx_checkpoints.rend();
3568-
printf("[DEBUG] `do_reset` was set to `%s`\n", do_reset ? "true" : "false");
3568+
//printf("[DEBUG] `do_reset` was set to `%s`\n", do_reset ? "true" : "false");
35693569

35703570
if (!do_reset) {
35713571
// restore the context checkpoint
@@ -3575,7 +3575,7 @@ struct server_context {
35753575
if (n != ctx_checkpoint_size) {
35763576
SLT_ERR(slot, "failed to restore context checkpoint (pos_min = %d, pos_max = %d, size = %.3f MiB)\n", it->pos_min, it->pos_max, (float) ctx_checkpoint_size / 1024 / 1024);
35773577
do_reset = true;
3578-
printf("[DEBUG] `do_reset` was set to `true` after failing to restore a checkpoint");
3578+
//printf("[DEBUG] `do_reset` was set to `true` after failing to restore a checkpoint");
35793579
} else {
35803580
slot.n_past = std::min(slot.n_past, it->pos_max);
35813581
SLT_WRN(slot, "restored context checkpoint (pos_min = %d, pos_max = %d, size = %.3f MiB)\n", it->pos_min, it->pos_max, (float) ctx_checkpoint_size / 1024 / 1024);
@@ -3630,7 +3630,6 @@ struct server_context {
36303630
// there is no common part left
36313631
slot.n_past = 0;
36323632
slot.n_prompt_tokens_cache = 0;
3633-
printf("[DEBUG] we had no choice but to truncate all tokens from this slot :( very sad");
36343633
}
36353634

36363635
SLT_INF(slot, "n_past = %d\n", slot.n_past);

0 commit comments

Comments
 (0)