MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / compute_graph

Function compute_graph

external/ggml/tests/test-conv2d.cpp:176–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176struct ggml_cgraph * compute_graph(const test_model & model, ggml_gallocr_t allocr) {
177 struct ggml_cgraph * gf = build_graph(model);
178
179 // allocate tensors
180 ggml_gallocr_alloc_graph(allocr, gf);
181 int n_threads = 1;
182
183 if (ggml_backend_is_cpu(model.backend)) {
184 ggml_backend_cpu_set_n_threads(model.backend, n_threads);
185 }
186
187 ggml_backend_graph_compute(model.backend, gf);
188
189 //ggml_graph_print(gf);
190
191 return gf;
192}
193
194int main(void)
195{

Callers 1

mainFunction · 0.70

Calls 5

ggml_gallocr_alloc_graphFunction · 0.85
ggml_backend_is_cpuFunction · 0.85
build_graphFunction · 0.70

Tested by

no test coverage detected