check if node is part of the graph
| 18028 | |
| 18029 | // check if node is part of the graph |
| 18030 | static bool ggml_graph_find(const struct ggml_cgraph * cgraph, const struct ggml_tensor * node) { |
| 18031 | if (cgraph == NULL) { |
| 18032 | return true; |
| 18033 | } |
| 18034 | |
| 18035 | for (int i = 0; i < cgraph->n_nodes; i++) { |
| 18036 | if (cgraph->nodes[i] == node) { |
| 18037 | return true; |
| 18038 | } |
| 18039 | } |
| 18040 | |
| 18041 | return false; |
| 18042 | } |
| 18043 | |
| 18044 | static struct ggml_tensor * ggml_graph_get_parent(const struct ggml_cgraph * cgraph, const struct ggml_tensor * node) { |
| 18045 | for (int i = 0; i < cgraph->n_nodes; i++) { |
no outgoing calls
no test coverage detected