-
Notifications
You must be signed in to change notification settings - Fork 2
/
makefile
147 lines (101 loc) · 3.88 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
##===----------------------------------------------------------------------===##
##
## KernelGen -- A prototype of LLVM-based auto-parallelizing Fortran/C
## compiler for NVIDIA GPUs, targeting numerical modeling code.
##
## This file is distributed under the University of Illinois Open Source
## License. See LICENSE.TXT for details.
##
##===----------------------------------------------------------------------===##
-include makefile.in
TARGETS = \
divergence \
gaussblur \
laplacian \
matvec \
tricubic \
uxx1 \
wave13pt \
gameoflife \
gradient \
lapgsrb \
tricubic2 \
vecadd \
whispering
TARGETS_GCC = $(addsuffix .gcc, $(TARGETS))
TARGETS_GCC_CLEAN = $(addsuffix .gcc.clean, $(TARGETS))
TARGETS_KERNELGEN = $(addsuffix .kernelgen, $(TARGETS))
TARGETS_KERNELGEN_CLEAN = $(addsuffix .kernelgen.clean, $(TARGETS))
TARGETS_MIC = $(addsuffix .mic, $(TARGETS))
TARGETS_MIC_CLEAN = $(addsuffix .mic.clean, $(TARGETS))
TARGETS_PATHSCALE = $(addsuffix .pathscale, $(TARGETS))
TARGETS_PATHSCALE_CLEAN = $(addsuffix .pathscale.clean, $(TARGETS))
TARGETS_PGI = $(addsuffix .pgi, $(TARGETS))
TARGETS_PGI_CLEAN = $(addsuffix .pgi.clean, $(TARGETS))
TARGETS_CAPS = $(addsuffix .caps, $(TARGETS))
TARGETS_CAPS_CLEAN = $(addsuffix .caps.clean, $(TARGETS))
TARGETS_CUDA = $(addsuffix .cuda, $(TARGETS))
TARGETS_CUDA_CLEAN = $(addsuffix .cuda.clean, $(TARGETS))
TARGETS_PATUS = $(addsuffix .patus, $(TARGETS))
TARGETS_PATUS_CLEAN = $(addsuffix .patus.clean, $(TARGETS))
.PHONY: all benchmark
all: gcc kernelgen mic pathscale pgi caps cuda
gcc: $(TARGETS_GCC)
kernelgen: $(TARGETS_KERNELGEN)
mic: $(TARGETS_MIC)
pathscale: $(TARGETS_PATHSCALE)
pgi: $(TARGETS_PGI)
caps: $(TARGETS_CAPS)
cuda: $(TARGETS_CUDA)
patus: $(TARGETS_PATUS)
clean: $(TARGETS_GCC_CLEAN) $(TARGETS_KERNELGEN_CLEAN) $(TARGETS_MIC_CLEAN) $(TARGETS_PATHSCALE_CLEAN) $(TARGETS_PGI_CLEAN) $(TARGETS_CAPS_CLEAN) $(TARGETS_CUDA_CLEAN) $(TARGETS_PATUS_CLEAN)
%.gcc:
$(SILENT)cd $(subst .gcc,,$@)/gcc && $(MAKE)
%.gcc.clean:
$(SILENT)cd $(subst .gcc.clean,,$@)/gcc && $(MAKE) clean
%.kernelgen:
$(SILENT)cd $(subst .kernelgen,,$@)/kernelgen && $(MAKE)
%.kernelgen.clean:
$(SILENT)cd $(subst .kernelgen.clean,,$@)/kernelgen && $(MAKE) clean
%.mic:
$(SILENT)cd $(subst .mic,,$@)/mic && $(MAKE)
%.mic.clean:
$(SILENT)cd $(subst .mic.clean,,$@)/mic && $(MAKE) clean
%.pathscale:
$(SILENT)cd $(subst .pathscale,,$@)/pathscale && $(MAKE)
%.pathscale.clean:
$(SILENT)cd $(subst .pathscale.clean,,$@)/pathscale && $(MAKE) clean
%.pgi:
$(SILENT)cd $(subst .pgi,,$@)/pgi && $(MAKE)
%.pgi.clean:
$(SILENT)cd $(subst .pgi.clean,,$@)/pgi && $(MAKE) clean
%.caps:
$(SILENT)cd $(subst .caps,,$@)/caps && $(MAKE)
%.caps.clean:
$(SILENT)cd $(subst .caps.clean,,$@)/caps && $(MAKE) clean
%.cuda:
$(SILENT)cd $(subst .cuda,,$@)/cuda && $(MAKE)
%.cuda.clean:
$(SILENT)cd $(subst .cuda.clean,,$@)/cuda && $(MAKE) clean
%.patus:
$(SILENT)cd $(subst .patus,,$@)/patus && $(MAKE)
%.patus.clean:
$(SILENT)cd $(subst .patus.clean,,$@)/patus && $(MAKE) clean
test.gcc: $(TARGETS_GCC)
$(SILENT)./benchmark $(NX) $(NY) $(NS) $(NT) $(NRUNS) gcc
test.kernelgen: $(TARGETS_KERNELGEN)
$(SILENT)kernelgen_runmode=1 kernelgen_szheap=$$((1024*1024*800)) kernelgen_verbose=$$((1<<6)) ./benchmark $(NX) $(NY) $(NS) $(NT) $(NRUNS) kernelgen
test.mic: $(TARGETS_MIC)
$(SILENT)./benchmark $(NX) $(NY) $(NS) $(NT) $(NRUNS) mic
test.pathscale: $(TARGETS_PATHSCALE)
$(SILENT)./benchmark $(NX) $(NY) $(NS) $(NT) $(NRUNS) pathscale
test.pgi: $(TARGETS_PGI)
$(SILENT)./benchmark $(NX) $(NY) $(NS) $(NT) $(NRUNS) pgi
test.caps: $(TARGETS_CAPS)
$(SILENT)./benchmark $(NX) $(NY) $(NS) $(NT) $(NRUNS) caps
test.cuda: $(TARGETS_CUDA)
$(SILENT)./benchmark $(NX) $(NY) $(NS) $(NT) $(NRUNS) cuda
test.patus: $(TARGETS_PATUS)
$(SILENT)./benchmark $(NX) $(NY) $(NS) $(NT) $(NRUNS) patus
benchmark:
$(SILENT)./benchmark $(NX) $(NY) $(NS) $(NT) $(NRUNS) $(TARGETS)