MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / ggml_graph_dup

Function ggml_graph_dup

subprojects/llama.cpp/ggml/src/ggml.c:7078–7082  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7076}
7077
7078struct ggml_cgraph * ggml_graph_dup(struct ggml_context * ctx, struct ggml_cgraph * cgraph, bool force_grads) {
7079 struct ggml_cgraph * result = ggml_new_graph_custom(ctx, cgraph->size, cgraph->grads || force_grads);
7080 ggml_graph_cpy(cgraph, result);
7081 return result;
7082}
7083
7084struct ggml_tensor * ggml_set_zero(struct ggml_tensor * tensor) {
7085 if (ggml_is_empty(tensor)) {

Callers 1

ggml_opt_buildFunction · 0.85

Calls 2

ggml_new_graph_customFunction · 0.85
ggml_graph_cpyFunction · 0.85

Tested by

no test coverage detected