| 7430 | } |
| 7431 | |
| 7432 | struct ggml_cgraph * ggml_new_graph(struct ggml_context * ctx) { |
| 7433 | return ggml_new_graph_custom(ctx, GGML_DEFAULT_GRAPH_SIZE, false); |
| 7434 | } |
| 7435 | |
| 7436 | struct ggml_cgraph ggml_graph_view(struct ggml_cgraph * cgraph0, int i0, int i1) { |
| 7437 | struct ggml_cgraph cgraph = { |
| 7438 | /*.size =*/ 0, |
| 7439 | /*.n_nodes =*/ i1 - i0, |
| 7440 | /*.n_leafs =*/ 0, |
| 7441 | /*.nodes =*/ cgraph0->nodes + i0, |
| 7442 | /*.grads =*/ NULL, // gradients would need visited_hash_set |
| 7443 | /*.grad_accs =*/ NULL, |
no outgoing calls