Skip to content

Commit 265db98

Browse files
committed
ggml : output 3d sizes in ggml_graph_dump_dot()
1 parent fab49c6 commit 265db98

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

ggml.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14631,9 +14631,12 @@ void ggml_graph_dump_dot(const struct ggml_cgraph * gb, const struct ggml_cgraph
1463114631
fprintf(fp, "%s |", node->name);
1463214632
}
1463314633

14634-
fprintf(fp, "%d [%" PRId64 ", %" PRId64 "] | <x>%s",
14635-
i, node->ne[0], node->ne[1],
14636-
GGML_OP_SYMBOL[node->op]);
14634+
if (node->n_dims == 2) {
14635+
fprintf(fp, "%d [%" PRId64 ", %" PRId64 "] | <x>%s", i, node->ne[0], node->ne[1], GGML_OP_SYMBOL[node->op]);
14636+
} else {
14637+
fprintf(fp, "%d [%" PRId64 ", %" PRId64 ", %" PRId64 "] | <x>%s", i, node->ne[0], node->ne[1], node->ne[2], GGML_OP_SYMBOL[node->op]);
14638+
}
14639+
1463714640

1463814641
if (node->grad) {
1463914642
fprintf(fp, " | <g>%s\"; ]\n", GGML_OP_SYMBOL[node->grad->op]);

0 commit comments

Comments
 (0)