Skip to content

Commit ab14920

Browse files
committed
tool: Adding support for the uv system
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent bc93437 commit ab14920

File tree

5 files changed

+1877
-10
lines changed

5 files changed

+1877
-10
lines changed

cpp/include/torch_tensorrt/macros.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#define STR(x) XSTR(x)
2525

2626
#define TORCH_TENSORRT_MAJOR_VERSION 2
27-
#define TORCH_TENSORRT_MINOR_VERSION 5
27+
#define TORCH_TENSORRT_MINOR_VERSION 6
2828
#define TORCH_TENSORRT_PATCH_VERSION 0
2929
#define TORCH_TENSORRT_VERSION \
3030
STR(TORCH_TENSORRT_MAJOR_VERSION) \

docsrc/getting_started/installation.rst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,14 @@ Once the WORKSPACE has been configured properly, all that is required to build t
134134
python -m pip install --pre . --extra-index-url https://download.pytorch.org/whl/nightly/cu124
135135
136136
137+
If you use the ``uv`` (`https://docs.astral.sh/uv/ <https://docs.astral.sh/uv/>`_) tool to manage python and your projects, the command is slightly simpler
138+
139+
140+
.. code-block:: sh
141+
142+
uv pip install -e .
143+
144+
137145
To build the wheel file
138146

139147
.. code-block:: sh
@@ -379,4 +387,4 @@ Compile the Python API using the following command from the ``//py`` directory:
379387
380388
If you have a build of PyTorch that uses Pre-CXX11 ABI drop the ``--use-cxx11-abi`` flag
381389

382-
If you are building for Jetpack 4.5 add the ``--jetpack-version 5.0`` flag
390+
If you are building for Jetpack 4.5 add the ``--jetpack-version 5.0`` flag

pyproject.toml

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ requires = [
99
"typing-extensions>=4.7.0",
1010
"future>=0.18.3",
1111
"tensorrt-cu12==10.3.0",
12-
"torch >=2.5.0.dev,<2.6.0",
12+
"torch>=2.6.0.dev,<2.7.0",
1313
"pybind11==2.6.2",
1414
"numpy",
1515
]
@@ -36,7 +36,7 @@ classifiers = [
3636
"Topic :: Software Development :: Libraries",
3737
]
3838
readme = { file = "README.md", content-type = "text/markdown" }
39-
requires-python = ">=3.8"
39+
requires-python = ">=3.9"
4040
keywords = [
4141
"pytorch",
4242
"torch",
@@ -54,7 +54,7 @@ keywords = [
5454
"inference",
5555
]
5656
dependencies = [
57-
"torch >=2.5.0.dev,<2.6.0",
57+
"torch>=2.6.0.dev,<2.7.0",
5858
"tensorrt-cu12==10.3.0",
5959
"tensorrt-cu12-bindings==10.3.0",
6060
"tensorrt-cu12-libs==10.3.0",
@@ -65,10 +65,10 @@ dependencies = [
6565
dynamic = ["version"]
6666

6767
[project.optional-dependencies]
68-
torchvision = ["torchvision >=0.20.dev,<0.21.0"]
68+
#torchvision = ["torchvision>=0.21.dev,<0.22.0"] # Reenable once torchvision bumps to 2.6.0
6969
quantization = ["nvidia-modelopt[deploy,hf,torch]~=0.17.0"]
70-
monitoring-tools = ["rich >= 13.7.1"]
71-
jupyter = ["rich[jupyter] >= 13.7.1"]
70+
monitoring-tools = ["rich>=13.7.1"]
71+
jupyter = ["rich[jupyter]>=13.7.1"]
7272

7373
[project.urls]
7474
Homepage = "https://pytorch.org/tensorrt"
@@ -80,6 +80,32 @@ Changelog = "https://github.com/pytorch/tensorrt/releases"
8080
package-dir = { "" = "py" }
8181
include-package-data = false
8282

83+
[tool.uv]
84+
dev-dependencies = [
85+
"pre-commit>=2.20.0",
86+
"black>=22.6.0",
87+
"clang-format==14.0.6",
88+
"mypy",
89+
"isort",
90+
"ruff",
91+
"pytest",
92+
"parameterized",
93+
"expecttest==0.1.6",
94+
"pyyaml",
95+
]
96+
97+
environments = [
98+
"sys_platform == 'linux'",
99+
"sys_platform == 'windows'",
100+
]
101+
102+
extra-index-url = [
103+
"https://download.pytorch.org/whl/nightly/cu124" # We are going to define the dev enviorment as latest supported CUDA, and allow CI to handle the others, change as needed
104+
]
105+
106+
prerelease = "if-necessary-or-explicit"
107+
index-strategy = "unsafe-best-match"
108+
83109
[tool.ruff]
84110
# NOTE: Synchoronize the ignores with .flake8
85111
lint.ignore = [
@@ -144,7 +170,6 @@ lint.select = [
144170

145171
# Allow unused variables when underscore-prefixed.
146172
lint.dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
147-
target-version = "py311"
148173

149174
# Allow autofix for all enabled rules (when `--fix`) is provided.
150175
lint.fixable = [
@@ -194,6 +219,7 @@ lint.fixable = [
194219
"YTT",
195220
]
196221
lint.unfixable = []
222+
target-version = "py311"
197223

198224
# Exclude a variety of commonly ignored directories.
199225
exclude = [

0 commit comments

Comments
 (0)