| 113 | } |
| 114 | |
| 115 | static void ggml_graph_compute_helper(std::vector<uint8_t> & buf, ggml_cgraph * graph, int n_threads) { |
| 116 | struct ggml_cplan plan = ggml_graph_plan(graph, n_threads); |
| 117 | |
| 118 | if (plan.work_size > 0) { |
| 119 | buf.resize(plan.work_size); |
| 120 | plan.work_data = buf.data(); |
| 121 | } |
| 122 | |
| 123 | ggml_graph_compute(graph, &plan); |
| 124 | } |
| 125 | |
| 126 | int main(int /*argc*/, const char ** /*argv*/) { |
| 127 | struct ggml_init_params params = { |
no test coverage detected