Added support to compile MPI on Darwin
This commit is contained in:
parent
634b09c9a4
commit
6d479decd7
2 changed files with 11 additions and 0 deletions
8
Makefile
8
Makefile
|
@ -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
3
ggml.h
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue