metal : fix failure to load model
The number of buffers in the ggml context was left unitialized. This leads to sporadic failures to load the model on startup. It is actually strange that the failure occurred so infrequantly.
This commit is contained in:
parent
fa84c4b3e8
commit
661777d636
1 changed files with 1 additions and 0 deletions
|
@ -86,6 +86,7 @@ struct ggml_metal_context * ggml_metal_init(void) {
|
|||
|
||||
ctx->device = MTLCreateSystemDefaultDevice();
|
||||
ctx->queue = [ctx->device newCommandQueue];
|
||||
ctx->n_buffers = 0;
|
||||
|
||||
// determine if we can use MPS
|
||||
if (MPSSupportsMTLDevice(ctx->device)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue