From 76ea1c1c46be0e824ca76545b0d75a15e0e275d4 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Wed, 11 Mar 2026 18:38:22 +0200 Subject: [PATCH] metal : fix capture_compute counter logic (#20410) --- ggml/src/ggml-metal/ggml-metal-context.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml/src/ggml-metal/ggml-metal-context.m b/ggml/src/ggml-metal/ggml-metal-context.m index a345cb1f68..855fd1adae 100644 --- a/ggml/src/ggml-metal/ggml-metal-context.m +++ b/ggml/src/ggml-metal/ggml-metal-context.m @@ -465,7 +465,7 @@ enum ggml_status ggml_metal_graph_compute(ggml_metal_t ctx, struct ggml_cgraph * ctx->n_nodes_per_cb = (ctx->n_nodes_1 + ctx->n_cb - 1) / ctx->n_cb; - if (ctx->capture_compute > 0) { + if (ctx->capture_compute >= 0) { ctx->capture_compute--; }