llama_cpp 0.12.2 → 0.12.4
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 +15 -0
- data/README.md +2 -2
- data/ext/llama_cpp/extconf.rb +1 -0
- data/ext/llama_cpp/llama_cpp.cpp +68 -6
- data/lib/llama_cpp/version.rb +2 -2
- data/sig/llama_cpp.rbs +6 -2
- data/vendor/tmp/llama.cpp/Makefile +25 -3
- data/vendor/tmp/llama.cpp/ggml-alloc.c +87 -27
- data/vendor/tmp/llama.cpp/ggml-backend-impl.h +6 -0
- data/vendor/tmp/llama.cpp/ggml-backend.c +176 -18
- data/vendor/tmp/llama.cpp/ggml-backend.h +14 -0
- data/vendor/tmp/llama.cpp/ggml-kompute.cpp +1990 -0
- data/vendor/tmp/llama.cpp/ggml-kompute.h +46 -0
- data/vendor/tmp/llama.cpp/ggml-metal.h +3 -0
- data/vendor/tmp/llama.cpp/ggml-metal.m +144 -113
- data/vendor/tmp/llama.cpp/ggml-metal.metal +303 -4
- data/vendor/tmp/llama.cpp/ggml-opencl.cpp +95 -3
- data/vendor/tmp/llama.cpp/ggml-opencl.h +1 -0
- data/vendor/tmp/llama.cpp/ggml-quants.c +736 -59
- data/vendor/tmp/llama.cpp/ggml-quants.h +20 -1
- data/vendor/tmp/llama.cpp/ggml-sycl.cpp +15255 -0
- data/vendor/tmp/llama.cpp/ggml-sycl.h +29 -0
- data/vendor/tmp/llama.cpp/ggml-vulkan-shaders.hpp +60854 -0
- data/vendor/tmp/llama.cpp/ggml-vulkan.cpp +5270 -0
- data/vendor/tmp/llama.cpp/ggml-vulkan.h +34 -0
- data/vendor/tmp/llama.cpp/ggml.c +664 -117
- data/vendor/tmp/llama.cpp/ggml.h +46 -11
- data/vendor/tmp/llama.cpp/llama.cpp +1426 -341
- data/vendor/tmp/llama.cpp/llama.h +24 -15
- data/vendor/tmp/llama.cpp/unicode.h +2 -1
- metadata +10 -3
@@ -0,0 +1,46 @@
|
|
1
|
+
#pragma once
|
2
|
+
|
3
|
+
#include "ggml.h"
|
4
|
+
#include "ggml-backend.h"
|
5
|
+
|
6
|
+
#include <stdbool.h>
|
7
|
+
#include <stddef.h>
|
8
|
+
#include <stdint.h>
|
9
|
+
|
10
|
+
#ifdef __cplusplus
|
11
|
+
extern "C" {
|
12
|
+
#endif
|
13
|
+
|
14
|
+
struct ggml_vk_device {
|
15
|
+
int index;
|
16
|
+
int type; // same as VkPhysicalDeviceType
|
17
|
+
size_t heapSize;
|
18
|
+
const char * name;
|
19
|
+
const char * vendor;
|
20
|
+
int subgroupSize;
|
21
|
+
uint64_t bufferAlignment;
|
22
|
+
uint64_t maxAlloc;
|
23
|
+
};
|
24
|
+
|
25
|
+
struct ggml_vk_device * ggml_vk_available_devices(size_t memoryRequired, size_t * count);
|
26
|
+
bool ggml_vk_get_device(struct ggml_vk_device * device, size_t memoryRequired, const char * name);
|
27
|
+
bool ggml_vk_has_vulkan(void);
|
28
|
+
bool ggml_vk_has_device(void);
|
29
|
+
struct ggml_vk_device ggml_vk_current_device(void);
|
30
|
+
|
31
|
+
//
|
32
|
+
// backend API
|
33
|
+
//
|
34
|
+
|
35
|
+
// forward declaration
|
36
|
+
typedef struct ggml_backend * ggml_backend_t;
|
37
|
+
|
38
|
+
GGML_API ggml_backend_t ggml_backend_kompute_init(int device);
|
39
|
+
|
40
|
+
GGML_API bool ggml_backend_is_kompute(ggml_backend_t backend);
|
41
|
+
|
42
|
+
GGML_API ggml_backend_buffer_type_t ggml_backend_kompute_buffer_type(int device);
|
43
|
+
|
44
|
+
#ifdef __cplusplus
|
45
|
+
}
|
46
|
+
#endif
|
@@ -57,6 +57,9 @@ GGML_API GGML_CALL ggml_backend_buffer_type_t ggml_backend_metal_buffer_type(voi
|
|
57
57
|
// ref: https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf
|
58
58
|
GGML_API bool ggml_backend_metal_supports_family(ggml_backend_t backend, int family);
|
59
59
|
|
60
|
+
// capture all command buffers committed the next time `ggml_backend_graph_compute` is called
|
61
|
+
GGML_API void ggml_backend_metal_capture_next_compute(ggml_backend_t backend);
|
62
|
+
|
60
63
|
#ifdef __cplusplus
|
61
64
|
}
|
62
65
|
#endif
|