From 24013b37b66aa396f27e89d570426912e80e7034 Mon Sep 17 00:00:00 2001 From: kchro3 Date: Fri, 8 Sep 2023 20:27:43 -0700 Subject: [PATCH] update to use newLibraryWithURL --- ggml-metal.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ggml-metal.m b/ggml-metal.m index fadc7703d..d3584aa30 100644 --- a/ggml-metal.m +++ b/ggml-metal.m @@ -150,9 +150,10 @@ struct ggml_metal_context * ggml_metal_init(int n_cb) { NSString * llamaBundlePath = [bundle pathForResource:@"llama_llama" ofType:@"bundle"]; NSBundle * llamaBundle = [NSBundle bundleWithPath:llamaBundlePath]; NSString * libPath = [llamaBundle pathForResource:@"default" ofType:@"metallib"]; + NSURL * libURL = [NSURL fileURLWithPath:libPath]; // Load the metallib file into a Metal library - ctx->library = [ctx->device newLibraryWithFile:libPath error:&error]; + ctx->library = [ctx->device newLibraryWithURL:libURL error:&error]; if (error) { metal_printf("%s: error: %s\n", __func__, [[error description] UTF8String]);