Skip to content

Commit af8ba80

Browse files
committed
move version print to ggml_backend_rpc_start_server
1 parent 656c6f5 commit af8ba80

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

ggml/src/ggml-rpc/ggml-rpc.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,6 +1594,14 @@ static void rpc_serve_client(ggml_backend_t backend, const char * cache_dir,
15941594
void ggml_backend_rpc_start_server(ggml_backend_t backend, const char * endpoint,
15951595
const char * cache_dir,
15961596
size_t free_mem, size_t total_mem) {
1597+
printf("Starting RPC server v%d.%d.%d\n",
1598+
RPC_PROTO_MAJOR_VERSION,
1599+
RPC_PROTO_MINOR_VERSION,
1600+
RPC_PROTO_PATCH_VERSION);
1601+
printf(" endpoint : %s\n", endpoint);
1602+
printf(" local cache : %s\n", cache_dir ? cache_dir : "n/a");
1603+
printf(" backend memory : %zu MB\n", free_mem / (1024 * 1024));
1604+
15971605
std::string host;
15981606
int port;
15991607
if (!parse_endpoint(endpoint, host, port)) {

tools/rpc/rpc-server.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -300,13 +300,6 @@ int main(int argc, char * argv[]) {
300300
}
301301
cache_dir = cache_dir_str.c_str();
302302
}
303-
printf("Starting RPC server v%d.%d.%d\n",
304-
RPC_PROTO_MAJOR_VERSION,
305-
RPC_PROTO_MINOR_VERSION,
306-
RPC_PROTO_PATCH_VERSION);
307-
printf(" endpoint : %s\n", endpoint.c_str());
308-
printf(" local cache : %s\n", cache_dir ? cache_dir : "n/a");
309-
printf(" backend memory : %zu MB\n", free_mem / (1024 * 1024));
310303

311304
ggml_backend_reg_t reg = ggml_backend_reg_by_name("RPC");
312305
if (!reg) {

0 commit comments

Comments
 (0)