-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
184 lines (157 loc) · 5.53 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
TOOL_NAME=mi-bench
BIN_PATH=${HOME}/.local/bin
.PHONY: all install uninstall run run-test clean
all: build/${TOOL_NAME} build/toml-to-json
build/${TOOL_NAME}: $(shell find tool -name "*.mc")
mi compile tool/main/${TOOL_NAME}.mc
mkdir -p build
cp ${TOOL_NAME} build/${TOOL_NAME}
rm ${TOOL_NAME}
build/toml-to-json: toml-to-json/*
$(CXX) -std=c++17 -o build/toml-to-json toml-to-json/prog.cpp
install: build/${TOOL_NAME}
cp build/${TOOL_NAME} ${BIN_PATH}
uninstall:
rm -f ${BIN_PATH}/${TOOL_NAME}
clean:
rm -rf build
rm -f output.toml
run: build/${TOOL_NAME}
build/${TOOL_NAME} \
--benchmarks benchmark-suite/benchmarks/mcore-ocaml \
--runtimes benchmark-suite/runtimes \
--iters 5 \
--format toml \
--log info \
--warmups 1 > results.toml
run-ppl: build/${TOOL_NAME}
build/${TOOL_NAME} \
--benchmarks benchmark-suite/benchmarks/ppl \
--runtimes benchmark-suite/runtimes \
--iters 2 \
--format toml \
--warmups 1
run-test: build/${TOOL_NAME}
build/${TOOL_NAME} \
--benchmarks benchmark-suite/test/benchmarks \
--runtimes benchmark-suite/runtimes \
--runtimes benchmark-suite/test/runtimes \
--iters 5 \
--format toml \
--log info \
--timeout-sec 1 \
--warmups 1
test:
mkdir -p build
mi compile --test tool/tool/config-scanner.mc --output build/test; build/test
mi compile --test tool/tool/runner.mc --output build/test; build/test
mi compile --test tool/tool/utils.mc --output build/test; build/test
mi compile --test tool/tool/path.mc --output build/test; build/test
mi compile --test tool/tool/types.mc --output build/test; build/test
#################################################
## PPL experiments. Temporarily specified here ##
#################################################
number_iterations=15
number_warmups=1
prefix=A
experiment_example=example
run-experiment-example: build/${TOOL_NAME}
find . -name $(experiment_example).toml.skip -execdir cp '{}' $(experiment_example).toml ';'
build/${TOOL_NAME} \
--benchmarks benchmark-suite/benchmarks/ppl/phyl \
--runtimes benchmark-suite/runtimes \
--iters 1 \
--format toml \
--log info \
--warmups 0
cp output.toml output-example.toml
find . -name $(experiment_example).toml -delete
experiment_crbd=experiment-CRBD
run-experiment-CRBD: build/${TOOL_NAME}
find . -name $(experiment_crbd).toml.skip -execdir cp '{}' $(experiment_crbd).toml ';'
build/${TOOL_NAME} \
--benchmarks benchmark-suite/benchmarks/ppl/phyl \
--runtimes benchmark-suite/runtimes \
--iters $(number_iterations) \
--format toml \
--log info \
--warmups $(number_warmups)
cp output.toml output-$(prefix)-$(number_iterations)-$(experiment_crbd).toml
find . -name $(experiment_crbd).toml -delete
experiment_optimized_crbd=experiment-OptimizedCRBD
run-experiment-OptimizedCRBD: build/${TOOL_NAME}
find . -name $(experiment_optimized_crbd).toml.skip -execdir cp '{}' $(experiment_optimized_crbd).toml ';'
build/${TOOL_NAME} \
--benchmarks benchmark-suite/benchmarks/ppl/phyl \
--runtimes benchmark-suite/runtimes \
--iters $(number_iterations) \
--format toml \
--log info \
--warmups $(number_warmups)
cp output.toml output-$(prefix)-$(number_iterations)-experiment-OptimizedCRBD.toml
find . -name $(experiment_optimized_crbd).toml -delete
run-experiment-ClaDS: build/${TOOL_NAME}
cp benchmark-suite/benchmarks/ppl/rootppl/experiment-ClaDS.toml.skip benchmark-suite/benchmarks/ppl/rootppl/experiment-ClaDS.toml
build/${TOOL_NAME} \
--benchmarks benchmark-suite/benchmarks/ppl/phyl \
--runtimes benchmark-suite/runtimes \
--iters $(number_iterations) \
--format toml \
--log info \
--warmups $(number_warmups)
cp output.toml output-$(prefix)-$(number_iterations)-experiment-ClaDS.toml
rm benchmark-suite/benchmarks/ppl/rootppl/experiment-ClaDS.toml
experiment_VBD=experiment-VBD
run-experiment-VBD: build/${TOOL_NAME}
find . -name $(experiment_VBD).toml.skip -execdir cp '{}' $(experiment_VBD).toml ';'
build/${TOOL_NAME} \
--benchmarks benchmark-suite/benchmarks/ppl/vbd \
--runtimes benchmark-suite/runtimes \
--iters $(number_iterations) \
--format toml \
--log info \
--warmups $(number_warmups)
cp output.toml output-$(prefix)-$(number_iterations)-experiment-VBD.toml
find . -name $(experiment_VBD).toml -delete
experiment_align=experiment-align
run-experiment-align: build/${TOOL_NAME} build/toml-to-json
./run \
--iters $(number_iterations) \
--warmups $(number_warmups) \
--name experiment-smc.toml
mv output.toml $(experiment_align)-output.toml
mv output.json $(experiment_align)-output.json
#################################################
## DAE experiments. Temporarily specified here ##
#################################################
number_iterations=10
number_warmups=3
prefix=D
run-dae: run-dae-sim run-dae-sim-sim run-dae-size
run-dae-sim: build/${TOOL_NAME}
build/${TOOL_NAME} \
--benchmarks benchmark-suite/benchmarks/dae/sim \
--runtimes benchmark-suite/runtimes \
--iters $(number_iterations) \
--format toml \
--log info \
--warmups $(number_warmups) \
--output ${prefix}-output-dae-sim.toml
run-dae-sim-sim: build/${TOOL_NAME}
build/${TOOL_NAME} \
--benchmarks benchmark-suite/benchmarks/dae/sim-sim \
--runtimes benchmark-suite/runtimes \
--iters $(number_iterations) \
--format toml \
--log info \
--warmups $(number_warmups) \
--output ${prefix}-output-dae-sim-sim.toml
run-dae-size: build/${TOOL_NAME}
build/${TOOL_NAME} \
--benchmarks benchmark-suite/benchmarks/dae/size \
--runtimes benchmark-suite/runtimes \
--iters 1 \
--format toml \
--log info \
--warmups 0 \
--output ${prefix}-output-dae-size.toml