ggml
[Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685)
Brought by drakestapleton
| 1 | #pragma once |
| 2 | |
| 3 | #include "ggml-backend.h" |
| 4 | |
| 5 | #ifdef __cplusplus |
| 6 | extern "C" { |
| 7 | #endif |
| 8 | |
| 9 | #define RPC_PROTO_MAJOR_VERSION 8 |
| 10 | #define RPC_PROTO_MINOR_VERSION 0 |
| 11 | #define RPC_PROTO_PATCH_VERSION 1 |
| 12 | |
| 13 | #ifdef __cplusplus |
| 14 | static_assert(GGML_OP_COUNT == 102, "GGML_OP_COUNT has changed - update RPC_PROTO_PATCH_VERSION"); |
| 15 | #endif |
| 16 | |
| 17 | #define GGML_RPC_MAX_SERVERS 16 |
| 18 | |
| 19 | // backend API |
| 20 | GGML_BACKEND_API ggml_backend_t ggml_backend_rpc_init(const char * endpoint, uint32_t device); |
| 21 | GGML_BACKEND_API bool ggml_backend_is_rpc(ggml_backend_t backend); |
| 22 | |
| 23 | GGML_BACKEND_API ggml_backend_buffer_type_t ggml_backend_rpc_buffer_type(const char * endpoint, uint32_t device); |
| 24 | |
| 25 | GGML_BACKEND_API void ggml_backend_rpc_get_device_memory(const char * endpoint, uint32_t device, size_t * free, size_t * total); |
| 26 | |
| 27 | GGML_BACKEND_API void ggml_backend_rpc_start_server(const char * endpoint, const char * cache_dir, |
| 28 | size_t n_threads, size_t n_devices, ggml_backend_dev_t * devices); |
| 29 | |
| 30 | GGML_BACKEND_API ggml_backend_reg_t ggml_backend_rpc_reg(void); |
| 31 | GGML_BACKEND_API ggml_backend_reg_t ggml_backend_rpc_add_server(const char * endpoint); |
| 32 | |
| 33 | #ifdef __cplusplus |
| 34 | } |
| 35 | #endif |