* ggml : prune deprecated API * cont : bump RPC version * cont : minor * ggml : remove outdated documentation from ggml.h The 172-line comment block at the top of the header has not been updated in a substantive way since the backend v2 split (Nov 2023) and now documents APIs that no longer exist: - `ggml_set_f32()`, `ggml_get_f32_1d()`, `ggml_set_f32_1d()` were removed - `ggml_conv_1d_1s()`, `ggml_conv_1d_2s()` ops no longer exist - `ggml_set_param()` no longer takes a context argument - `ggml_graph_compute_with_ctx()` moved to the CPU backend header - the optimization API now lives in `ggml-opt.h` The block also ended with 5 empty `TODO` sections. Assisted-by: dsh:llama.cpp/ggml-org/Qwen3.8-Flash-Next-GGUF (MacBook, M5 Max, 128GB) * ggml : remove DIAG_MASK_INF and DIAG_MASK_ZERO (#31946) * rpc : bump RPC protocol major version The tensor op enum is sent over the wire, so removing GGML_OP_ADD1, GGML_OP_DIAG_MASK_INF and GGML_OP_DIAG_MASK_ZERO shifts the value of every op that follows them and peers built before and after this change would misinterpret each other's ops. The handshake compares the major version for exact equality and ignores the patch version, so bumping the major version is what rejects incompatible peers instead of silently misbehaving. Assisted-by: dsh:llama.cpp/ggml-org/DeepSeek-V4.1-Flash-1017-GGUF (Mac Studio, M5 Ultra, 256GB) --------- Co-authored-by: losewayy <1134285612@qq.com>
41 lines
1.1 KiB
C
41 lines
1.1 KiB
C
#pragma once
|
|
|
|
#include "ggml-backend.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define RPC_PROTO_MAJOR_VERSION 10
|
|
#define RPC_PROTO_MINOR_VERSION 0
|
|
#define RPC_PROTO_PATCH_VERSION 0
|
|
|
|
#ifdef __cplusplus
|
|
static_assert(GGML_OP_COUNT == 99, "GGML_OP_COUNT has changed - update RPC_PROTO_PATCH_VERSION");
|
|
#endif
|
|
|
|
#define GGML_RPC_MAX_SERVERS 16
|
|
|
|
// backend API
|
|
GGML_BACKEND_API ggml_backend_t ggml_backend_rpc_init(const char * endpoint, uint32_t device);
|
|
|
|
GGML_BACKEND_API bool ggml_backend_is_rpc(ggml_backend_t backend);
|
|
|
|
GGML_BACKEND_API ggml_backend_buffer_type_t ggml_backend_rpc_buffer_type(const char * endpoint, uint32_t device);
|
|
|
|
GGML_BACKEND_API void ggml_backend_rpc_get_device_memory(const char * endpoint, uint32_t device, size_t * free, size_t * total);
|
|
|
|
GGML_BACKEND_API void ggml_backend_rpc_start_server(
|
|
const char * endpoint,
|
|
const char * cache_dir,
|
|
size_t n_threads,
|
|
size_t n_devices,
|
|
ggml_backend_dev_t * devices);
|
|
|
|
GGML_BACKEND_API ggml_backend_reg_t ggml_backend_rpc_reg(void);
|
|
GGML_BACKEND_API ggml_backend_reg_t ggml_backend_rpc_add_server(const char * endpoint);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|