ggml-mpi.h 911 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. struct ggml_context;
  3. struct ggml_tensor;
  4. struct ggml_cgraph;
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. struct ggml_mpi_context;
  9. void ggml_mpi_backend_init(void);
  10. void ggml_mpi_backend_free(void);
  11. struct ggml_mpi_context * ggml_mpi_init(void);
  12. void ggml_mpi_free(struct ggml_mpi_context * ctx);
  13. int ggml_mpi_rank(struct ggml_mpi_context * ctx);
  14. void ggml_mpi_eval_init(
  15. struct ggml_mpi_context * ctx_mpi,
  16. int * n_tokens,
  17. int * n_past,
  18. int * n_threads);
  19. void ggml_mpi_graph_compute_pre(
  20. struct ggml_mpi_context * ctx_mpi,
  21. struct ggml_cgraph * gf,
  22. int n_layers);
  23. void ggml_mpi_graph_compute_post(
  24. struct ggml_mpi_context * ctx_mpi,
  25. struct ggml_cgraph * gf,
  26. int n_layers);
  27. #ifdef __cplusplus
  28. }
  29. #endif