mirror of
https://github.com/ikawrakow/ik_llama.cpp.git
synced 2026-02-26 16:14:10 +00:00
Cleanup and use GGML error logging functions.
This commit is contained in:
@@ -110,10 +110,6 @@ struct rpc_msg_init_tensor_req {
|
||||
rpc_tensor tensor;
|
||||
};
|
||||
|
||||
//struct rpc_msg_init_tensor_rsp {
|
||||
// uint8_t result; // success/failure
|
||||
//};
|
||||
|
||||
struct rpc_msg_alloc_buffer_req {
|
||||
uint64_t size;
|
||||
};
|
||||
@@ -886,7 +882,7 @@ bool rpc_server::get_alloc_size(const rpc_msg_get_alloc_size_req & request, rpc_
|
||||
ggml_tensor * tensor = deserialize_tensor(ctx, &request.tensor);
|
||||
|
||||
if (tensor == nullptr) {
|
||||
fprintf(stderr,"Null tensor pointer passed to server get_alloc_size function.\n");
|
||||
GGML_LOG_ERROR("Null tensor pointer passed to server get_alloc_size function.\n");
|
||||
ggml_free(ctx);
|
||||
return false;
|
||||
}
|
||||
@@ -1078,7 +1074,7 @@ bool rpc_server::init_tensor(const rpc_msg_init_tensor_req & request) {
|
||||
struct ggml_context * ctx = ggml_init(params);
|
||||
ggml_tensor * tensor = deserialize_tensor(ctx, &request.tensor);
|
||||
if (tensor == nullptr) {
|
||||
fprintf(stderr,"Null tensor pointer passed to server init_tensor function.\n");
|
||||
GGML_LOG_ERROR("Null tensor pointer passed to server init_tensor function.\n");
|
||||
ggml_free(ctx);
|
||||
return false;
|
||||
}
|
||||
@@ -1088,7 +1084,7 @@ bool rpc_server::init_tensor(const rpc_msg_init_tensor_req & request) {
|
||||
if (buffer && buffer->iface.init_tensor) {
|
||||
buffer->iface.init_tensor(buffer, tensor);
|
||||
} else {
|
||||
fprintf(stderr,"Null buffer for tensor passed to init_tensor function\n");
|
||||
GGML_LOG_ERROR("Null buffer for tensor passed to init_tensor function\n");
|
||||
}
|
||||
|
||||
ggml_free(ctx);
|
||||
|
||||
Reference in New Issue
Block a user