-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (32 loc) · 1.1 KB
/
Makefile
File metadata and controls
44 lines (32 loc) · 1.1 KB
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
35
36
37
38
39
40
41
42
43
44
CC=nvcc
DEBUG=0
ifneq ($(DEBUG), 0)
CFLAGS=-O0 -g -G -DDEBUG=0
else
CFLAGS=-O3 -g -lineinfo
endif
CUDA_PATH := /usr/local/cuda-10.2
CUDA_INCLUDE = $(CUDA_PATH)/include
CUDA_LIBS = $(CUDA_PATH)/lib64
CUDA_BIN = $(CUDA_PATH)/bin
NVCC = $(CUDA_BIN)/nvcc
CFLAGS+=-Xcompiler=-Wall -maxrregcount=32 -arch=sm_75
CFLAGS+=`pkg-config libibverbs --cflags --libs`
CFLAGS+=-I$(CUDA_INCLUDE) -L$(CUDA_LIBS)
# Use to find out shared memory size
# CFLAGS+=--ptxas-options=-v
FILES=naiveGpipeMain threeElementGpipeMain gpipeMain
all: $(FILES)
naiveGpipeMain: naiveGpipeMain.o
$(NVCC) --link $(CFLAGS) $^ -o $@
threeElementGpipeMain: threeElementGpipeMain.o
$(NVCC) --link $(CFLAGS) $^ -o $@
gpipeMain: gpipeMain.o
$(NVCC) --link $(CFLAGS) $^ -o $@ -lcuda
naiveGpipeMain.o: naiveGpipeMain.cu naiveGpipe.cu testCommon.cu common.cuh timer.h
threeElementGpipeMain.o: threeElementGpipeMain.cu threeElementGpipe.cu testCommon.cu timer.h
gpipeMain.o: gpipeMain.cu gpipe.cu memoryManagmentHelper.cuh connectionHelper.cuh gpipe.cuh testCommon.cu timer.h common.cuh
%.o: %.cu
nvcc --compile $< $(CFLAGS) -o $@
clean::
rm -f *.o $(FILES)