From: Georgi Gerganov Date: Sun, 21 May 2023 08:56:23 +0000 (+0300) Subject: ggml : output 3d sizes in ggml_graph_dump_dot() X-Git-Tag: gguf-v0.4.0~725 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=265db9834e761b7c8210ea1888117efcd3262f52;p=pkg%2Fggml%2Fsources%2Fllama.cpp ggml : output 3d sizes in ggml_graph_dump_dot() --- diff --git a/ggml.c b/ggml.c index 77a3d89f..d36bb228 100644 --- a/ggml.c +++ b/ggml.c @@ -14631,9 +14631,12 @@ void ggml_graph_dump_dot(const struct ggml_cgraph * gb, const struct ggml_cgraph fprintf(fp, "%s |", node->name); } - fprintf(fp, "%d [%" PRId64 ", %" PRId64 "] | %s", - i, node->ne[0], node->ne[1], - GGML_OP_SYMBOL[node->op]); + if (node->n_dims == 2) { + fprintf(fp, "%d [%" PRId64 ", %" PRId64 "] | %s", i, node->ne[0], node->ne[1], GGML_OP_SYMBOL[node->op]); + } else { + fprintf(fp, "%d [%" PRId64 ", %" PRId64 ", %" PRId64 "] | %s", i, node->ne[0], node->ne[1], node->ne[2], GGML_OP_SYMBOL[node->op]); + } + if (node->grad) { fprintf(fp, " | %s\"; ]\n", GGML_OP_SYMBOL[node->grad->op]);