| 747 | // |
| 748 | |
| 749 | static void ggml_graph_compute_helper(std::vector<uint8_t> & buf, ggml_cgraph * graph, int n_threads) { |
| 750 | struct ggml_cplan plan = ggml_graph_plan(graph, n_threads); |
| 751 | |
| 752 | if (plan.work_size > 0) { |
| 753 | buf.resize(plan.work_size); |
| 754 | plan.work_data = buf.data(); |
| 755 | } |
| 756 | |
| 757 | ggml_graph_compute(graph, &plan); |
| 758 | } |
| 759 | |
| 760 | // |
| 761 | // llama helpers |
no test coverage detected