| 21 | #endif |
| 22 | |
| 23 | static void ggml_graph_compute_helper(std::vector<uint8_t> & buf, ggml_cgraph * graph, int n_threads) { |
| 24 | struct ggml_cplan plan = ggml_graph_plan(graph, n_threads); |
| 25 | |
| 26 | if (plan.work_size > 0) { |
| 27 | buf.resize(plan.work_size); |
| 28 | plan.work_data = buf.data(); |
| 29 | } |
| 30 | |
| 31 | ggml_graph_compute(graph, &plan); |
| 32 | } |
| 33 | |
| 34 | static float tensor_sum_elements(const ggml_tensor * tensor) { |
| 35 | double sum = 0; |
no test coverage detected