-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: sync llama.cpp * fix: add log.h * chore: cleanup * fix(ios): update patch
- Loading branch information
Showing
5 changed files
with
46 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
example/ios/RNLlamaExample.xcworkspace/contents.xcworkspacedata
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Submodule llama.cpp
updated
58 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,66 @@ | ||
--- ggml-metal-orig.m 2023-08-29 10:32:31 | ||
+++ ggml-metal.m 2023-08-29 10:32:32 | ||
@@ -230,13 +230,13 @@ | ||
--- ggml-metal-orig.m 2023-09-04 09:16:25 | ||
+++ ggml-metal.m 2023-09-04 10:09:46 | ||
@@ -118,13 +118,13 @@ | ||
metal_printf("%s: allocating\n", __func__); | ||
|
||
// Show all the Metal device instances in the system | ||
- NSArray * devices = MTLCopyAllDevices(); | ||
+ // NSArray * devices = MTLCopyAllDevices(); | ||
id <MTLDevice> device; | ||
NSString * s; | ||
- for (device in devices) { | ||
- s = [device name]; | ||
- metal_printf("%s: found device: %s\n", __func__, [s UTF8String]); | ||
- } | ||
+ // for (device in devices) { | ||
+ // s = [device name]; | ||
+ // metal_printf("%s: found device: %s\n", __func__, [s UTF8String]); | ||
+ // } | ||
|
||
// Pick and show default Metal device | ||
device = MTLCreateSystemDefaultDevice(); | ||
@@ -247,13 +247,13 @@ | ||
#undef LM_GGML_METAL_ADD_KERNEL | ||
} | ||
|
||
- fprintf(stderr, "%s: recommendedMaxWorkingSetSize = %8.2f MB\n", __func__, ctx->device.recommendedMaxWorkingSetSize / 1024.0 / 1024.0); | ||
+ // fprintf(stderr, "%s: recommendedMaxWorkingSetSize = %8.2f MB\n", __func__, ctx->device.recommendedMaxWorkingSetSize / 1024.0 / 1024.0); | ||
fprintf(stderr, "%s: hasUnifiedMemory = %s\n", __func__, ctx->device.hasUnifiedMemory ? "true" : "false"); | ||
|
||
- metal_printf("%s: recommendedMaxWorkingSetSize = %8.2f MB\n", __func__, ctx->device.recommendedMaxWorkingSetSize / 1024.0 / 1024.0); | ||
- metal_printf("%s: hasUnifiedMemory = %s\n", __func__, ctx->device.hasUnifiedMemory ? "true" : "false"); | ||
- if (ctx->device.maxTransferRate != 0) { | ||
- fprintf(stderr, "%s: maxTransferRate = %8.2f MB/s\n", __func__, ctx->device.maxTransferRate / 1024.0 / 1024.0); | ||
- metal_printf("%s: maxTransferRate = %8.2f MB/s\n", __func__, ctx->device.maxTransferRate / 1024.0 / 1024.0); | ||
- } else { | ||
- fprintf(stderr, "%s: maxTransferRate = built-in GPU\n", __func__); | ||
- metal_printf("%s: maxTransferRate = built-in GPU\n", __func__); | ||
- } | ||
+ // metal_printf("%s: recommendedMaxWorkingSetSize = %8.2f MB\n", __func__, ctx->device.recommendedMaxWorkingSetSize / 1024.0 / 1024.0); | ||
+ // metal_printf("%s: hasUnifiedMemory = %s\n", __func__, ctx->device.hasUnifiedMemory ? "true" : "false"); | ||
+ // if (ctx->device.maxTransferRate != 0) { | ||
+ // fprintf(stderr, "%s: maxTransferRate = %8.2f MB/s\n", __func__, ctx->device.maxTransferRate / 1024.0 / 1024.0); | ||
+ // metal_printf("%s: maxTransferRate = %8.2f MB/s\n", __func__, ctx->device.maxTransferRate / 1024.0 / 1024.0); | ||
+ // } else { | ||
+ // fprintf(stderr, "%s: maxTransferRate = built-in GPU\n", __func__); | ||
+ // metal_printf("%s: maxTransferRate = built-in GPU\n", __func__); | ||
+ // } | ||
|
||
return ctx; | ||
} | ||
@@ -436,15 +436,15 @@ | ||
@@ -454,15 +454,15 @@ | ||
} | ||
} | ||
|
||
- fprintf(stderr, ", (%8.2f / %8.2f)", | ||
- metal_printf(", (%8.2f / %8.2f)", | ||
- ctx->device.currentAllocatedSize / 1024.0 / 1024.0, | ||
- ctx->device.recommendedMaxWorkingSetSize / 1024.0 / 1024.0); | ||
+ // fprintf(stderr, ", (%8.2f / %8.2f)", | ||
+ // metal_printf(", (%8.2f / %8.2f)", | ||
+ // ctx->device.currentAllocatedSize / 1024.0 / 1024.0, | ||
+ // ctx->device.recommendedMaxWorkingSetSize / 1024.0 / 1024.0); | ||
|
||
- if (ctx->device.currentAllocatedSize > ctx->device.recommendedMaxWorkingSetSize) { | ||
- fprintf(stderr, ", warning: current allocated size is greater than the recommended max working set size\n"); | ||
- metal_printf(", warning: current allocated size is greater than the recommended max working set size\n"); | ||
- } else { | ||
- fprintf(stderr, "\n"); | ||
- metal_printf("\n"); | ||
- } | ||
+ // if (ctx->device.currentAllocatedSize > ctx->device.recommendedMaxWorkingSetSize) { | ||
+ // fprintf(stderr, ", warning: current allocated size is greater than the recommended max working set size\n"); | ||
+ // metal_printf(", warning: current allocated size is greater than the recommended max working set size\n"); | ||
+ // } else { | ||
+ // fprintf(stderr, "\n"); | ||
+ // metal_printf("\n"); | ||
+ // } | ||
} | ||
|
||
return true; |