| 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) { |
| 166 | if (strncmp(graph->nodes[i]->name, tensor_name, GGML_MAX_NAME) == 0) { |
| 167 | return i; |
| 168 | } |
| 169 | } |
| 170 | fprintf(stderr, "node not found: %s", tensor_name); |
| 171 | return -1; |
| 172 | } |
| 173 | |
| 174 | static ggml_gallocr_ptr allocate_graph(ggml_cgraph * graph, ggml_tensor * out, ggml_backend_buffer_type_t buft) { |
| 175 | ggml_set_output(out); |
no outgoing calls
no test coverage detected