Skip to content

Commit 4af03de

Browse files
committed
Release encode block when re-setting encoding buffer count if needed
1 parent 5e63583 commit 4af03de

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ggml/src/ggml-metal.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3428,6 +3428,10 @@ static void ggml_backend_metal_set_n_cb(ggml_backend_t backend, int n_cb) {
34283428
}
34293429
}
34303430

3431+
if(ctx->encode_async) {
3432+
Block_release(ctx->encode_async);
3433+
}
3434+
34313435
ctx->encode_async = Block_copy(^(size_t iter) {
34323436
const int cb_idx = iter;
34333437
const int n_cb_l = ctx->n_cb;

0 commit comments

Comments
 (0)