MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / ggml_graph_print

Function ggml_graph_print

subprojects/llama.cpp/ggml/src/ggml.c:7197–7223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7195}
7196
7197void ggml_graph_print(const struct ggml_cgraph * cgraph) {
7198 GGML_LOG_INFO("=== GRAPH ===\n");
7199
7200 GGML_LOG_INFO("n_nodes = %d\n", cgraph->n_nodes);
7201 for (int i = 0; i < cgraph->n_nodes; i++) {
7202 struct ggml_tensor * node = cgraph->nodes[i];
7203
7204 GGML_LOG_INFO(" - %3d: [ %5" PRId64 ", %5" PRId64 ", %5" PRId64 "] %16s %s\n",
7205 i,
7206 node->ne[0], node->ne[1], node->ne[2],
7207 ggml_op_name(node->op), (node->flags & GGML_TENSOR_FLAG_PARAM) ? "x" :
7208 ggml_graph_get_grad(cgraph, node) ? "g" : " ");
7209 }
7210
7211 GGML_LOG_INFO("n_leafs = %d\n", cgraph->n_leafs);
7212 for (int i = 0; i < cgraph->n_leafs; i++) {
7213 struct ggml_tensor * node = cgraph->leafs[i];
7214
7215 GGML_LOG_INFO(" - %3d: [ %5" PRId64 ", %5" PRId64 "] %8s %16s\n",
7216 i,
7217 node->ne[0], node->ne[1],
7218 ggml_op_name(node->op),
7219 ggml_get_name(node));
7220 }
7221
7222 GGML_LOG_INFO("========================================\n");
7223}
7224
7225static int ggml_node_list_find_tensor(const struct ggml_cgraph * cgraph,
7226 const int * idxs,

Callers

nothing calls this directly

Calls 3

ggml_op_nameFunction · 0.85
ggml_graph_get_gradFunction · 0.85
ggml_get_nameFunction · 0.85

Tested by

no test coverage detected