Skip to content

Commit

Permalink
fix: fix metal build
Browse files Browse the repository at this point in the history
  • Loading branch information
wsxiaoys committed Mar 1, 2024
1 parent 807ee66 commit e8bbb2f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 21,437 deletions.
52 changes: 0 additions & 52 deletions embedfile.c

This file was deleted.

18 changes: 0 additions & 18 deletions ggml-metal.m
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,6 @@
bool should_capture_next_compute;
};

extern const char ggml_metal_file[];
extern const size_t ggml_metal_file_len;

// MSL code
// TODO: move the contents here when ready
// for now it is easier to work in a separate file
Expand Down Expand Up @@ -281,20 +278,6 @@ static void ggml_metal_log(enum ggml_log_level level, const char * format, ...){
id<MTLLibrary> metal_library;

// load library
#if 1
NSString * const msl_library_source = [[NSString alloc] initWithBytes: ggml_metal_file length: ggml_metal_file_len encoding: NSASCIIStringEncoding];
// compile from source string and show compile log
{
NSError * error = nil;

ctx->library = [ctx->device newLibraryWithSource:msl_library_source options:nil error:&error];
if (error) {
GGML_METAL_LOG_INFO("%s: error: %s\n", __func__, [[error description] UTF8String]);
return NULL;
}
}
[msl_library_source release];
#elif GGML_SWIFT
{
NSBundle * bundle = nil;
#ifdef SWIFT_PACKAGE
Expand Down Expand Up @@ -367,7 +350,6 @@ static void ggml_metal_log(enum ggml_log_level level, const char * format, ...){
}
}
}
#endif

// print MTL GPU family:
GGML_METAL_LOG_INFO("%s: GPU name: %s\n", __func__, [[ctx->device name] UTF8String]);
Expand Down
Loading

0 comments on commit e8bbb2f

Please sign in to comment.