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.
@@ -13,22 +13,37 @@
13
13
  extern "C" {
14
14
  #endif
15
15
 
16
- #define GGML_SYCL_MAX_DEVICES 16
16
+ #define GGML_SYCL_MAX_DEVICES 48
17
17
  #define GGML_SYCL_NAME "SYCL"
18
18
 
19
- GGML_API void ggml_init_sycl(void);
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