-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
26 lines (20 loc) · 870 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
test:
env TF_CPP_MIN_LOG_LEVEL=3 CUDA_VISIBLE_DEVICES=-1 pytest --durations=10
mnist:
env TF_CPP_MIN_LOG_LEVEL=3 CUDA_VISIBLE_DEVICES=-1 pytest -k mnist
lint:
flake8 . --count --statistics
format:
isort . --skip=data && \
black --verbose . --exclude=data
precommit: lint format test
debug:
python -m onnx2code model.onnx output --variations=loop-tiling --checks=1 ; \
nasm -f elf64 output/model.asm -o output/model-asm.o -g && \
g++ output/model.cpp output/debugger.cpp output/model-asm.o -o output/main -g && \
gdb output/main output/model-asm.o -ex "b unit_update" -ex "r"
profile:
python -m onnx2code data/model.onnx output --variations=loop-tiling --checks=1; \
nasm -f elf64 output/model.asm -o output/model-asm.o -g && \
g++ -Ioutput/ output/model.cpp onnx2code/debugger.c output/model-asm.o -o output/main \
-g -O3 -march=native -mtune=native