llama_cpp 0.14.2 → 0.14.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/ext/llama_cpp/llama_cpp.cpp +64 -0
- data/lib/llama_cpp/version.rb +2 -2
- data/sig/llama_cpp.rbs +6 -0
- data/vendor/tmp/llama.cpp/Makefile +91 -21
- data/vendor/tmp/llama.cpp/ggml-alloc.c +14 -5
- data/vendor/tmp/llama.cpp/ggml-backend-impl.h +5 -0
- data/vendor/tmp/llama.cpp/ggml-backend.c +155 -125
- data/vendor/tmp/llama.cpp/ggml-backend.h +4 -4
- data/vendor/tmp/llama.cpp/ggml-common.h +25 -2
- data/vendor/tmp/llama.cpp/ggml-cuda.cu +1779 -10762
- data/vendor/tmp/llama.cpp/ggml-cuda.h +6 -15
- data/vendor/tmp/llama.cpp/ggml-kompute.cpp +5 -0
- data/vendor/tmp/llama.cpp/ggml-metal.m +167 -124
- data/vendor/tmp/llama.cpp/ggml-metal.metal +603 -303
- data/vendor/tmp/llama.cpp/ggml-opencl.cpp +5 -0
- data/vendor/tmp/llama.cpp/ggml-quants.c +663 -56
- data/vendor/tmp/llama.cpp/ggml-quants.h +3 -0
- data/vendor/tmp/llama.cpp/ggml-sycl.cpp +341 -469
- data/vendor/tmp/llama.cpp/ggml-sycl.h +19 -4
- data/vendor/tmp/llama.cpp/ggml-vulkan-shaders.hpp +37199 -14939
- data/vendor/tmp/llama.cpp/ggml-vulkan.cpp +335 -307
- data/vendor/tmp/llama.cpp/ggml-vulkan.h +0 -11
- data/vendor/tmp/llama.cpp/ggml.c +229 -107
- data/vendor/tmp/llama.cpp/ggml.h +11 -5
- data/vendor/tmp/llama.cpp/llama.cpp +2136 -464
- data/vendor/tmp/llama.cpp/llama.h +86 -23
- data/vendor/tmp/llama.cpp/unicode-data.cpp +1651 -0
- data/vendor/tmp/llama.cpp/unicode-data.h +16 -0
- data/vendor/tmp/llama.cpp/unicode.cpp +8 -1403
- data/vendor/tmp/llama.cpp/unicode.h +2 -0
- metadata +5 -3
@@ -13,22 +13,37 @@
|
|
13
13
|
extern "C" {
|
14
14
|
#endif
|
15
15
|
|
16
|
-
#define GGML_SYCL_MAX_DEVICES
|
16
|
+
#define GGML_SYCL_MAX_DEVICES 48
|
17
17
|
#define GGML_SYCL_NAME "SYCL"
|
18
18
|
|
19
|
-
|
20
|
-
GGML_API bool ggml_sycl_compute_forward(struct ggml_compute_params * params, struct ggml_tensor * tensor);
|
19
|
+
// backend API
|
21
20
|
GGML_API ggml_backend_t ggml_backend_sycl_init(int device);
|
21
|
+
|
22
|
+
// devide buffer
|
22
23
|
GGML_API ggml_backend_buffer_type_t ggml_backend_sycl_buffer_type(int device);
|
24
|
+
|
25
|
+
// split tensor buffer that splits matrices by rows across multiple devices
|
26
|
+
GGML_API GGML_CALL ggml_backend_buffer_type_t ggml_backend_sycl_split_buffer_type(const float * tensor_split);
|
27
|
+
|
28
|
+
// pinned host buffer for use with the CPU backend for faster copies between CPU and GPU
|
23
29
|
GGML_API ggml_backend_buffer_type_t ggml_backend_sycl_host_buffer_type(void);
|
30
|
+
|
24
31
|
GGML_API void ggml_backend_sycl_print_sycl_devices(void);
|
25
32
|
GGML_API GGML_CALL void ggml_sycl_get_gpu_list(int *id_list, int max_len);
|
26
33
|
GGML_API GGML_CALL void ggml_sycl_get_device_description(int device, char *description, size_t description_size);
|
27
34
|
GGML_API GGML_CALL int ggml_backend_sycl_get_device_count();
|
28
|
-
GGML_API GGML_CALL ggml_backend_buffer_type_t ggml_backend_sycl_split_buffer_type(const float * tensor_split);
|
29
35
|
GGML_API GGML_CALL void ggml_backend_sycl_get_device_memory(int device, size_t *free, size_t *total);
|
30
36
|
GGML_API GGML_CALL int ggml_backend_sycl_get_device_index(int device_id);
|
31
37
|
|
38
|
+
// TODO: these are temporary
|
39
|
+
// ref: https://github.com/ggerganov/llama.cpp/pull/6022#issuecomment-1992615670
|
40
|
+
GGML_API GGML_CALL int ggml_backend_sycl_get_device_id(int device_index);
|
41
|
+
GGML_API GGML_CALL void ggml_backend_sycl_set_single_device_mode(int main_gpu_id);
|
42
|
+
GGML_API GGML_CALL void ggml_backend_sycl_set_mul_device_mode();
|
43
|
+
|
44
|
+
// SYCL doesn't support registering host memory, keep here for reference
|
45
|
+
// GGML_API GGML_CALL bool ggml_backend_sycl_register_host_buffer(void * buffer, size_t size);
|
46
|
+
// GGML_API GGML_CALL void ggml_backend_sycl_unregister_host_buffer(void * buffer);
|
32
47
|
#ifdef __cplusplus
|
33
48
|
}
|
34
49
|
#endif
|