Skip to content

Commit

Permalink
rpc : print error message when failed to connect endpoint (#9042)
Browse files Browse the repository at this point in the history
  • Loading branch information
rgerganov authored Aug 19, 2024
1 parent 18eaf29 commit 1b6ff90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ggml/src/ggml-rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ GGML_CALL static bool ggml_backend_rpc_supports_op(ggml_backend_t backend, const
}

GGML_CALL static bool ggml_backend_rpc_supports_buft(ggml_backend_t backend, ggml_backend_buffer_type_t buft) {
if (buft->iface.get_name != ggml_backend_rpc_buffer_type_name) {
if (!buft || buft->iface.get_name != ggml_backend_rpc_buffer_type_name) {
return false;
}
ggml_backend_rpc_buffer_type_context * buft_ctx = (ggml_backend_rpc_buffer_type_context *)buft->context;
Expand Down Expand Up @@ -679,6 +679,7 @@ GGML_API GGML_CALL ggml_backend_buffer_type_t ggml_backend_rpc_buffer_type(const
}
auto sock = get_socket(endpoint);
if (sock == nullptr) {
fprintf(stderr, "Failed to connect to %s\n", endpoint);
return nullptr;
}
size_t alignment = get_alignment(sock);
Expand Down

0 comments on commit 1b6ff90

Please sign in to comment.