forked from openvinotoolkit/nncf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
130 lines (108 loc) · 4.12 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
PYLINT_VERSION := 2.13.9
JUNITXML_PATH ?= nncf-tests.xml
ifdef DATA
DATA_ARG := --data $(DATA)
endif
###############################################################################
# ONNX backend
install-onnx-test:
pip install -U pip
pip install -e .[onnx]
pip install -r tests/onnx/requirements.txt
pip install -r tests/cross_fw/install/requirements.txt
pip install -r tests/onnx/benchmarking/requirements.txt
pip install -r examples/post_training_quantization/onnx/mobilenet_v2/requirements.txt
install-onnx-dev: install-onnx-test
pip install pylint==$(PYLINT_VERSION)
test-onnx:
pytest tests/onnx $(DATA_ARG) --junitxml ${JUNITXML_PATH}
ONNX_PYFILES := $(shell find examples/post_training_quantization/onnx -type f -name "*.py")
pylint-onnx:
pylint --rcfile .pylintrc \
nncf/onnx \
nncf/quantization \
tests/onnx \
$(ONNX_PYFILES)
test-install-onnx:
pytest tests/cross_fw/install/ -s \
--backend onnx \
--junitxml ${JUNITXML_PATH}
###############################################################################
# OpenVino backend
install-openvino-test:
pip install -U pip
pip install -e .[openvino]
pip install -r tests/openvino/requirements.txt
pip install -r tests/cross_fw/install/requirements.txt
pip install -r examples/experimental/openvino/bert/requirements.txt
pip install -r examples/experimental/openvino/yolo_v5/requirements.txt
pip install git+https://github.com/openvinotoolkit/open_model_zoo.git@dcbf53280a95dae3c6538689bafe760470f08ec2#subdirectory=tools/model_tools
install-openvino-dev: install-openvino-test
pip install pylint==$(PYLINT_VERSION)
test-openvino:
pytest tests/openvino $(DATA_ARG) --junitxml ${JUNITXML_PATH}
pylint-openvino:
pylint --rcfile .pylintrc \
nncf/openvino/ \
nncf/experimental/openvino/ \
tests/openvino/ \
examples/experimental/openvino/
test-install-openvino:
pytest tests/cross_fw/install -s \
--backend openvino \
--junitxml ${JUNITXML_PATH}
###############################################################################
# TensorFlow backend
install-tensorflow-test:
pip install -U pip
pip install -e .[tf]
pip install -r tests/tensorflow/requirements.txt
pip install -r tests/cross_fw/install/requirements.txt
pip install -r examples/tensorflow/requirements.txt
install-tensorflow-dev: install-tensorflow-test
pip install pylint==$(PYLINT_VERSION)
test-tensorflow:
pytest tests/common tests/tensorflow \
--junitxml ${JUNITXML_PATH} \
$(DATA_ARG)
pylint-tensorflow:
pylint --rcfile .pylintrc \
nncf/tensorflow \
nncf/experimental/tensorflow \
tests/tensorflow \
tests/experimental/tensorflow \
examples/tensorflow
test-install-tensorflow:
pytest tests/cross_fw/install/ -s --backend tf --junitxml ${JUNITXML_PATH}
###############################################################################
# PyTorch backend
install-torch-test:
pip install -U pip
pip install -e .[torch]
pip install -r tests/torch/requirements.txt
pip install -r tests/cross_fw/install/requirements.txt
pip install -r examples/torch/requirements.txt
install-torch-dev: install-torch-test
pip install pylint==$(PYLINT_VERSION)
test-torch:
pytest tests/common tests/torch --junitxml ${JUNITXML_PATH} $(DATA_ARG)
pylint-torch:
pylint --rcfile .pylintrc \
nncf/common \
nncf/config \
nncf/api \
nncf/torch \
nncf/experimental/torch \
tests/common \
tests/torch \
examples/torch \
examples/experimental/torch
test-install-torch-cpu:
pytest tests/cross_fw/install/ -s \
--backend torch \
--host-configuration cpu \
--junitxml ${JUNITXML_PATH}
test-install-torch-gpu:
pytest tests/cross_fw/install -s \
--backend torch \
--junitxml ${JUNITXML_PATH}