Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPI for Darwin #752

Closed
wants to merge 2 commits into from
Closed

MPI for Darwin #752

wants to merge 2 commits into from

Conversation

chadbrewbaker
Copy link
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
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
Copy link
Sponsor Collaborator

prusnak commented Apr 4, 2023

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
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
Owner

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
Collaborator

Checkout #2099 for a working MPI proof of concept

@chadbrewbaker
Copy link
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
Owner

Superseded by #2099

@ggerganov ggerganov closed this Aug 6, 2023
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