mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-11-15 07:19:53 +00:00
rpc : pack only RPC structs (#9959)
Some checks are pending
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/full-cuda.Dockerfile platforms:linux/amd64 tag:full-cuda]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/full-musa.Dockerfile platforms:linux/amd64 tag:full-musa]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/full.Dockerfile platforms:linux/amd64,linux/arm64 tag:full]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-cli-cuda.Dockerfile platforms:linux/amd64 tag:light-cuda]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-cli-intel.Dockerfile platforms:linux/amd64 tag:light-intel]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-cli-musa.Dockerfile platforms:linux/amd64 tag:light-musa]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-cli.Dockerfile platforms:linux/amd64,linux/arm64 tag:light]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-server-cuda.Dockerfile platforms:linux/amd64 tag:server-cuda]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-server-intel.Dockerfile platforms:linux/amd64 tag:server-intel]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-server-musa.Dockerfile platforms:linux/amd64 tag:server-musa]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-server.Dockerfile platforms:linux/amd64,linux/arm64 tag:server]) (push) Waiting to run
Nix CI / nix-eval (macos-latest) (push) Waiting to run
Nix CI / nix-eval (ubuntu-latest) (push) Waiting to run
Nix CI / nix-build (macos-latest) (push) Waiting to run
Nix CI / nix-build (ubuntu-latest) (push) Waiting to run
flake8 Lint / Lint (push) Waiting to run
Some checks are pending
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/full-cuda.Dockerfile platforms:linux/amd64 tag:full-cuda]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/full-musa.Dockerfile platforms:linux/amd64 tag:full-musa]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/full.Dockerfile platforms:linux/amd64,linux/arm64 tag:full]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-cli-cuda.Dockerfile platforms:linux/amd64 tag:light-cuda]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-cli-intel.Dockerfile platforms:linux/amd64 tag:light-intel]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-cli-musa.Dockerfile platforms:linux/amd64 tag:light-musa]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-cli.Dockerfile platforms:linux/amd64,linux/arm64 tag:light]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-server-cuda.Dockerfile platforms:linux/amd64 tag:server-cuda]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-server-intel.Dockerfile platforms:linux/amd64 tag:server-intel]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-server-musa.Dockerfile platforms:linux/amd64 tag:server-musa]) (push) Waiting to run
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/llama-server.Dockerfile platforms:linux/amd64,linux/arm64 tag:server]) (push) Waiting to run
Nix CI / nix-eval (macos-latest) (push) Waiting to run
Nix CI / nix-eval (ubuntu-latest) (push) Waiting to run
Nix CI / nix-build (macos-latest) (push) Waiting to run
Nix CI / nix-build (ubuntu-latest) (push) Waiting to run
flake8 Lint / Lint (push) Waiting to run
This commit is contained in:
parent
55e47786e3
commit
d5ebd79c76
@ -57,8 +57,9 @@ struct socket_t {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// all RPC structures must be packed
|
||||||
|
#pragma pack(push, 1)
|
||||||
// ggml_tensor is serialized into rpc_tensor
|
// ggml_tensor is serialized into rpc_tensor
|
||||||
#pragma pack(1)
|
|
||||||
struct rpc_tensor {
|
struct rpc_tensor {
|
||||||
uint64_t id;
|
uint64_t id;
|
||||||
uint32_t type;
|
uint32_t type;
|
||||||
@ -95,76 +96,64 @@ enum rpc_cmd {
|
|||||||
RPC_CMD_COUNT,
|
RPC_CMD_COUNT,
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
struct rpc_msg_alloc_buffer_req {
|
struct rpc_msg_alloc_buffer_req {
|
||||||
uint64_t size;
|
uint64_t size;
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
struct rpc_msg_alloc_buffer_rsp {
|
struct rpc_msg_alloc_buffer_rsp {
|
||||||
uint64_t remote_ptr;
|
uint64_t remote_ptr;
|
||||||
uint64_t remote_size;
|
uint64_t remote_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
struct rpc_msg_get_alignment_rsp {
|
struct rpc_msg_get_alignment_rsp {
|
||||||
uint64_t alignment;
|
uint64_t alignment;
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
struct rpc_msg_get_max_size_rsp {
|
struct rpc_msg_get_max_size_rsp {
|
||||||
uint64_t max_size;
|
uint64_t max_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
struct rpc_msg_buffer_get_base_req {
|
struct rpc_msg_buffer_get_base_req {
|
||||||
uint64_t remote_ptr;
|
uint64_t remote_ptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
struct rpc_msg_buffer_get_base_rsp {
|
struct rpc_msg_buffer_get_base_rsp {
|
||||||
uint64_t base_ptr;
|
uint64_t base_ptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
struct rpc_msg_free_buffer_req {
|
struct rpc_msg_free_buffer_req {
|
||||||
uint64_t remote_ptr;
|
uint64_t remote_ptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
struct rpc_msg_buffer_clear_req {
|
struct rpc_msg_buffer_clear_req {
|
||||||
uint64_t remote_ptr;
|
uint64_t remote_ptr;
|
||||||
uint8_t value;
|
uint8_t value;
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
struct rpc_msg_get_tensor_req {
|
struct rpc_msg_get_tensor_req {
|
||||||
rpc_tensor tensor;
|
rpc_tensor tensor;
|
||||||
uint64_t offset;
|
uint64_t offset;
|
||||||
uint64_t size;
|
uint64_t size;
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
struct rpc_msg_copy_tensor_req {
|
struct rpc_msg_copy_tensor_req {
|
||||||
rpc_tensor src;
|
rpc_tensor src;
|
||||||
rpc_tensor dst;
|
rpc_tensor dst;
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
struct rpc_msg_copy_tensor_rsp {
|
struct rpc_msg_copy_tensor_rsp {
|
||||||
uint8_t result;
|
uint8_t result;
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
struct rpc_msg_graph_compute_rsp {
|
struct rpc_msg_graph_compute_rsp {
|
||||||
uint8_t result;
|
uint8_t result;
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
struct rpc_msg_get_device_memory_rsp {
|
struct rpc_msg_get_device_memory_rsp {
|
||||||
uint64_t free_mem;
|
uint64_t free_mem;
|
||||||
uint64_t total_mem;
|
uint64_t total_mem;
|
||||||
};
|
};
|
||||||
|
#pragma pack(pop)
|
||||||
|
|
||||||
// RPC data structures
|
// RPC data structures
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user