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

Function compute

external/ggml/examples/simple/simple-ctx.cpp:62–71  ·  view source on GitHub ↗

compute with backend

Source from the content-addressed store, hash-verified

60
61// compute with backend
62struct ggml_tensor * compute(const simple_model & model) {
63 struct ggml_cgraph * gf = build_graph(model);
64
65 int n_threads = 1; // number of threads to perform some operations with multi-threading
66
67 ggml_graph_compute_with_ctx(model.ctx, gf, n_threads);
68
69 // in this case, the output tensor is the last one in the graph
70 return ggml_graph_node(gf, -1);
71}
72
73int main(void) {
74 ggml_time_init();

Callers 5

mainFunction · 0.70
runMethod · 0.50
KERNEL_4x8Method · 0.50
KERNEL_8x4Method · 0.50
KERNEL_8x8Method · 0.50

Calls 3

ggml_graph_nodeFunction · 0.85
build_graphFunction · 0.70

Tested by

no test coverage detected