alloc : skip unassigned leafs

This commit is contained in:
Georgi Gerganov 2026-01-06 11:24:56 +02:00
parent bd2a93d475
commit 4a95b44864
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735
1 changed files with 3 additions and 0 deletions

View File

@ -1081,6 +1081,9 @@ bool ggml_gallocr_alloc_graph(ggml_gallocr_t galloc, struct ggml_cgraph * graph)
for (int i = 0; i < graph->n_leafs; i++) {
struct ggml_tensor * leaf = graph->leafs[i];
struct leaf_alloc * leaf_alloc = &galloc->leaf_allocs[i];
if (leaf_alloc->leaf.buffer_id == -1) {
continue;
}
ggml_gallocr_init_tensor(galloc, leaf, &leaf_alloc->leaf);
}
// nodes