Skip to content

MPI for Darwin - #752

Closed
chadbrewbaker wants to merge 2 commits into
ggml-org:masterfrom
chadbrewbaker:mpi
Closed

MPI for Darwin#752
chadbrewbaker wants to merge 2 commits into
ggml-org:masterfrom
chadbrewbaker:mpi

Conversation

@chadbrewbaker

Copy link
Copy Markdown
Contributor

Added minimal support to compile MPI on Darwin.

TODO

  • Investigate tensor operations that benefit from cache locality of MPI parallelism.
  • Investigate MPI_Scan for token evaluation.
  • Investigate MPI_IO for faster model loading.
  • Investigate MPI playing nice with Apple Neural Engine, Metal Shaders, and possible abuse of video codec hardware

@chadbrewbaker

Copy link
Copy Markdown
Contributor Author

@steveklabnik I'm actually writing this with an @oxidecomputer rack in mind similar to a Blue Gene/L. What MPI upstream distro should I use for Linux?

@prusnak

prusnak commented Apr 4, 2023

Copy link
Copy Markdown
Contributor

I think it has been said by @ggerganov somewhere that he doesn't want to introduce MPI or other more complex dependencies into the project. I'm not able to find the reference though at the moment.

@gjmulder gjmulder added enhancement New feature or request build Compilation issues labels Apr 4, 2023
@chadbrewbaker

Copy link
Copy Markdown
Contributor Author

I think it has been said by @ggerganov somewhere that he doesn't want to introduce MPI or other more complex dependencies into the project. I'm not able to find the reference though at the moment.

I threw it under a LLAMA_MPI_DARWIN #ifdef to keep it out of the way. Zero cost abstraction unless you need to scale.

@ggerganov

Copy link
Copy Markdown
Member

I'm not familiar with MPI, but feel free to investigate and add support for it.
It will almost certainly not be part of ggml, but it can be a llama.cpp example demonstrating the integration with this MPI platform / framework

@evanmiller

Copy link
Copy Markdown
Contributor

Checkout #2099 for a working MPI proof of concept

@chadbrewbaker

Copy link
Copy Markdown
Contributor Author

Checkout #2099 for a working MPI proof of concept

Will do! Three areas for parallelism. MPI IO, distributed memory on single passes, and I think there is a parallel prefix formulation.

Good talk at Stanford’s ML seminar a few months ago on compressed representations over the wire when doing distributed memory for training. Assuming inference will also allow on the fly compressed representations but I need to think about it more.

@ggerganov

Copy link
Copy Markdown
Member

Superseded by #2099

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Compilation issues enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants