aboutsummaryrefslogtreecommitdiff
path: root/ggml-mpi.h
diff options
context:
space:
mode:
authorSIGSEGV <21287366+akr2002@users.noreply.github.com>2023-07-11 00:36:02 +0530
committerGitHub <noreply@github.com>2023-07-11 00:36:02 +0530
commitc1f29d1bb1d9f3084c9dc177fe9bf9269b9e35af (patch)
tree2caac8240545f2639f3efa3a4d13c24dfd5b92f6 /ggml-mpi.h
parent26a3a9952636e8e5332e1cdc4f552d32e61b12ce (diff)
parent5656d10599bd756dc0f17284e418e704200b43f3 (diff)
Merge branch 'ggerganov:master' into master
Diffstat (limited to 'ggml-mpi.h')
-rw-r--r--ggml-mpi.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/ggml-mpi.h b/ggml-mpi.h
new file mode 100644
index 0000000..eda119d
--- /dev/null
+++ b/ggml-mpi.h
@@ -0,0 +1,39 @@
+#pragma once
+
+struct ggml_context;
+struct ggml_tensor;
+struct ggml_cgraph;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+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);
+
+void ggml_mpi_eval_init(
+ struct ggml_mpi_context * ctx_mpi,
+ int * n_tokens,
+ int * n_past,
+ int * n_threads);
+
+void ggml_mpi_graph_compute_pre(
+ struct ggml_mpi_context * ctx_mpi,
+ struct ggml_cgraph * gf,
+ int n_layers);
+
+void ggml_mpi_graph_compute_post(
+ struct ggml_mpi_context * ctx_mpi,
+ struct ggml_cgraph * gf,
+ int n_layers);
+
+#ifdef __cplusplus
+}
+#endif