Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
110 lines (78 loc) · 3.54 KB
/
Copy pathMakefile
File metadata and controls
110 lines (78 loc) · 3.54 KB
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
ARGS ?=
ifdef NUM_WORKERS
NUM_WORKERS_ARG := -n${NUM_WORKERS}
endif
GENERAL_PYTEST_ARGS := $(NUM_WORKERS_ARG) -ra --durations=30
CMD_INSTALL := uv pip install
CMD_PYTEST := python -m pytest
###############################################################################
# Common part
###############################################################################
install-common:
$(CMD_INSTALL) -e . -r tests/common/requirements.txt
test-common:
$(CMD_PYTEST) tests/common $(GENERAL_PYTEST_ARGS) $(ARGS)
###############################################################################
# OpenVINO
###############################################################################
install-openvino:
$(CMD_INSTALL) -e . -r tests/openvino/requirements.txt
test-openvino:
ONEDNN_MAX_CPU_ISA=AVX2 OV_CPU_MAX_ISA=AVX2 $(CMD_PYTEST) tests/openvino $(GENERAL_PYTEST_ARGS) $(ARGS)
###############################################################################
# PyTorch
###############################################################################
install-torch:
$(CMD_INSTALL) -e . -r tests/torch/requirements.txt
test-torch:
$(CMD_PYTEST) tests/torch $(GENERAL_PYTEST_ARGS) $(ARGS)
test-torch-cpu:
$(CMD_PYTEST) tests/torch -m "not cuda and not long" $(GENERAL_PYTEST_ARGS) $(ARGS)
test-torch-gpu:
$(CMD_PYTEST) tests/torch -m "cuda and not long" $(GENERAL_PYTEST_ARGS) $(ARGS)
test-torch-long:
$(CMD_PYTEST) tests/torch -m "long" $(GENERAL_PYTEST_ARGS) $(ARGS)
###############################################################################
# ONNX
###############################################################################
install-onnx:
$(CMD_INSTALL) -e . -r tests/onnx/requirements.txt
test-onnx:
$(CMD_PYTEST) tests/onnx $(GENERAL_PYTEST_ARGS) $(ARGS)
###############################################################################
# Examples
###############################################################################
install-examples:
$(CMD_INSTALL) -r tests/cross_fw/examples/requirements.txt
test-examples:
$(CMD_PYTEST) $(GENERAL_PYTEST_ARGS) -s tests/cross_fw/examples $(ARGS)
###############################################################################
# Conformance
###############################################################################
install-conformance:
$(CMD_INSTALL) -e . -r tests/post_training/requirements.txt
test-ptq:
ONEDNN_MAX_CPU_ISA=AVX512_VNNI OV_CPU_MAX_ISA=AVX512_VNNI $(CMD_PYTEST) $(GENERAL_PYTEST_ARGS) -s tests/post_training/test_quantize_conformance.py::test_ptq_quantization $(ARGS)
test-wc:
ONEDNN_MAX_CPU_ISA=AVX512_VNNI OV_CPU_MAX_ISA=AVX512_VNNI $(CMD_PYTEST) $(GENERAL_PYTEST_ARGS) -s tests/post_training/test_quantize_conformance.py::test_weight_compression $(ARGS)
###############################################################################
# Docs
###############################################################################
install-docs:
$(CMD_INSTALL) -r tests/docs/requirements.txt
test-docs:
$(CMD_PYTEST) tests/docs $(GENERAL_PYTEST_ARGS) $(ARGS)
###############################################################################
# Tools
###############################################################################
install-tools:
$(CMD_INSTALL) -e . -r tests/tools/requirements.txt
test-tools:
$(CMD_PYTEST) tests/tools $(GENERAL_PYTEST_ARGS) $(ARGS)
###############################################################################
# Linters
###############################################################################
install-pre-commit:
pip install pre-commit==4.6.2
pre-commit:
pre-commit run -a