-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
64 lines (46 loc) · 1.76 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
SHELL=/bin/bash -o pipefail
ONNXRUNTIME_VERSION := 1.15.1-?
TOOLCHAIN_VERSION := 0.10.2-?
LIBHAL_VERSION := 0.11.0-?
.PHONY: toolchain lint test unit_tests notebook_tests examples \
regression-test-all regression-test-resnet50 regression-test-ssd-mobilenet \
regression-test-ssd-resnet34 regression-test-yolov5 doc docker-build docker-push \
regression-test-efficientnet-b0 regression-test-efficientnet-v2-s
toolchain:
apt-get update
apt-get install -y --allow-downgrades libonnxruntime=$(ONNXRUNTIME_VERSION)
apt-get install -y --allow-downgrades furiosa-compiler=$(TOOLCHAIN_VERSION)
apt-get install -y --allow-downgrades furiosa-libhal-warboy=$(LIBHAL_VERSION)
lint:
isort --diff --check .
black --diff --check .
ruff check .
test:
pytest ./tests -s
unit_tests:
pytest ./tests/unit/ -s
notebook_tests:
pytest --nbmake --nbmake-timeout=3600 ./docs
examples:
for f in $$(find docs/examples/ -name *.py | grep -v "serving"); do printf "\n[TEST] $$f ...\n"; python3 $$f || exit 1; done
regression-test-all:
pytest ./tests/bench/
regression-test-resnet50:
pytest ./tests/bench/test_resnet50.py
regression-test-ssd-mobilenet:
pytest ./tests/bench/test_ssd_mobilenet.py
regression-test-ssd-resnet34:
pytest ./tests/bench/test_ssd_resnet34.py
regression-test-yolov5:
pytest -s ./tests/bench/test_yolov5m.py && \
pytest -s ./tests/bench/test_yolov5l.py
regression-test-efficientnet-b0:
pytest -s ./tests/bench/test_efficientnet_b0.py
regression-test-efficientnet-v2-s:
pytest -s ./tests/bench/test_efficientnet_v2_s.py
doc:
mkdocs build
docker-build:
DOCKER_BUILDKIT=1 docker build -t asia-northeast3-docker.pkg.dev/next-gen-infra/furiosa-ai/furiosa-models:base ./docker
docker-push:
docker push asia-northeast3-docker.pkg.dev/next-gen-infra/furiosa-ai/furiosa-models:base