Spaces:
Running
Running
slaren
commited on
metal : fix uninitialized abort_callback (llama/8968)
Browse files- ggml/src/ggml-metal.m +1 -1
ggml/src/ggml-metal.m
CHANGED
|
@@ -310,7 +310,7 @@ static struct ggml_backend_metal_context * ggml_metal_init(int n_cb) {
|
|
| 310 |
GGML_METAL_LOG_INFO("%s: picking default device: %s\n", __func__, [[device name] UTF8String]);
|
| 311 |
|
| 312 |
// Configure context
|
| 313 |
-
struct ggml_backend_metal_context * ctx =
|
| 314 |
ctx->device = device;
|
| 315 |
ctx->n_cb = MIN(n_cb, GGML_METAL_MAX_BUFFERS);
|
| 316 |
ctx->queue = [ctx->device newCommandQueue];
|
|
|
|
| 310 |
GGML_METAL_LOG_INFO("%s: picking default device: %s\n", __func__, [[device name] UTF8String]);
|
| 311 |
|
| 312 |
// Configure context
|
| 313 |
+
struct ggml_backend_metal_context * ctx = calloc(1, sizeof(struct ggml_backend_metal_context));
|
| 314 |
ctx->device = device;
|
| 315 |
ctx->n_cb = MIN(n_cb, GGML_METAL_MAX_BUFFERS);
|
| 316 |
ctx->queue = [ctx->device newCommandQueue];
|