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

Function ggml_graph_find

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

check if node is part of the graph

Source from the content-addressed store, hash-verified

7300
7301// check if node is part of the graph
7302static bool ggml_graph_find(const struct ggml_cgraph * cgraph, const struct ggml_tensor * node) {
7303 if (cgraph == NULL) {
7304 return true;
7305 }
7306
7307 for (int i = 0; i < cgraph->n_nodes; i++) {
7308 if (cgraph->nodes[i] == node) {
7309 return true;
7310 }
7311 }
7312
7313 return false;
7314}
7315
7316static struct ggml_tensor * ggml_graph_get_parent(const struct ggml_cgraph * cgraph, const struct ggml_tensor * node) {
7317 for (int i = 0; i < cgraph->n_nodes; i++) {

Callers 1

ggml_graph_dump_dotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected