Fix reset of unused g->nodes and g->grads to NULL
This commit is contained in:
parent
d395b19c8c
commit
d7003a98cc
1 changed files with 2 additions and 2 deletions
|
@ -1403,8 +1403,8 @@ void graph_set_leafs_grads(struct ggml_cgraph * g) {
|
|||
}
|
||||
}
|
||||
for (int i=n_nodes; i < g->n_nodes; ++i) {
|
||||
g->nodes[n_nodes] = NULL;
|
||||
g->grads[n_nodes] = NULL;
|
||||
g->nodes[i] = NULL;
|
||||
g->grads[i] = NULL;
|
||||
}
|
||||
g->n_nodes = n_nodes;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue