From 7fb39e39e9b5e94436ff8b35792fabfd45a2e391 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Sun, 26 Jan 2025 16:32:41 +0200 Subject: [PATCH] metal : restore commandBufferWithUnretainedReferences calls [no ci] --- ggml/src/ggml-metal/ggml-metal.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ggml/src/ggml-metal/ggml-metal.m b/ggml/src/ggml-metal/ggml-metal.m index 7bf777cae..103c151e5 100644 --- a/ggml/src/ggml-metal/ggml-metal.m +++ b/ggml/src/ggml-metal/ggml-metal.m @@ -4155,7 +4155,7 @@ static enum ggml_status ggml_metal_graph_compute( // the main thread commits the first few commands immediately // command_buffer[n_cb] { - id command_buffer = [ctx->queue commandBuffer]; + id command_buffer = [ctx->queue commandBufferWithUnretainedReferences]; ctx->command_buffers[n_cb] = command_buffer; [command_buffer enqueue]; @@ -4165,7 +4165,7 @@ static enum ggml_status ggml_metal_graph_compute( // prepare the rest of the command buffers asynchronously // command_buffer[0.. n_cb) for (int cb_idx = 0; cb_idx < n_cb; ++cb_idx) { - id command_buffer = [ctx->queue commandBuffer]; + id command_buffer = [ctx->queue commandBufferWithUnretainedReferences]; ctx->command_buffers[cb_idx] = command_buffer; // always enqueue the first two command buffers