Skip to content

Commit 98eb863

Browse files
committed
Fix warnings on long long fprintf
1 parent 16ff9ce commit 98eb863

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ggml.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14720,12 +14720,12 @@ static void ggml_graph_export_leaf(const struct ggml_tensor * tensor, FILE * fou
1472014720
const int64_t * ne = tensor->ne;
1472114721
const size_t * nb = tensor->nb;
1472214722

14723-
fprintf(fout, "%-6s %-12s %8d %" PRId64 " %" PRId64 " %" PRId64 " %" PRId64 " %16zu %16zu %16zu %16zu %16p %32s\n",
14723+
fprintf(fout, "%-6s %-12s %8d %12lld %12lld %12lld %12lld %16zu %16zu %16zu %16zu %16p %32s\n",
1472414724
ggml_type_name(tensor->type),
1472514725
ggml_op_name (tensor->op),
1472614726
tensor->n_dims,
14727-
(int) ne[0], (int) ne[1], (int) ne[2], (int) ne[3],
14728-
nb[0], nb[1], nb[2], nb[3],
14727+
ne[0], ne[1], ne[2], ne[3],
14728+
nb[0], nb[1], nb[2], nb[3],
1472914729
tensor->data,
1473014730
tensor->name);
1473114731
}
@@ -14734,13 +14734,13 @@ static void ggml_graph_export_node(const struct ggml_tensor * tensor, const char
1473414734
const int64_t * ne = tensor->ne;
1473514735
const size_t * nb = tensor->nb;
1473614736

14737-
fprintf(fout, "%-6s %-6s %-12s %8d %" PRId64 " %" PRId64 " %" PRId64 " %" PRId64 " %16zu %16zu %16zu %16zu %8d %16p %32s\n",
14737+
fprintf(fout, "%-6s %-6s %-12s %8d %12lld %12lld %12lld %12lld %16zu %16zu %16zu %16zu %8d %16p %32s\n",
1473814738
arg,
1473914739
ggml_type_name(tensor->type),
1474014740
ggml_op_name (tensor->op),
1474114741
tensor->n_dims,
14742-
(int) ne[0], (int) ne[1], (int) ne[2], (int) ne[3],
14743-
nb[0], nb[1], nb[2], nb[3],
14742+
ne[0], ne[1], ne[2], ne[3],
14743+
nb[0], nb[1], nb[2], nb[3],
1474414744
tensor->n_tasks,
1474514745
tensor->data,
1474614746
tensor->name);
@@ -14767,7 +14767,7 @@ void ggml_graph_export(const struct ggml_cgraph * cgraph, const char * fname) {
1476714767
fprintf(fout, "%-16s %8d\n", "version", GGML_FILE_VERSION);
1476814768
fprintf(fout, "%-16s %8d\n", "leafs", cgraph->n_leafs);
1476914769
fprintf(fout, "%-16s %8d\n", "nodes", cgraph->n_nodes);
14770-
fprintf(fout, "%-16s %" PRId64 "\n", "eval", size_eval);
14770+
fprintf(fout, "%-16s %llu\n", "eval", size_eval);
1477114771

1477214772
// header
1477314773
fprintf(fout, "\n");

0 commit comments

Comments
 (0)