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

Method graph_build

smallthinker/src/llama-context.cpp:1349–1371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1347}
1348
1349llm_graph_result_ptr llama_context::graph_build(
1350 ggml_context * ctx,
1351 ggml_cgraph * gf,
1352 const llama_ubatch & ubatch,
1353 llm_graph_type gtype,
1354 const llama_memory_state_i * mstate) {
1355 return model.build_graph(
1356 {
1357 /*.ctx =*/ ctx,
1358 /*.arch =*/ model.arch,
1359 /*.hparams =*/ model.hparams,
1360 /*.cparams =*/ cparams,
1361 /*.ubatch =*/ ubatch,
1362 /*.sched =*/ sched.get(),
1363 /*.backend_cpu =*/ backend_cpu,
1364 /*.cvec =*/ &cvec,
1365 /*.loras =*/ &loras,
1366 /*.mstate =*/ mstate,
1367 /*.cross =*/ &cross,
1368 /*.n_outputs =*/ n_outputs,
1369 /*.cb =*/ graph_get_cb(),
1370 }, gf, gtype);
1371}
1372
1373ggml_status llama_context::graph_compute(
1374 ggml_cgraph * gf,

Callers

nothing calls this directly

Calls 2

build_graphMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected