diff --git a/ggml-metal.m b/ggml-metal.m index 6027ca64..f82f72ca 100644 --- a/ggml-metal.m +++ b/ggml-metal.m @@ -696,6 +696,7 @@ static bool ggml_metal_graph_compute( struct ggml_metal_context * ctx, struct ggml_cgraph * gf) { + @autoreleasepool { MTLComputePassDescriptor * edesc = MTLComputePassDescriptor.computePassDescriptor; edesc.dispatchType = MTLDispatchTypeSerial; @@ -2281,6 +2282,7 @@ static bool ggml_metal_graph_compute( [[MTLCaptureManager sharedCaptureManager] stopCapture]; } + } return true; }