meta: recreate all subgraphs when the arena is reallocated (#30453)

* meta: recreate all subgraphs when the arena is reallocated

* chore: revert added test cases
This commit is contained in:
Igor Matuszewski authored and GitHub committed 2026-10-13 17:58:35 +03:00
1 parent ec0bfac179
commit ecdd29e8b2
1 file changed
+2 -2
+2 -2
View File
@@ -2284,8 +2284,8 @@ static enum ggml_status ggml_backend_meta_graph_compute(ggml_backend_t backend,
backend_ctx->ctx.reset(ggml_init(params));
for (size_t j = 0; j < n_backends; j++) {
auto & bcj = backend_ctx->backend_configs[j];
for (size_t i = 0; i < n_subgraphs; i++) {
bcj.cgraphs[i].cgraph_main = ggml_new_graph_custom(backend_ctx->ctx.get(), cgraph->n_nodes, /*grads =*/ false);
for (size_t i = 0; i < backend_ctx->max_subgraphs; i++) {
bcj.cgraphs[i].cgraph_main = ggml_new_graph_custom(backend_ctx->ctx.get(), backend_ctx->max_nnodes, /*grads =*/ false);
}
}
backend_ctx->cgraphs_aux.resize(n_backends*n_cgraphs_per_device*backend_ctx->max_subgraphs);