Skip to content

Commit f1b0a1f

Browse files
committed
llama : give up fix for uint64_t format type by casting to size_t
Otherwise some platforms use "%lu" and others "%llu" for uint64_t, and I'm not sure how to handle that.
1 parent 9e22064 commit f1b0a1f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/llama.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -17710,7 +17710,7 @@ struct llama_data_read_context {
1771017710
const size_t k_size_row = ggml_row_size(kv_self.k_l[il]->type, n_embd_k_gqa);
1771117711
if (k_size_row != k_size_row_ref) {
1771217712
// llama_kv_cache_seq_rm(kv_self, dest_seq_id, -1, -1);
17713-
LLAMA_LOG_ERROR("%s: mismatched key row size (%zu != %zu, layer %d)\n", __func__, k_size_row, k_size_row_ref, il);
17713+
LLAMA_LOG_ERROR("%s: mismatched key row size (%zu != %zu, layer %d)\n", __func__, k_size_row, (size_t) k_size_row_ref, il);
1771417714
return false;
1771517715
}
1771617716

@@ -17739,7 +17739,7 @@ struct llama_data_read_context {
1773917739
read_to(&v_size_row_ref, sizeof(v_size_row_ref));
1774017740
const size_t v_size_row = ggml_row_size(kv_self.v_l[il]->type, n_embd_v_gqa);
1774117741
if (v_size_row != v_size_row_ref) {
17742-
LLAMA_LOG_ERROR("%s: mismatched value row size (%zu != %zu, layer %d)\n", __func__, v_size_row, v_size_row_ref, il);
17742+
LLAMA_LOG_ERROR("%s: mismatched value row size (%zu != %zu, layer %d)\n", __func__, v_size_row, (size_t) v_size_row_ref, il);
1774317743
return false;
1774417744
}
1774517745

@@ -17767,7 +17767,7 @@ struct llama_data_read_context {
1776717767
read_to(&v_size_el_ref, sizeof(v_size_el_ref));
1776817768
const size_t v_size_el = ggml_type_size(kv_self.v_l[il]->type);
1776917769
if (v_size_el != v_size_el_ref) {
17770-
LLAMA_LOG_ERROR("%s: mismatched value element size (%zu != %llu, layer %d)\n", __func__, v_size_el, v_size_el_ref, il);
17770+
LLAMA_LOG_ERROR("%s: mismatched value element size (%zu != %zu, layer %d)\n", __func__, v_size_el, (size_t) v_size_el_ref, il);
1777117771
return false;
1777217772
}
1777317773

0 commit comments

Comments
 (0)