look for ggml-metal in the same directory as the binary

This commit is contained in:
Jeffrey Morgan 2023-07-11 15:56:28 -07:00
parent 3d0a9b477b
commit e64ef69e34
2 changed files with 2 additions and 1 deletions

1
ggml-metal.metal Symbolic link
View file

@ -0,0 +1 @@
llama/ggml-metal.metal

View file

@ -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];