llama_cpp 0.12.4 → 0.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/ext/llama_cpp/llama_cpp.cpp +46 -0
- data/lib/llama_cpp/version.rb +2 -2
- data/sig/llama_cpp.rbs +7 -0
- data/vendor/tmp/llama.cpp/Makefile +146 -53
- data/vendor/tmp/llama.cpp/ggml-alloc.c +563 -490
- data/vendor/tmp/llama.cpp/ggml-alloc.h +39 -65
- data/vendor/tmp/llama.cpp/ggml-backend.c +250 -262
- data/vendor/tmp/llama.cpp/ggml-backend.h +8 -12
- data/vendor/tmp/llama.cpp/ggml-cuda.cu +688 -270
- data/vendor/tmp/llama.cpp/ggml-impl.h +2 -0
- data/vendor/tmp/llama.cpp/ggml-metal.m +2 -0
- data/vendor/tmp/llama.cpp/ggml-quants.c +386 -134
- data/vendor/tmp/llama.cpp/ggml-quants.h +68 -59
- data/vendor/tmp/llama.cpp/ggml-sycl.cpp +139 -145
- data/vendor/tmp/llama.cpp/ggml-vulkan-shaders.hpp +1516 -10656
- data/vendor/tmp/llama.cpp/ggml-vulkan.cpp +1777 -1238
- data/vendor/tmp/llama.cpp/ggml-vulkan.h +14 -9
- data/vendor/tmp/llama.cpp/ggml.c +147 -70
- data/vendor/tmp/llama.cpp/ggml.h +26 -6
- data/vendor/tmp/llama.cpp/llama.cpp +920 -173
- data/vendor/tmp/llama.cpp/llama.h +7 -1
- data/vendor/tmp/llama.cpp/unicode.h +42 -30
- metadata +2 -2
@@ -19,6 +19,7 @@ extern "C" {
|
|
19
19
|
// fall back to the _Static_assert C11 keyword.
|
20
20
|
// if C99 - static_assert is noop
|
21
21
|
// ref: https://stackoverflow.com/a/53923785/4039976
|
22
|
+
#ifndef __cplusplus
|
22
23
|
#ifndef static_assert
|
23
24
|
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201100L)
|
24
25
|
#define static_assert(cond, msg) _Static_assert(cond, msg)
|
@@ -26,6 +27,7 @@ extern "C" {
|
|
26
27
|
#define static_assert(cond, msg) struct global_scope_noop_trick
|
27
28
|
#endif
|
28
29
|
#endif
|
30
|
+
#endif
|
29
31
|
|
30
32
|
// __FMA__ and __F16C__ are not defined in MSVC, however they are implied with AVX2/AVX512
|
31
33
|
#if defined(_MSC_VER) && (defined(__AVX2__) || defined(__AVX512F__))
|
@@ -687,6 +687,7 @@ static bool ggml_metal_graph_compute(
|
|
687
687
|
struct ggml_metal_context * ctx,
|
688
688
|
struct ggml_cgraph * gf) {
|
689
689
|
|
690
|
+
@autoreleasepool {
|
690
691
|
MTLComputePassDescriptor * edesc = MTLComputePassDescriptor.computePassDescriptor;
|
691
692
|
edesc.dispatchType = MTLDispatchTypeSerial;
|
692
693
|
|
@@ -2272,6 +2273,7 @@ static bool ggml_metal_graph_compute(
|
|
2272
2273
|
[[MTLCaptureManager sharedCaptureManager] stopCapture];
|
2273
2274
|
}
|
2274
2275
|
|
2276
|
+
}
|
2275
2277
|
return true;
|
2276
2278
|
}
|
2277
2279
|
|