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

Function ggml_graph_compute_with_ctx

ggml.c:17483–17491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17481}
17482
17483void ggml_graph_compute_with_ctx(struct ggml_context * ctx, struct ggml_cgraph * cgraph, int n_threads) {
17484 struct ggml_cplan cplan = ggml_graph_plan(cgraph, n_threads);
17485
17486 struct ggml_object * obj = ggml_new_object(ctx, GGML_OBJECT_WORK_BUFFER, cplan.work_size);
17487
17488 cplan.work_data = (uint8_t *)ctx->mem_buffer + obj->offs;
17489
17490 ggml_graph_compute(cgraph, &cplan);
17491}
17492
17493struct ggml_tensor * ggml_graph_get_tensor(struct ggml_cgraph * cgraph, const char * name) {
17494 for (int i = 0; i < cgraph->n_leafs; i++) {

Callers 3

sum_gpu_indexFunction · 0.70
check_gradientFunction · 0.50
mainFunction · 0.50

Calls 3

ggml_graph_planFunction · 0.70
ggml_new_objectFunction · 0.70
ggml_graph_computeFunction · 0.70

Tested by 2

check_gradientFunction · 0.40
mainFunction · 0.40