| 152 | } |
| 153 | |
| 154 | static int get_leaf_id(ggml_cgraph * graph, const char * tensor_name) { |
| 155 | for (int i = 0; i < graph->n_leafs; ++i) { |
| 156 | if (strncmp(graph->leafs[i]->name, tensor_name, GGML_MAX_NAME) == 0) { |
| 157 | return i; |
| 158 | } |
| 159 | } |
| 160 | fprintf(stderr, "leaf not found: %s\n", tensor_name); |
| 161 | return -1; |
| 162 | } |
| 163 | |
| 164 | static int get_node_id(ggml_cgraph * graph, const char * tensor_name) { |
| 165 | for (int i = 0; i < graph->n_nodes; ++i) { |
no outgoing calls
no test coverage detected