char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Georgi Gerganovmetal : single-source fusion table + fusion debug rework (#28164)a2878d30d

char/aliceai-t5-moe
1.4 KiB42 linesraw
1#pragma once
2
3#include "ggml-metal-device.h"
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9//
10// backend context
11//
12
13typedef struct ggml_metal * ggml_metal_t;
14
15ggml_metal_t ggml_metal_init(ggml_metal_device_t dev);
16void ggml_metal_free(ggml_metal_t ctx);
17
18const char * ggml_metal_get_name(ggml_metal_t ctx);
19
20void ggml_metal_synchronize(ggml_metal_t ctx);
21
22void ggml_metal_set_tensor_async(ggml_metal_t ctx, struct ggml_tensor * tensor, const void * data, size_t offset, size_t size);
23void ggml_metal_get_tensor_async(ggml_metal_t ctx, const struct ggml_tensor * tensor, void * data, size_t offset, size_t size);
24bool ggml_metal_cpy_tensor_async(ggml_metal_t ctx_src, ggml_metal_t ctx_dst, const struct ggml_tensor * src, struct ggml_tensor * dst);
25
26enum ggml_status ggml_metal_graph_compute (ggml_metal_t ctx, struct ggml_cgraph * gf);
27void             ggml_metal_graph_optimize(ggml_metal_t ctx, struct ggml_cgraph * gf);
28
29void ggml_metal_event_record(ggml_metal_t ctx, ggml_metal_event_t ev);
30void ggml_metal_event_wait  (ggml_metal_t ctx, ggml_metal_event_t ev);
31
32ggml_metal_event_t ggml_metal_get_ev_cpy(ggml_metal_t ctx);
33
34void ggml_metal_set_n_cb            (ggml_metal_t ctx, int n_cb);
35void ggml_metal_set_abort_callback  (ggml_metal_t ctx, ggml_abort_callback abort_callback, void * user_data);
36
37bool ggml_metal_supports_family     (ggml_metal_t ctx, int family);
38void ggml_metal_capture_next_compute(ggml_metal_t ctx);
39
40#ifdef __cplusplus
41}
42#endif