-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
72 lines (53 loc) · 1.4 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
all: build
GO=go
TESTPACKAGES=ad model infer mathx dist cmd/deriv
PACKAGES=$(TESTPACKAGES) dist/ad
EXAMPLES=hello gmm adapt schools ppv
examples: build $(EXAMPLES)
test: dist/ad/dist.go
for package in $(TESTPACKAGES); do $(GO) test ./$$package; done
dist/ad/dist.go: dist/dist.go
$(GO) build ./cmd/deriv
./deriv dist
build: test
for package in $(PACKAGES); do $(GO) build ./$$package; done
benchmark: test
for package in $(TESTPACKAGES); do $(GO) test -bench . ./$$package; done
GOFILES=ad/ad.go ad/elementals.go ad/tape.go \
model/model.go \
infer/infer.go
install: all test
for package in $(PACKAGES); do $(GO) install ./$$package; done
push:
for repo in origin ssh://[email protected]/infergo-ml/infergo; do git push $$repo; git push --tags $$repo; done
clean-examples:
for x in $(EXAMPLES); do (cd examples/$$x && make clean); done
clean: clean-examples
rm -rf deriv
# Examples
#
# Probabilistic Hello Wolrd: Inferring parameters of normal
# distribution
.PHONY: hello
hello:
(cd examples/hello && make GO=$(GO))
# Gaussian mixture model
.PHONY: gmm
gmm:
(cd examples/gmm && make GO=$(GO))
# NUTS Step adaptation
.PHONY: adapt
adapt:
(cd examples/adapt && make GO=$(GO))
# 8 schools
.PHONY: schools
schools:
(cd examples/schools && make GO=$(GO))
# pages per visit
.PHONY: ppv
ppv:
(cd examples/ppv && make GO=$(GO))
# multi-threaded hello world
.PHONY: mt
mt:
(cd examples/mt && make GO=$(GO))