-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
34 lines (22 loc) · 1 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
NVCC = nvcc
BUILDDIR = /mnt/llm/workspace/yuyue2/my/build
MPIINCDIR = /mnt/llm/workspace/yuyue2/.local/mpicc/include/
MPILNKDIR = /mnt/llm/workspace/yuyue2/.local/mpicc/lib/
# A100
NCCL80INCDIR = /mnt/llm/workspace/yuyue2/.local/nccl_80/include/
NCCL80LNKDIR = /mnt/llm/workspace/yuyue2/.local/nccl_80/lib/
# RTX 4090
NCCL89INCDIR = /mnt/llm/workspace/yuyue2/.local/nccl_89/include/
NCCL89LNKDIR = /mnt/llm/workspace/yuyue2/.local/nccl_89/lib/
FLAGS = -std=c++17 -O3 --generate-line-info
LDFLAGS = -lnccl -lmpi -lpthread
all: a100 4090
a100: ${BUILDDIR}/real-343/allreduce
${BUILDDIR}/real-343/allreduce: allreduce.cu
${NVCC} -I${MPIINCDIR} -L${MPILNKDIR} -I${NCCL80DIR} -L${NCCL80LNKDIR} ${FLAGS} ${LDFLAGS} -gencode=arch=compute_80,code=sm_80 -o $@ $<
4090: ${BUILDDIR}/gpu/allreduce
${BUILDDIR}/gpu/allreduce: allreduce.cu
${NVCC} -I${MPIINCDIR} -L${MPILNKDIR} -I${NCCL89DIR} -L${NCCL89LNKDIR} ${FLAGS} ${LDFLAGS} -gencode=arch=compute_89,code=sm_89 -o $@ $<
.PHONY: clean
clean:
rm ${BUILDDIR}/*/allreduce