2023-07-07 02:18:41 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
struct ggml_context;
|
|
|
|
struct ggml_tensor;
|
2023-07-09 13:42:36 +02:00
|
|
|
struct ggml_cgraph;
|
2023-07-07 02:18:41 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2023-07-09 13:08:53 +02:00
|
|
|
struct ggml_mpi_context;
|
|
|
|
|
|
|
|
void ggml_mpi_backend_init(void);
|
|
|
|
void ggml_mpi_backend_free(void);
|
|
|
|
|
|
|
|
struct ggml_mpi_context * ggml_mpi_init(void);
|
|
|
|
void ggml_mpi_free(struct ggml_mpi_context * ctx);
|
|
|
|
|
|
|
|
int ggml_mpi_rank(struct ggml_mpi_context * ctx);
|
|
|
|
|
2023-07-09 15:04:27 +02:00
|
|
|
void ggml_mpi_eval_init(
|
2023-07-09 13:08:53 +02:00
|
|
|
struct ggml_mpi_context * ctx_mpi,
|
|
|
|
int * n_tokens,
|
|
|
|
int * n_past,
|
|
|
|
int * n_threads);
|
2023-07-07 02:18:41 +02:00
|
|
|
|
2023-07-09 13:42:36 +02:00
|
|
|
void ggml_mpi_graph_compute(
|
|
|
|
struct ggml_mpi_context * ctx_mpi,
|
2023-07-09 15:04:27 +02:00
|
|
|
struct ggml_context * ctx,
|
2023-07-09 13:42:36 +02:00
|
|
|
struct ggml_cgraph * gf,
|
2023-07-09 21:23:04 +02:00
|
|
|
int n_layers,
|
|
|
|
int n_threads);
|
2023-07-09 13:42:36 +02:00
|
|
|
|
2023-07-07 02:18:41 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|