File tree 1 file changed +2
-2
lines changed 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -4155,7 +4155,7 @@ static enum ggml_status ggml_metal_graph_compute(
4155
4155
// the main thread commits the first few commands immediately
4156
4156
// command_buffer[n_cb]
4157
4157
{
4158
- id <MTLCommandBuffer > command_buffer = [ctx->queue commandBuffer ];
4158
+ id <MTLCommandBuffer > command_buffer = [ctx->queue commandBufferWithUnretainedReferences ];
4159
4159
ctx->command_buffers [n_cb] = command_buffer;
4160
4160
4161
4161
[command_buffer enqueue ];
@@ -4165,7 +4165,7 @@ static enum ggml_status ggml_metal_graph_compute(
4165
4165
// prepare the rest of the command buffers asynchronously
4166
4166
// command_buffer[0.. n_cb)
4167
4167
for (int cb_idx = 0 ; cb_idx < n_cb; ++cb_idx) {
4168
- id <MTLCommandBuffer > command_buffer = [ctx->queue commandBuffer ];
4168
+ id <MTLCommandBuffer > command_buffer = [ctx->queue commandBufferWithUnretainedReferences ];
4169
4169
ctx->command_buffers [cb_idx] = command_buffer;
4170
4170
4171
4171
// always enqueue the first two command buffers
You can’t perform that action at this time.
0 commit comments