llama_cpp 0.12.3 → 0.12.5

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.
@@ -0,0 +1,39 @@
1
+ #pragma once
2
+
3
+ #include "ggml.h"
4
+ #include "ggml-backend.h"
5
+
6
+ #ifdef __cplusplus
7
+ extern "C" {
8
+ #endif
9
+
10
+ #define GGML_VK_NAME "Vulkan"
11
+ #define GGML_VK_MAX_DEVICES 16
12
+
13
+ GGML_API void ggml_vk_init_cpu_assist(void);
14
+
15
+ GGML_API void ggml_vk_preallocate_buffers_graph_cpu_assist(struct ggml_tensor * node);
16
+ GGML_API void ggml_vk_preallocate_buffers_cpu_assist(void);
17
+ GGML_API void ggml_vk_build_graph_cpu_assist(struct ggml_tensor * node, bool last_node);
18
+ GGML_API bool ggml_vk_compute_forward_cpu_assist(struct ggml_compute_params * params, struct ggml_tensor * tensor);
19
+ #ifdef GGML_VULKAN_CHECK_RESULTS
20
+ void ggml_vk_check_results_1_cpu_assist(struct ggml_compute_params * params, struct ggml_tensor * tensor);
21
+ #endif
22
+ GGML_API void ggml_vk_graph_cleanup_cpu_assist(void);
23
+ GGML_API void ggml_vk_free_cpu_assist(void);
24
+
25
+ // backend API
26
+ GGML_API GGML_CALL ggml_backend_t ggml_backend_vk_init(size_t dev_num);
27
+
28
+ GGML_API GGML_CALL bool ggml_backend_is_vk(ggml_backend_t backend);
29
+ GGML_API GGML_CALL int ggml_backend_vk_get_device_count(void);
30
+ GGML_API GGML_CALL void ggml_backend_vk_get_device_description(int device, char * description, size_t description_size);
31
+ GGML_API GGML_CALL void ggml_backend_vk_get_device_memory(int device, size_t * free, size_t * total);
32
+
33
+ GGML_API GGML_CALL ggml_backend_buffer_type_t ggml_backend_vk_buffer_type(size_t dev_num);
34
+ // pinned host buffer for use with the CPU backend for faster copies between CPU and GPU
35
+ GGML_API GGML_CALL ggml_backend_buffer_type_t ggml_backend_vk_host_buffer_type(void);
36
+
37
+ #ifdef __cplusplus
38
+ }
39
+ #endif