char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
d0132a680
char/aliceai-t5-moe
1#pragma once 2 3#include "ggml-backend.h" 4 5#ifdef __cplusplus 6extern "C" { 7#endif 8 9#define RPC_PROTO_MAJOR_VERSION 6 10#define RPC_PROTO_MINOR_VERSION 0 11#define RPC_PROTO_PATCH_VERSION 0 12 13#ifdef __cplusplus 14static_assert (GGML_OP_COUNT == 101 ,"GGML_OP_COUNT has changed - update RPC_PROTO_PATCH_VERSION" ); 15#endif 16 17#define GGML_RPC_MAX_SERVERS 16 18 19// backend API 20GGML_BACKEND_API ggml_backend_t ggml_backend_rpc_init (const char * endpoint ,uint32_t device ); 21GGML_BACKEND_API bool ggml_backend_is_rpc (ggml_backend_t backend ); 22 23GGML_BACKEND_API ggml_backend_buffer_type_t ggml_backend_rpc_buffer_type (const char * endpoint ,uint32_t device ); 24 25GGML_BACKEND_API void ggml_backend_rpc_get_device_memory (const char * endpoint ,uint32_t device ,size_t * free ,size_t * total ); 26 27GGML_BACKEND_API void ggml_backend_rpc_start_server (const char * endpoint ,const char * cache_dir , 28size_t n_threads ,size_t n_devices ,ggml_backend_dev_t * devices ); 29 30GGML_BACKEND_API ggml_backend_reg_t ggml_backend_rpc_reg (void ); 31GGML_BACKEND_API ggml_backend_reg_t ggml_backend_rpc_add_server (const char * endpoint ); 32 33#ifdef __cplusplus 34} 35#endif