MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / ggml_graph_compute_helper

Function ggml_graph_compute_helper

examples/benchmark/benchmark-matmult.cpp:23–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21#endif
22
23static 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
34static float tensor_sum_elements(const ggml_tensor * tensor) {
35 double sum = 0;

Callers 1

mainFunction · 0.70

Calls 4

ggml_graph_planFunction · 0.50
ggml_graph_computeFunction · 0.50
resizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected