-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (49 loc) · 1.87 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
CC = clang
CFLAGS = \
-O3 \
-std=c99 \
-Wall -Werror -Wpedantic -Weverything -Wextra \
-Wno-missing-prototypes -Wno-conditional-uninitialized -Wno-conversion \
-Wno-sign-conversion -Wno-padded -Wno-cast-align -Wno-switch-enum \
-Wno-double-promotion -Wno-covered-switch-default -Wno-unused-macros \
-Wno-unused-parameter
FP_CC = `find src/fp/zeronn/ -type f -name "*.c"`
FX_CC = `find src/fx/zeronn/ -type f -name "*.c"`
BIGFX_CC = `find src/bigfx/zeronn/ -type f -name "*.c"`
all: fp fx bigfx
fp:
mkdir -p bin/fp/
$(CC) src/fp/cifar10.c $(FP_CC) -Isrc/fp/ -lm -o bin/fp/cifar10 $(CFLAGS)
$(CC) src/fp/fit.c $(FP_CC) -Isrc/fp/ -lm -o bin/fp/fit $(CFLAGS)
fx:
mkdir -p bin/fx/
$(CC) src/fx/cifar10.c $(FX_CC) -Isrc/fx/ -lm -o bin/fx/cifar10 $(CFLAGS)
$(CC) src/fx/fit.c $(FX_CC) -lm -Isrc/fx/ -o bin/fx/fit $(CFLAGS)
$(CC) src/fx/gen_prng.c $(FX_CC) -lm -Isrc/fx/ -o bin/fx/gen_prng $(CFLAGS)
bigfx:
mkdir -p bin/bigfx/
$(CC) src/bigfx/cifar10.c $(BIGFX_CC) -Isrc/bigfx/ -lm -o bin/bigfx/cifar10 $(CFLAGS)
$(CC) src/bigfx/fit.c $(BIGFX_CC) -lm -Isrc/bigfx/ -o bin/bigfx/fit $(CFLAGS)
$(CC) src/bigfx/gen_bigfx.c $(BIGFX_CC) -lm -Isrc/bigfx/ -o bin/bigfx/gen_bigfx $(CFLAGS)
$(CC) src/bigfx/gen_prng.c $(BIGFX_CC) -lm -Isrc/bigfx/ -o bin/bigfx/gen_prng $(CFLAGS)
$(CC) src/bigfx/gen_uniform.c $(BIGFX_CC) -lm -Isrc/bigfx/ -o bin/bigfx/gen_uniform $(CFLAGS)
$(CC) src/bigfx/test_bigint.c $(BIGFX_CC) -lm -Isrc/bigfx/ -o bin/bigfx/test_bigint $(CFLAGS)
$(CC) src/bigfx/test_biguint.c $(BIGFX_CC) -lm -Isrc/bigfx/ -o bin/bigfx/test_biguint $(CFLAGS)
test_bigfx:
mkdir -p data/bigfx_plot/
./bin/bigfx/gen_bigfx > data/bigfx.txt
python3 src/bigfx/plot_bigfx.py data/bigfx.txt data/bigfx_plot/
fit:
python3 -m zeronn.orig.fit
@echo
python3 -m zeronn.auto.fit
@echo
python3 -m zeronn.fp.fit
@echo
python3 -m zeronn.fx.fit
@echo
./bin/fp/fit
@echo
./bin/fx/fit
@echo
./bin/bigfx/fit