Skip to content

Commit 55978ce

Browse files
authored
Fix incorrect format strings and uninitialized variables. (#4133)
* Fix incorrect format strings and uninitialized variables. * Address comments * Add the missing include statement
1 parent 6b0a742 commit 55978ce

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

examples/server/server.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,7 @@ struct llama_server_context
10951095
std::lock_guard<std::mutex> lock(mutex_results);
10961096
task_result res;
10971097
res.id = id;
1098+
res.stop = false;
10981099
res.error = true;
10991100
res.result_json = { { "content", error } };
11001101
queue_results.push_back(res);
@@ -1255,6 +1256,7 @@ struct llama_server_context
12551256
std::lock_guard<std::mutex> lock(mutex_tasks);
12561257
task_server task;
12571258
task.id = id_gen++;
1259+
task.target_id = 0;
12581260
task.data = data;
12591261
task.infill_mode = infill;
12601262
task.embedding_mode = embedding;

ggml-cuda.cu

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include <algorithm>
2+
#include <cinttypes>
23
#include <cstddef>
34
#include <cstdint>
45
#include <limits>
@@ -8057,7 +8058,7 @@ bool ggml_cuda_compute_forward(struct ggml_compute_params * params, struct ggml_
80578058
if (tensor->op == GGML_OP_MUL_MAT) {
80588059
if (tensor->src[0]->ne[3] != tensor->src[1]->ne[3]) {
80598060
#ifndef NDEBUG
8060-
fprintf(stderr, "%s: cannot compute %s: src0->ne[3] = %d, src1->ne[3] = %d - fallback to CPU\n", __func__, tensor->name, tensor->src[0]->ne[3], tensor->src[1]->ne[3]);
8061+
fprintf(stderr, "%s: cannot compute %s: src0->ne[3] = " PRId64 ", src1->ne[3] = " PRId64 " - fallback to CPU\n", __func__, tensor->name, tensor->src[0]->ne[3], tensor->src[1]->ne[3]);
80618062
#endif
80628063
return false;
80638064
}

0 commit comments

Comments
 (0)