From e64ef69e348b6f4396543c7a5e1c196d6a5287a0 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Tue, 11 Jul 2023 15:56:28 -0700 Subject: [PATCH] look for ggml-metal in the same directory as the binary --- ggml-metal.metal | 1 + llama/ggml-metal.m | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 120000 ggml-metal.metal diff --git a/ggml-metal.metal b/ggml-metal.metal new file mode 120000 index 00000000..9f596334 --- /dev/null +++ b/ggml-metal.metal @@ -0,0 +1 @@ +llama/ggml-metal.metal \ No newline at end of file diff --git a/llama/ggml-metal.m b/llama/ggml-metal.m index d968f0cd..bce68893 100644 --- a/llama/ggml-metal.m +++ b/llama/ggml-metal.m @@ -152,7 +152,7 @@ struct ggml_metal_context * ggml_metal_init(int n_cb) { //NSString * path = [[NSBundle mainBundle] pathForResource:@"../../examples/metal/metal" ofType:@"metal"]; NSBundle * bundle = [NSBundle bundleForClass:[GGMLMetalClass class]]; - NSString * path = [bundle pathForResource:@"llama/ggml-metal" ofType:@"metal"]; + NSString * path = [bundle pathForResource:@"ggml-metal" ofType:@"metal"]; fprintf(stderr, "%s: loading '%s'\n", __func__, [path UTF8String]); NSString * src = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:&error];