check if node is part of the graph
| 7300 | |
| 7301 | // check if node is part of the graph |
| 7302 | static 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 | |
| 7316 | static 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++) { |
no outgoing calls
no test coverage detected