metal : restore commandBufferWithUnretainedReferences calls [no ci]
This commit is contained in:
parent
2674f02e4f
commit
7fb39e39e9
1 changed files with 2 additions and 2 deletions
|
@ -4155,7 +4155,7 @@ static enum ggml_status ggml_metal_graph_compute(
|
||||||
// the main thread commits the first few commands immediately
|
// the main thread commits the first few commands immediately
|
||||||
// command_buffer[n_cb]
|
// command_buffer[n_cb]
|
||||||
{
|
{
|
||||||
id<MTLCommandBuffer> command_buffer = [ctx->queue commandBuffer];
|
id<MTLCommandBuffer> command_buffer = [ctx->queue commandBufferWithUnretainedReferences];
|
||||||
ctx->command_buffers[n_cb] = command_buffer;
|
ctx->command_buffers[n_cb] = command_buffer;
|
||||||
|
|
||||||
[command_buffer enqueue];
|
[command_buffer enqueue];
|
||||||
|
@ -4165,7 +4165,7 @@ static enum ggml_status ggml_metal_graph_compute(
|
||||||
// prepare the rest of the command buffers asynchronously
|
// prepare the rest of the command buffers asynchronously
|
||||||
// command_buffer[0.. n_cb)
|
// command_buffer[0.. n_cb)
|
||||||
for (int cb_idx = 0; cb_idx < n_cb; ++cb_idx) {
|
for (int cb_idx = 0; cb_idx < n_cb; ++cb_idx) {
|
||||||
id<MTLCommandBuffer> command_buffer = [ctx->queue commandBuffer];
|
id<MTLCommandBuffer> command_buffer = [ctx->queue commandBufferWithUnretainedReferences];
|
||||||
ctx->command_buffers[cb_idx] = command_buffer;
|
ctx->command_buffers[cb_idx] = command_buffer;
|
||||||
|
|
||||||
// always enqueue the first two command buffers
|
// always enqueue the first two command buffers
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue