-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (25 loc) · 823 Bytes
/
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
LIBS=lib/github.com/diku-dk/sorts/radix_sort.fut
FUT=futhark
BACKEND=c
BENCHPROG=src/btree-bench.fut
.PHONY: debug build bench test
debug: $(LIBS)
$(FUT) c src/btree.fut
build: $(LIBS)
$(FUT) opencl src/btree.fut
bench: bench-c bench-multicore bench-opencl bench-cuda
# TODO: Make use of `$(BACKEND)` and a default bench-% target
bench-c: $(LIBS)
$(FUT) bench --runs=50 --backend=c $(BENCHPROG)
bench-multicore: $(LIBS)
$(FUT) bench --runs=50 --backend=multicore $(BENCHPROG)
bench-cuda: $(LIBS)
$(FUT) bench --runs=50 --backend=cuda $(BENCHPROG)
bench-opencl: $(LIBS)
$(FUT) bench --runs=50 --backend=opencl $(BENCHPROG)
test: $(LIBS)
$(FUT) test --exclude=slow --concurrency=`nproc` tests/*.fut
test-full: $(LIBS)
$(FUT) test --concurrency=`nproc` tests/*.fut
$(LIBS): futhark.pkg
$(FUT) pkg sync