Skip to content

Commit

Permalink
Fix warnings on long long fprintf
Browse files Browse the repository at this point in the history
  • Loading branch information
sroussey committed Jun 6, 2023
1 parent 16ff9ce commit 98eb863
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ggml.c
Original file line number Diff line number Diff line change
Expand Up @@ -14720,12 +14720,12 @@ static void ggml_graph_export_leaf(const struct ggml_tensor * tensor, FILE * fou
const int64_t * ne = tensor->ne;
const size_t * nb = tensor->nb;

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

fprintf(fout, "%-6s %-6s %-12s %8d %" PRId64 " %" PRId64 " %" PRId64 " %" PRId64 " %16zu %16zu %16zu %16zu %8d %16p %32s\n",
fprintf(fout, "%-6s %-6s %-12s %8d %12lld %12lld %12lld %12lld %16zu %16zu %16zu %16zu %8d %16p %32s\n",
arg,
ggml_type_name(tensor->type),
ggml_op_name (tensor->op),
tensor->n_dims,
(int) ne[0], (int) ne[1], (int) ne[2], (int) ne[3],
nb[0], nb[1], nb[2], nb[3],
ne[0], ne[1], ne[2], ne[3],
nb[0], nb[1], nb[2], nb[3],
tensor->n_tasks,
tensor->data,
tensor->name);
Expand All @@ -14767,7 +14767,7 @@ void ggml_graph_export(const struct ggml_cgraph * cgraph, const char * fname) {
fprintf(fout, "%-16s %8d\n", "version", GGML_FILE_VERSION);
fprintf(fout, "%-16s %8d\n", "leafs", cgraph->n_leafs);
fprintf(fout, "%-16s %8d\n", "nodes", cgraph->n_nodes);
fprintf(fout, "%-16s %" PRId64 "\n", "eval", size_eval);
fprintf(fout, "%-16s %llu\n", "eval", size_eval);

// header
fprintf(fout, "\n");
Expand Down

0 comments on commit 98eb863

Please sign in to comment.