Skip to content

Commit dd3732a

Browse files
committed
revert
1 parent 42e642a commit dd3732a

File tree

2 files changed

+1
-9905
lines changed

2 files changed

+1
-9905
lines changed

ggml-metal.m

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,10 @@
122122
#undef GGML_METAL_DECL_KERNEL
123123
};
124124

125-
extern const char ggml_metal_file[];
126-
extern const size_t ggml_metal_file_len;
127-
128125
// MSL code
129126
// TODO: move the contents here when ready
130127
// for now it is easier to work in a separate file
131-
// static NSString * const msl_library_source = @"see metal.metal";
128+
static NSString * const msl_library_source = @"see metal.metal";
132129

133130
// Here to assist with NSBundle Path Hack
134131
@interface GGMLMetalClass : NSObject
@@ -196,20 +193,6 @@ static void ggml_metal_log(enum ggml_log_level level, const char* format, ...){
196193
ctx->d_queue = dispatch_queue_create("ggml-metal", DISPATCH_QUEUE_CONCURRENT);
197194

198195
// load library
199-
#if 1
200-
NSString * const msl_library_source = [[NSString alloc] initWithBytes: ggml_metal_file length: ggml_metal_file_len encoding: NSASCIIStringEncoding];
201-
// compile from source string and show compile log
202-
{
203-
NSError * error = nil;
204-
205-
ctx->library = [ctx->device newLibraryWithSource:msl_library_source options:nil error:&error];
206-
if (error) {
207-
GGML_METAL_LOG_INFO("%s: error: %s\n", __func__, [[error description] UTF8String]);
208-
return NULL;
209-
}
210-
}
211-
[msl_library_source release];
212-
#elif GGML_SWIFT
213196
{
214197
NSBundle * bundle = nil;
215198
#ifdef SWIFT_PACKAGE
@@ -251,7 +234,6 @@ static void ggml_metal_log(enum ggml_log_level level, const char* format, ...){
251234
return NULL;
252235
}
253236
}
254-
#endif
255237

256238
// load kernels
257239
{

0 commit comments

Comments
 (0)