Release encode block when re-setting encoding buffer count if needed
This commit is contained in:
parent
5e6358398c
commit
4af03de2a6
1 changed files with 4 additions and 0 deletions
|
@ -3428,6 +3428,10 @@ static void ggml_backend_metal_set_n_cb(ggml_backend_t backend, int n_cb) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(ctx->encode_async) {
|
||||||
|
Block_release(ctx->encode_async);
|
||||||
|
}
|
||||||
|
|
||||||
ctx->encode_async = Block_copy(^(size_t iter) {
|
ctx->encode_async = Block_copy(^(size_t iter) {
|
||||||
const int cb_idx = iter;
|
const int cb_idx = iter;
|
||||||
const int n_cb_l = ctx->n_cb;
|
const int n_cb_l = ctx->n_cb;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue