-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathpyproject.toml
More file actions
101 lines (91 loc) · 2.35 KB
/
Copy pathpyproject.toml
File metadata and controls
101 lines (91 loc) · 2.35 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
[project]
name = "onnxslim"
version = "0.1.96"
description = "OnnxSlim: A Toolkit to Help Optimize Onnx Model"
authors = [{ name = "inisis", email = "desmond.yao@buaa.edu.cn" }]
license = "MIT"
readme = "README.md"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
requires-python = ">=3.8"
dependencies = [
"onnx",
"sympy>=1.13.1",
"packaging",
"colorama",
"ml_dtypes",
]
[project.urls]
homepage = "https://github.com/inisis/OnnxSlim"
issues = "https://github.com/inisis/OnnxSlim/issues"
[project.scripts]
onnxslim = "onnxslim.cli:main"
[build-system]
requires = ["hatchling>=1.20.0,<1.30.0"]
build-backend = "hatchling.build"
[tool.ruff]
exclude = ["onnxslim/argparser.py"]
[tool.black]
exclude = '''
(
onnxslim/argparser.py
)
'''
[dependency-groups]
dev = [
"coverage",
"pytest-cov",
"onnx<=1.16.1 ; python_version<'3.11'",
"onnx>=1.12.0 ; python_version>='3.11'",
"onnxruntime<1.20.0 ; python_version<'3.10'",
"onnxruntime>=1.20.0,<1.22 ; python_version=='3.10'",
"onnxruntime>=1.20.0 ; python_version>='3.11'",
"onnxconverter-common",
"pytest",
"pytest-xdist",
"timm",
"torch",
"torchvision<=0.24",
# required by torch but apparently not declared?
"onnxscript ; python_version>='3.9'"
]
[tool.uv.sources]
torch = [
{ index = "pytorch-cpu" },
]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[tool.pytest.ini_options]
testpaths = [
"tests/test_onnxslim.py",
"tests/test_modelzoo.py",
"tests/test_pattern_matcher.py",
"tests/test_pattern_generator.py",
"tests/test_dead_node_elimination.py",
"tests/test_subexpression_elimination.py",
"tests/test_elimination_patterns.py",
"tests/test_fusion_patterns.py",
"tests/test_cli_main.py",
"tests/test_utils.py",
"tests/test_symbolic_shape_inference.py",
"tests/test_nvidia.py",
"tests/test_shape_folding.py",
"tests/test_coverage.py",
"tests/test_amd.py",
]
addopts = "-n auto" # enables pytest-xdist parallel workers
[tool.coverage.run]
branch = false
parallel = true
source = ["onnxslim"]
omit = [
"onnxslim/__main__.py",
"onnxslim/third_party/*",
"onnxslim/misc/*",
]