Added support to compile MPI on Darwin

This commit is contained in:
Chad Brewbaker 2023-04-03 17:21:51 -05:00
parent 634b09c9a4
commit 6d479decd7
2 changed files with 11 additions and 0 deletions

View file

@ -100,6 +100,14 @@ ifdef LLAMA_GPROF
CFLAGS += -pg
CXXFLAGS += -pg
endif
ifdef LLAMA_MPI_DARWIN
CFLAGS += -I/opt/homebrew/include
CXXFLAGS += -I/opt/homebrew/include
CC = mpicc
CXX = mpic++
endif
ifneq ($(filter aarch64%,$(UNAME_M)),)
CFLAGS += -mcpu=native
CXXFLAGS += -mcpu=native

3
ggml.h
View file

@ -176,7 +176,10 @@ extern "C" {
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#ifdef LLAMA_MPI_DARWIN
#include <mpi.h>
#endif
#define GGML_MAX_DIMS 4
#define GGML_MAX_NODES 4096