forked from pytorch/TensorRT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
218 lines (202 loc) · 5.44 KB
/
pyproject.toml
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
[build-system]
requires = [
"setuptools>=68.0.0",
"packaging>=23.1",
"wheel>=0.40.0",
"ninja>=1.11.0",
"pyyaml>=6.0",
"cffi>=1.15.1",
"typing-extensions>=4.7.0",
"future>=0.18.3",
"tensorrt==10.0.1",
"torch >=2.4.0.dev,<2.5.0",
"pybind11==2.6.2",
"numpy",
]
build-backend = "setuptools.build_meta"
[project]
name = "torch_tensorrt"
authors = [
{name="NVIDIA Corporation", email="[email protected]"}
]
description = "Torch-TensorRT is a package which allows users to automatically compile PyTorch and TorchScript modules to TensorRT while remaining in PyTorch"
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: GPU :: NVIDIA CUDA",
"License :: OSI Approved :: BSD License",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: POSIX :: Linux",
"Programming Language :: C++",
"Programming Language :: Python",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
]
readme = {file = "py/README.md", content-type = "text/markdown"}
requires-python = ">=3.8"
keywords = ["pytorch", "torch", "tensorrt", "trt", "ai", "artificial intelligence", "ml", "machine learning", "dl", "deep learning", "compiler", "dynamo", "torchscript", "inference"]
dependencies = [
"torch >=2.4.0.dev,<2.5.0",
"tensorrt==10.0.1",
"packaging>=23",
"numpy",
"typing-extensions>=4.7.0",
]
dynamic = ["version"]
[project.optional-dependencies]
torchvision = ["torchvision >=0.18.dev,<0.19.0"]
[project.urls]
Homepage = "https://pytorch.org/tensorrt"
Documentation = "https://pytorch.org/tensorrt"
Repository = "https://github.com/pytorch/tensorrt.git"
Changelog = "https://github.com/pytorch/tensorrt/releases"
[tool.setuptools]
package-dir = {"" = "py"}
include-package-data = false
[tool.ruff]
# NOTE: Synchoronize the ignores with .flake8
lint.ignore = [
# these ignores are from flake8-bugbear; please fix!
"B007", "B008", "B017",
"B018", # Useless expression
"B019", "B020",
"B023", "B024", "B026",
"B028", # No explicit `stacklevel` keyword argument found
"B904", "B905",
"E402",
"C408", # C408 ignored because we like the dict keyword argument syntax
"E501", # E501 is not flexible enough, we're using B950 instead
"E721",
"E731", # Assign lambda expression
"E741",
"EXE001",
"F405",
"F821",
"F841",
# these ignores are from flake8-logging-format; please fix!
"G101", "G201", "G202", "G003", "G004",
# these ignores are from RUFF perf; please fix!
"PERF203", "PERF4",
"SIM102", "SIM103", "SIM112", # flake8-simplify code styles
"SIM105", # these ignores are from flake8-simplify. please fix or ignore with commented reason
"SIM108",
"SIM110",
"SIM114", # Combine `if` branches using logical `or` operator
"SIM115",
"SIM116", # Disable Use a dictionary instead of consecutive `if` statements
"SIM117",
"SIM118",
]
#line-length = 120
lint.select = [
"B",
"C4",
"G",
"E",
"F",
"SIM1",
"W",
# Not included in flake8
"PERF",
"PLE",
"TRY302",
]
# Allow unused variables when underscore-prefixed.
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
target-version = "py311"
# Allow autofix for all enabled rules (when `--fix`) is provided.
lint.fixable = [
"A","B","C","D","E","F","G",
"I","N","Q","S","T","W",
"ANN", "ARG", "BLE", "COM", "DJ",
"DTZ", "EM", "ERA", "EXE", "FBT",
"ICN", "INP", "ISC", "NPY", "PD",
"PGH", "PIE", "PL", "PT", "PTH",
"PYI", "RET", "RSE", "RUF", "SIM",
"SLF", "TCH", "TID", "TRY", "UP", "YTT"]
lint.unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"env",
"py/torch_tensorrt/fx",
".github",
"examples",
"tests",
"tools",
"docs",
"docsrc",
"tests",
"setup.py",
"noxfile.py",
"__init__.py"
]
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.isort]
profile = "black"
py_version = 311
skip = [
"py/torch_tensorrt/fx",
]
[tool.black]
#line-length = 120
target-version = ["py38", "py39", "py310", "py311", "py312"]
force-exclude = """
elu_converter/setup.py
"""
[tool.mypy]
strict = true
ignore_missing_imports = true
show_error_codes = true
disable_error_code = "attr-defined"
no_implicit_optional = true
exclude = [
"^py/torch_tensorrt/fx",
"py/torch_tensorrt/fx",
"torch_tensorrt/fx",
"py/torch_tensorrt/_C.so",
"examples",
"docs",
"docsrc",
"tests",
"setup.py",
"noxfile.py"
]
python_version = "3.11"
follow_imports = "skip"
[[tool.mypy.overrides]]
module = "torch_tensorrt.dynamo.conversion.aten_converters"
disable_error_code = "arg-type"
[[tool.mypy.overrides]]
module = "torch_tensorrt.dynamo.lowering._decompositions"
disallow_untyped_calls = false
[[tool.mypy.overrides]]
module = "torch_tensorrt.fx.*"
ignore_errors = true
follow_imports = "skip"