]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
metal : fix capture_compute counter logic (llama/20410)
authorGeorgi Gerganov <redacted>
Wed, 11 Mar 2026 16:38:22 +0000 (18:38 +0200)
committerGeorgi Gerganov <redacted>
Sun, 15 Mar 2026 19:50:13 +0000 (21:50 +0200)
src/ggml-metal/ggml-metal-context.m

index a345cb1f6892b889600c22c0e255dc8191be0594..855fd1adae8e674e0a4450fa817bfb673decb8bc 100644 (file)
@@ -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--;
         }