Skip to content

Commit 44375f2

Browse files
authored
chore: update release versions for 2.6 (#3380)
1 parent c7d610a commit 44375f2

File tree

30 files changed

+59
-42
lines changed

30 files changed

+59
-42
lines changed

MODULE.bazel

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,21 @@ http_archive(
5555
name = "libtorch",
5656
build_file = "@//third_party/libtorch:BUILD",
5757
strip_prefix = "libtorch",
58-
urls = ["https://download.pytorch.org/libtorch/test/cu126/libtorch-cxx11-abi-shared-with-deps-latest.zip"],
58+
urls = ["https://download.pytorch.org/libtorch/cu126/libtorch-cxx11-abi-shared-with-deps-2.6.0%2Bcu126.zip"],
5959
)
6060

6161
http_archive(
6262
name = "libtorch_pre_cxx11_abi",
6363
build_file = "@//third_party/libtorch:BUILD",
6464
strip_prefix = "libtorch",
65-
urls = ["https://download.pytorch.org/libtorch/test/cu126/libtorch-shared-with-deps-latest.zip"],
65+
urls = ["https://download.pytorch.org/libtorch/cu126/libtorch-shared-with-deps-2.6.0%2Bcu126.zip"],
6666
)
6767

6868
http_archive(
6969
name = "libtorch_win",
7070
build_file = "@//third_party/libtorch:BUILD",
7171
strip_prefix = "libtorch",
72-
urls = ["https://download.pytorch.org/libtorch/test/cu126/libtorch-win-shared-with-deps-latest.zip"],
72+
urls = ["https://download.pytorch.org/libtorch/cu126/libtorch-win-shared-with-deps-2.6.0%2Bcu126.zip"],
7373
)
7474

7575
# Download these tarballs manually from the NVIDIA website

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ auto results = trt_mod.forward({input_tensor});
117117
These are the following dependencies used to verify the testcases. Torch-TensorRT can work with other versions, but the tests are not guaranteed to pass.
118118
119119
- Bazel 6.3.2
120-
- Libtorch 2.5.0.dev (latest nightly) (built with CUDA 12.4)
121-
- CUDA 12.4
120+
- Libtorch 2.6.0 (built with CUDA 12.6)
121+
- CUDA 12.6
122122
- TensorRT 10.7.0.23
123123
124124
## Deprecation Policy

docker/dist-build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ set -x
55
TOP_DIR=$(cd $(dirname $0); pwd)/..
66

77
if [[ -z "${USE_CXX11}" ]]; then
8-
BUILD_CMD="python -m pip wheel . --extra-index-url https://download.pytorch.org/whl/test/cu126 -w dist"
8+
BUILD_CMD="python -m pip wheel . --extra-index-url https://download.pytorch.org/whl/cu126 -w dist"
99
else
10-
BUILD_CMD="python -m pip wheel . --config-setting="--build-option=--use-cxx11-abi" --extra-index-url https://download.pytorch.org/whl/test/cu126 -w dist"
10+
BUILD_CMD="python -m pip wheel . --config-setting="--build-option=--use-cxx11-abi" --extra-index-url https://download.pytorch.org/whl/cu126 -w dist"
1111
fi
1212

1313
# TensorRT restricts our pip version

docs/_downloads/0e30a6276601af7e5fc4d5166e2e3d37/torch_compile_advanced_usage.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Torch Compile Advanced Usage
55
======================================================
66
7-
This interactive script is intended as an overview of the process by which `torch_tensorrt.compile(..., ir="torch_compile", ...)` works, and how it integrates with the `torch.compile` API."""
7+
This interactive script is intended as an overview of the process by which `torch_tensorrt.compile(..., ir="torch_compile", ...)` works, and how it integrates with the `torch.compile` API.
8+
"""
89

910
# %%
1011
# Imports and Model Definition

docs/_downloads/2a9ac10f2667047a7f398d1593b7ca33/torch_export_gpt2.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Compiling GPT2 using the dynamo backend
55
==========================================================
66
7-
This script illustrates Torch-TensorRT workflow with dynamo backend on popular GPT2 model."""
7+
This script illustrates Torch-TensorRT workflow with dynamo backend on popular GPT2 model.
8+
"""
89

910
# %%
1011
# Imports and Model Definition

docs/_downloads/3d4d74f6636d986f33167154f6553961/torch_export_cudagraphs.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Torch Export with Cudagraphs
55
======================================================
66
7-
This interactive script is intended as an overview of the process by which the Torch-TensorRT Cudagraphs integration can be used in the `ir="dynamo"` path. The functionality works similarly in the `torch.compile` path as well."""
7+
This interactive script is intended as an overview of the process by which the Torch-TensorRT Cudagraphs integration can be used in the `ir="dynamo"` path. The functionality works similarly in the `torch.compile` path as well.
8+
"""
89

910
# %%
1011
# Imports and Model Definition

docs/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Compiling ResNet using the Torch-TensorRT Dyanmo Frontend
55
==========================================================
66
7-
This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a ResNet model."""
7+
This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a ResNet model.
8+
"""
89

910
# %%
1011
# Imports and Model Definition

docs/_downloads/7b7004dc2ea6f839be532665e16e0426/torch_export_llama2.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Compiling Llama2 using the dynamo backend
55
==========================================================
66
7-
This script illustrates Torch-TensorRT workflow with dynamo backend on popular Llama2 model."""
7+
This script illustrates Torch-TensorRT workflow with dynamo backend on popular Llama2 model.
8+
"""
89

910
# %%
1011
# Imports and Model Definition

docs/_downloads/d6e1bb6ec5f884994554d9d12e37a0f6/torch_compile_resnet_example.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Compiling ResNet with dynamic shapes using the `torch.compile` backend
55
==========================================================
66
7-
This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a ResNet model."""
7+
This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a ResNet model.
8+
"""
89

910
# %%
1011
# Imports and Model Definition

docs/_downloads/dfa60e8f9850fd7761f3e7da81304d32/torch_compile_transformers_example.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Compiling BERT using the `torch.compile` backend
55
==============================================================
66
7-
This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a BERT model."""
7+
This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a BERT model.
8+
"""
89

910
# %%
1011
# Imports and Model Definition

docs/_downloads/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Dynamo Compile Advanced Usage
55
======================================================
66
7-
This interactive script is intended as an overview of the process by which `torch_tensorrt.dynamo.compile` works, and how it integrates with the new `torch.compile` API."""
7+
This interactive script is intended as an overview of the process by which `torch_tensorrt.dynamo.compile` works, and how it integrates with the new `torch.compile` API.
8+
"""
89

910
# %%
1011
# Imports and Model Definition

docs/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Compiling a Transformer using torch.compile and TensorRT
55
==============================================================
66
7-
This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a transformer-based model."""
7+
This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a transformer-based model.
8+
"""
89

910
# %%
1011
# Imports and Model Definition

docs/v1.4.0/_downloads/418941399c146271a7b7728ba3059960/dynamo_compile_resnet_example.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Compiling ResNet using the Torch-TensorRT Dyanmo Frontend
55
==========================================================
66
7-
This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a ResNet model."""
7+
This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a ResNet model.
8+
"""
89

910
# %%
1011
# Imports and Model Definition

docs/v1.4.0/_downloads/e1ef5a42560a98a132f56a79d0b66f79/dynamo_compile_advanced_usage.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Dynamo Compile Advanced Usage
55
======================================================
66
7-
This interactive script is intended as an overview of the process by which `torch_tensorrt.dynamo.compile` works, and how it integrates with the new `torch.compile` API."""
7+
This interactive script is intended as an overview of the process by which `torch_tensorrt.dynamo.compile` works, and how it integrates with the new `torch.compile` API.
8+
"""
89

910
# %%
1011
# Imports and Model Definition

docs/v1.4.0/_downloads/e550c5f53cc43e11aa6da8cfb79b54df/dynamo_compile_transformers_example.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Compiling a Transformer using torch.compile and TensorRT
55
==============================================================
66
7-
This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a transformer-based model."""
7+
This interactive script is intended as a sample of the `torch_tensorrt.dynamo.compile` workflow on a transformer-based model.
8+
"""
89

910
# %%
1011
# Imports and Model Definition

examples/dynamo/torch_compile_advanced_usage.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Torch Compile Advanced Usage
55
======================================================
66
7-
This interactive script is intended as an overview of the process by which `torch_tensorrt.compile(..., ir="torch_compile", ...)` works, and how it integrates with the `torch.compile` API."""
7+
This interactive script is intended as an overview of the process by which `torch_tensorrt.compile(..., ir="torch_compile", ...)` works, and how it integrates with the `torch.compile` API.
8+
"""
89

910
# %%
1011
# Imports and Model Definition

examples/dynamo/torch_compile_resnet_example.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Compiling ResNet with dynamic shapes using the `torch.compile` backend
55
==========================================================
66
7-
This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a ResNet model."""
7+
This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a ResNet model.
8+
"""
89

910
# %%
1011
# Imports and Model Definition

examples/dynamo/torch_compile_transformers_example.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Compiling BERT using the `torch.compile` backend
55
==============================================================
66
7-
This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a BERT model."""
7+
This interactive script is intended as a sample of the Torch-TensorRT workflow with `torch.compile` on a BERT model.
8+
"""
89

910
# %%
1011
# Imports and Model Definition

examples/dynamo/torch_export_cudagraphs.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Torch Export with Cudagraphs
55
======================================================
66
7-
This interactive script is intended as an overview of the process by which the Torch-TensorRT Cudagraphs integration can be used in the `ir="dynamo"` path. The functionality works similarly in the `torch.compile` path as well."""
7+
This interactive script is intended as an overview of the process by which the Torch-TensorRT Cudagraphs integration can be used in the `ir="dynamo"` path. The functionality works similarly in the `torch.compile` path as well.
8+
"""
89

910
# %%
1011
# Imports and Model Definition

examples/dynamo/torch_export_gpt2.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Compiling GPT2 using the dynamo backend
55
==========================================================
66
7-
This script illustrates Torch-TensorRT workflow with dynamo backend on popular GPT2 model."""
7+
This script illustrates Torch-TensorRT workflow with dynamo backend on popular GPT2 model.
8+
"""
89

910
# %%
1011
# Imports and Model Definition

examples/dynamo/torch_export_llama2.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
Compiling Llama2 using the dynamo backend
55
==========================================================
66
7-
This script illustrates Torch-TensorRT workflow with dynamo backend on popular Llama2 model."""
7+
This script illustrates Torch-TensorRT workflow with dynamo backend on popular Llama2 model.
8+
"""
89

910
# %%
1011
# Imports and Model Definition

py/requirements.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
numpy
22
packaging
33
pybind11==2.6.2
4-
--extra-index-url https://download.pytorch.org/whl/test/cu126
5-
torch>=2.6.0.dev,<2.7.0
6-
torchvision>=0.20.0.dev,<0.22.0
4+
--extra-index-url https://download.pytorch.org/whl/cu126
5+
torch==2.6.0
6+
torchvision==0.21.0
77
--extra-index-url https://pypi.ngc.nvidia.com
88
pyyaml
99
transformers==4.40.2

py/torch_tensorrt/_Input.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def _supported_input_size_type(input_size: Any) -> bool:
261261

262262
@staticmethod
263263
def _parse_tensor_domain(
264-
domain: Optional[Tuple[float, float]]
264+
domain: Optional[Tuple[float, float]],
265265
) -> Tuple[float, float]:
266266
"""
267267
Produce a tuple of integers which specifies a tensor domain in the interval format: [lo, hi)

py/torch_tensorrt/_enums.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1200,7 +1200,7 @@ def _from(
12001200

12011201
@classmethod
12021202
def try_from(
1203-
c: Union[trt.EngineCapability, EngineCapability]
1203+
c: Union[trt.EngineCapability, EngineCapability],
12041204
) -> Optional[EngineCapability]:
12051205
"""Create a Torch-TensorRT engine capability enum from a TensorRT engine capability enum.
12061206

py/torch_tensorrt/dynamo/conversion/_TRTBuilderMonitor.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ def _redraw(self, *, blank_lines: int = 0) -> None:
5353
if self._render:
5454

5555
def clear_line() -> None:
56-
print("\x1B[2K", end="")
56+
print("\x1b[2K", end="")
5757

5858
def move_to_start_of_line() -> None:
59-
print("\x1B[0G", end="")
59+
print("\x1b[0G", end="")
6060

6161
def move_cursor_up(lines: int) -> None:
62-
print("\x1B[{}A".format(lines), end="")
62+
print("\x1b[{}A".format(lines), end="")
6363

6464
def progress_bar(steps: int, num_steps: int) -> str:
6565
INNER_WIDTH = 10

py/torch_tensorrt/dynamo/conversion/impl/activation/ops.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def hard_sigmoid(
247247
operation_type = trt.ActivationType.HARD_SIGMOID
248248

249249
def hard_sigmoid_dyn_range_fn(
250-
dyn_range: Tuple[float, float]
250+
dyn_range: Tuple[float, float],
251251
) -> Tuple[float, float]:
252252
def hard_sigmoid_fn(x: float) -> float:
253253
return max(0, min(1, alpha * x + beta))
@@ -310,7 +310,7 @@ def thresholded_relu(
310310
operation_type = trt.ActivationType.THRESHOLDED_RELU
311311

312312
def thresholded_relu_dyn_range_fn(
313-
dyn_range: Tuple[float, float]
313+
dyn_range: Tuple[float, float],
314314
) -> Tuple[float, float]:
315315
def thresholded_relu_fn(x: float) -> float:
316316
return x if x > alpha else 0

py/torch_tensorrt/dynamo/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ def to_torch_device(device: Optional[Union[Device, torch.device, str]]) -> torch
465465

466466

467467
def to_torch_tensorrt_device(
468-
device: Optional[Union[Device, torch.device, str]]
468+
device: Optional[Union[Device, torch.device, str]],
469469
) -> Device:
470470
"""Cast a device-type to torch_tensorrt.Device
471471

py/torch_tensorrt/fx/test/converters/acc_op/test_where.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def __init__(self, x_shape, y_shape):
101101
def forward(self, condition):
102102
return torch.where(condition, self.x, self.y)
103103

104-
inputs = [(torch.randn(condition_shape) > 0)]
104+
inputs = [torch.randn(condition_shape) > 0]
105105
self.run_test(
106106
Where(x_shape, y_shape),
107107
inputs,

py/torch_tensorrt/fx/tracer/acc_tracer/acc_tracer.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from typing import (
1111
Any,
1212
Callable,
13-
cast,
1413
Dict,
1514
Iterable,
1615
Optional,
@@ -19,6 +18,7 @@
1918
Tuple,
2019
Type,
2120
Union,
21+
cast,
2222
)
2323

2424
import torch
@@ -32,7 +32,6 @@
3232

3333
from . import acc_normalizer, acc_ops, acc_shape_prop, acc_utils # noqa: F401
3434

35-
3635
_LOGGER = logging.getLogger(__name__)
3736

3837

@@ -517,7 +516,7 @@ def _replace_transpose_last_dims_impl(
517516
changed = False
518517

519518
def _calculate_dim(
520-
transpose_dim: Union[torch.fx.Node, int]
519+
transpose_dim: Union[torch.fx.Node, int],
521520
) -> Union[torch.fx.Node, int]:
522521
nonlocal transpose_input_node
523522
nonlocal changed

pyproject.toml

+2-2
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.7.0.post1,<10.8.0",
12-
"torch>=2.6.0.dev,<2.7.0",
12+
"torch==2.6.0",
1313
"pybind11==2.6.2",
1414
"numpy",
1515
]
@@ -54,7 +54,7 @@ keywords = [
5454
"inference",
5555
]
5656
dependencies = [
57-
"torch>=2.6.0.dev,<2.7.0",
57+
"torch==2.6.0",
5858
"tensorrt>=10.7.0.post1,<10.8.0",
5959
"tensorrt-cu12>=10.7.0.post1,<10.8.0",
6060
"tensorrt-cu12-bindings>=10.7.0,<10.8.0",

0 commit comments

Comments
 (0)