Skip to content

Commit 8c0a10e

Browse files
ikawrakowKawrakow
andauthored
metal : fix failure to load model (ggml-org#1817)
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. Co-authored-by: Iwan Kawrakow <[email protected]>
1 parent fa84c4b commit 8c0a10e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ggml-metal.m

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ @implementation GGMLMetalClass
8686

8787
ctx->device = MTLCreateSystemDefaultDevice();
8888
ctx->queue = [ctx->device newCommandQueue];
89+
ctx->n_buffers = 0;
8990

9091
// determine if we can use MPS
9192
if (MPSSupportsMTLDevice(ctx->device)) {

0 commit comments

Comments
 (0)