| 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); |
| 176 | ggml_build_forward_expand(graph, out); |
| 177 | |
| 178 | ggml_gallocr_ptr galloc = ggml_gallocr_ptr(ggml_gallocr_new(buft)); |
| 179 | bool result = ggml_gallocr_alloc_graph(galloc.get(), graph); |
| 180 | GGML_ASSERT(result); |
| 181 | return galloc; |
| 182 | } |
| 183 | |
| 184 | // |
| 185 | // correctness checks for result allocations |
no test coverage detected