Skip to content

Commit a847676

Browse files
metal : set log callback before initializing (#3427)
1 parent 095231d commit a847676

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llama.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6760,13 +6760,14 @@ struct llama_context * llama_new_context_with_model(
67606760

67616761
#ifdef GGML_USE_METAL
67626762
if (model->n_gpu_layers > 0) {
6763+
ggml_metal_log_set_callback(llama_log_callback_default, NULL);
6764+
67636765
ctx->ctx_metal = ggml_metal_init(1);
67646766
if (!ctx->ctx_metal) {
67656767
LLAMA_LOG_ERROR("%s: ggml_metal_init() failed\n", __func__);
67666768
llama_free(ctx);
67676769
return NULL;
67686770
}
6769-
ggml_metal_log_set_callback(llama_log_callback_default, NULL);
67706771
//ggml_metal_graph_find_concurrency(ctx->ctx_metal, gf, false);
67716772
//ggml_allocr_set_parse_seq(ctx->alloc, ggml_metal_get_concur_list(ctx->ctx_metal), ggml_metal_if_optimized(ctx->ctx_metal));
67726773
}

0 commit comments

Comments
 (0)