support reconnection

This commit is contained in:
DeEMO 2025-05-23 10:08:30 +00:00
parent e50b3aa473
commit d1b97f798e
5 changed files with 226 additions and 69 deletions

View file

@ -448,6 +448,12 @@ extern "C" {
struct llama_model_params params);
LLAMA_API void llama_free_model(struct llama_model * model);
enum NodeType{
NODE_TYPE_WORKER,
NODE_TYPE_FOWARDER,
NODE_TYPE_EXIT,
};
LLAMA_API void llama_init_sockets (struct llama_context * ctx, uint32_t n_world, uint32_t my_rank);
LLAMA_API void llama_free_sockets (struct llama_context * ctx, char ** msg);
@ -455,7 +461,12 @@ extern "C" {
LLAMA_API int llama_send_device_info (struct llama_context * ctx, struct device_info * dev_info);
LLAMA_API int llama_bcast_startup_args(struct llama_context * ctx, uint32_t rank, struct startup_args * args);
LLAMA_API int llama_bcast_layer_setup (struct llama_context * ctx, uint32_t * n_layer_window, uint32_t * n_gpu_layers);
LLAMA_API int llama_rebuild_topo (struct llama_context * ctx, uint32_t * n_layer_window, struct device_info * dev_info_set);
LLAMA_API int llama_rebuild_topo (struct llama_context * ctx,
uint32_t * n_layer_window,
struct device_info * dev_info_set,
NodeType* node_type,
char * is_fowarder);
LLAMA_API int llama_foward_messages (struct llama_context * ctx);
LLAMA_API int llama_recv_layer_setup (struct llama_context * ctx, uint32_t * n_layer_window, uint32_t * n_gpu_layers);
LLAMA_API int llm_load_tensors(