Skip to content

Commit

Permalink
metal : fix uninitialized abort_callback (ggerganov#8968)
Browse files Browse the repository at this point in the history
  • Loading branch information
slaren authored Aug 10, 2024
1 parent 7eb2384 commit 6e02327
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ggml/src/ggml-metal.m
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ static void ggml_metal_log(enum ggml_log_level level, const char * format, ...){
GGML_METAL_LOG_INFO("%s: picking default device: %s\n", __func__, [[device name] UTF8String]);

// Configure context
struct ggml_backend_metal_context * ctx = malloc(sizeof(struct ggml_backend_metal_context));
struct ggml_backend_metal_context * ctx = calloc(1, sizeof(struct ggml_backend_metal_context));
ctx->device = device;
ctx->n_cb = MIN(n_cb, GGML_METAL_MAX_BUFFERS);
ctx->queue = [ctx->device newCommandQueue];
Expand Down

0 comments on commit 6e02327

Please sign in to comment.