-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (45 loc) · 1.75 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
ifeq ($(GPU), MI100)
FUTHARK_BACKEND=opencl
else
FUTHARK_BACKEND=cuda
endif
figure_6:
nix-shell --pure --run ./setup-adbench.sh
nix-shell --pure --run ./run-adbench.sh
python3 scripts/figure_6.py
figure_7: tmp/xsbench-original.txt tmp/rsbench-original.txt tmp/lbm-original.txt tmp/xsbench-futhark.json tmp/rsbench-futhark.json tmp/lbm-futhark.json
python3 scripts/figure_7.py
figure_8:
cd benchmarks/kmeans/standard && make results && make table
figure_9:
cd benchmarks/kmeans/sparse && make results && make table
figure_11:
cd benchmarks/gmm && make results && make table
figure_12_13:
cd benchmarks/lstm && make results && make table
tmp/xsbench-original.txt:
mkdir -p tmp
make -C originals/xsbench
(cd originals/xsbench && \
for i in $$(seq 10); do ./XSBench -s small -m event | grep Runtime | tail -n 1; done) \
| awk '{print $$2}' | tee $@ || rm -f $@
tmp/rsbench-original.txt:
mkdir -p tmp
make -C originals/rsbench
(cd originals/rsbench && \
for i in $$(seq 10); do ./rsbench -s small -m event | grep Runtime | tail -n 1; done) \
| awk '{print $$2}' | tee $@ || rm -f $@
tmp/lbm-original.txt:
mkdir -p tmp
(for i in $$(seq 10); do make -C originals/lbm run; done) \
| awk '/Kernel/ {print $$3}' | tee $@ || rm -f $@
tmp/xsbench-futhark.json:
bin/futhark bench --backend $(FUTHARK_BACKEND) benchmarks/xsbench/xsbench.fut --json $@
tmp/rsbench-futhark.json:
bin/futhark bench --backend $(FUTHARK_BACKEND) benchmarks/rsbench/rsbench.fut --json $@
tmp/lbm-futhark.json:
bin/futhark bench --backend $(FUTHARK_BACKEND) benchmarks/lbm/lbm.fut --json $@
bin/futhark:
cd futhark && nix-build --argstr suffix ad
mkdir -p bin
tar --extract -C bin/ --strip-components 2 -f futhark/result/futhark-ad.tar.xz futhark-ad/bin/futhark