Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module(
name = "torch_tensorrt",
version = "2.10.0a0",
version = "2.11.0a0",
repo_name = "org_pytorch_tensorrt",
)

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Torch-TensorRT
<h4> Easily achieve the best inference performance for any PyTorch model on the NVIDIA platform. </h4>

[![Documentation](https://img.shields.io/badge/docs-master-brightgreen)](https://nvidia.github.io/Torch-TensorRT/)
[![pytorch](https://img.shields.io/badge/PyTorch-2.10-green)](https://download.pytorch.org/whl/nightly/cu130)
[![pytorch](https://img.shields.io/badge/PyTorch-2.11-green)](https://download.pytorch.org/whl/nightly/cu130)
[![cuda](https://img.shields.io/badge/CUDA-13.0-green)](https://developer.nvidia.com/cuda-downloads)
[![trt](https://img.shields.io/badge/TensorRT-10.14.0-green)](https://github.com/nvidia/tensorrt)
[![trt](https://img.shields.io/badge/TensorRT-10.14.1-green)](https://github.com/nvidia/tensorrt)
[![license](https://img.shields.io/badge/license-BSD--3--Clause-blue)](./LICENSE)
[![Linux x86-64 Nightly Wheels](https://github.com/pytorch/TensorRT/actions/workflows/build-test-linux-x86_64.yml/badge.svg?branch=nightly)](https://github.com/pytorch/TensorRT/actions/workflows/build-test-linux-x86_64.yml)
[![Linux SBSA Nightly Wheels](https://github.com/pytorch/TensorRT/actions/workflows/build-test-linux-aarch64.yml/badge.svg?branch=nightly)](https://github.com/pytorch/TensorRT/actions/workflows/build-test-linux-aarch64.yml)
Expand Down Expand Up @@ -121,7 +121,7 @@ auto results = trt_mod.forward({input_tensor});
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.

- Bazel 8.1.1
- Libtorch 2.10.0.dev (latest nightly)
- Libtorch 2.11.0.dev (latest nightly)
- CUDA 13.0 (CUDA 12.6 on Jetson)
- TensorRT 10.14.1.48 (TensorRT 10.3 on Jetson)

Expand Down
2 changes: 1 addition & 1 deletion cpp/include/torch_tensorrt/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#define STR(x) XSTR(x)

#define TORCH_TENSORRT_MAJOR_VERSION 2
#define TORCH_TENSORRT_MINOR_VERSION 10
#define TORCH_TENSORRT_MINOR_VERSION 11
#define TORCH_TENSORRT_PATCH_VERSION 0
#define TORCH_TENSORRT_VERSION \
STR(TORCH_TENSORRT_MAJOR_VERSION) \
Expand Down
2 changes: 1 addition & 1 deletion py/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ numpy
packaging
pybind11==2.6.2
--extra-index-url https://download.pytorch.org/whl/nightly/cu130
torch>=2.10.0.dev,<2.11.0
torch>=2.11.0.dev,<2.12.0
--extra-index-url https://pypi.ngc.nvidia.com
pyyaml
dllist
Expand Down
4 changes: 3 additions & 1 deletion py/torch_tensorrt/_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@
_WINDOWS_CROSS_COMPILE = check_cross_compile_trt_win_lib()
_TRTLLM_AVAIL = load_tensorrt_llm_for_nccl()

if importlib.util.find_spec("tensorrt.plugin"):
if importlib.util.find_spec("tensorrt.plugin") and importlib.util.find_spec(
"tensorrt.plugin._lib"
):
_QDP_PLUGIN_AVAIL = True
else:
_QDP_PLUGIN_AVAIL = False
Expand Down
29 changes: 29 additions & 0 deletions py/torch_tensorrt/dynamo/runtime/meta_ops/register_meta_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,35 @@
from torch_tensorrt.dynamo.utils import input_is_dynamic, unwrap_tensor_shape


@torch.library.register_fake("aten::cudnn_grid_sampler") # type: ignore
def fake_aten_cudnn_grid_sampler(
input: torch.Tensor,
grid: torch.Tensor,
interpolation_mode: int = 0,
padding_mode: int = 0,
align_corners: bool = True,
) -> torch.Tensor:
"""
Meta kernel for aten::cudnn_grid_sampler to enable FakeTensor/compile flows.
Shapes follow grid_sampler semantics:
- 2D: input [N, C, H_in, W_in], grid [N, H_out, W_out, 2] -> output [N, C, H_out, W_out]
- 3D: input [N, C, D_in, H_in, W_in], grid [N, D_out, H_out, W_out, 3] -> output [N, C, D_out, H_out, W_out]
"""
if grid.dim() == 4:
n, h_out, w_out, _ = grid.shape
c = input.shape[1]
out_shape = [n, c, h_out, w_out]
elif grid.dim() == 5:
n, d_out, h_out, w_out, _ = grid.shape
c = input.shape[1]
out_shape = [n, c, d_out, h_out, w_out]
else:
raise RuntimeError(
f"aten::cudnn_grid_sampler: unexpected grid rank {grid.dim()}"
)
return torch.empty(out_shape, dtype=input.dtype, device=input.device)


@torch.library.register_fake("tensorrt::execute_engine") # type: ignore
def fake_tensorrt_execute_engine(
inputs: List[torch.Tensor], fake_trt_engine: Any
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ requires = [
"ninja>=1.11.0",
"pyyaml>=6.0",
"cffi>=1.15.1",
"torch>=2.10.0.dev,<2.11.0",
"torch>=2.11.0.dev,<2.12.0",
"pybind11==2.6.2",
]
build-backend = "setuptools.build_meta"
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ def get_sbsa_requirements(base_requirements):
# TensorRT does not currently build wheels for Tegra, so we need to use the local tensorrt install from the tarball for thor
# also due to we use sbsa torch_tensorrt wheel for thor, so when we build sbsa wheel, we need to only include tensorrt dependency.
return requirements + [
"torch>=2.10.0.dev,<2.11.0",
"torch>=2.11.0.dev,<2.12.0",
"tensorrt>=10.14.1,<10.15.0",
]

Expand All @@ -753,7 +753,7 @@ def get_x86_64_requirements(base_requirements):
if IS_DLFW_CI:
return requirements
else:
requirements = requirements + ["torch>=2.10.0.dev,<2.11.0"]
requirements = requirements + ["torch>=2.11.0.dev,<2.12.0"]
if USE_TRT_RTX:
return requirements + [
"tensorrt_rtx>=1.2.0.54",
Expand Down
9 changes: 4 additions & 5 deletions tests/py/dynamo/automatic_plugin/test_automatic_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@

import torch
import torch.nn as nn
import torch_tensorrt
import triton
import triton.language as tl
from parameterized import parameterized
from torch.testing._internal.common_utils import run_tests

import torch_tensorrt

from ..conversion.harness import DispatchTestCase


Expand Down Expand Up @@ -56,15 +55,15 @@ def elementwise_mul(x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
return x


if not torch_tensorrt.ENABLED_FEATURES.tensorrt_rtx:
if torch_tensorrt.ENABLED_FEATURES.qdp_plugin:
torch_tensorrt.dynamo.conversion.plugins.custom_op(
"torchtrt_ex::elementwise_mul", supports_dynamic_shapes=True
)


@unittest.skipIf(
torch_tensorrt.ENABLED_FEATURES.tensorrt_rtx,
"TensorRT RTX does not support plugins",
not torch_tensorrt.ENABLED_FEATURES.qdp_plugin,
"QDP Plugin is not available",
)
class TestAutomaticPlugin(DispatchTestCase):

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@

import torch
import torch.nn as nn
import torch_tensorrt
import triton
import triton.language as tl
from parameterized import parameterized
from torch.testing._internal.common_utils import run_tests

import torch_tensorrt

from ..conversion.harness import DispatchTestCase


Expand Down Expand Up @@ -57,15 +56,15 @@ def _(x: torch.Tensor, y: torch.Tensor, b: float = 0.2, a: int = 2) -> torch.Ten
return x


if not torch_tensorrt.ENABLED_FEATURES.tensorrt_rtx:
if torch_tensorrt.ENABLED_FEATURES.qdp_plugin:
torch_tensorrt.dynamo.conversion.plugins.custom_op(
"torchtrt_ex::elementwise_scale_mul", supports_dynamic_shapes=True
)


@unittest.skipIf(
torch_tensorrt.ENABLED_FEATURES.tensorrt_rtx,
"TensorRT RTX does not support plugins",
not torch_tensorrt.ENABLED_FEATURES.qdp_plugin,
"QDP Plugin is not available",
)
class TestAutomaticPlugin(DispatchTestCase):

Expand Down
9 changes: 4 additions & 5 deletions tests/py/dynamo/automatic_plugin/test_flashinfer_rmsnorm.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@
import pytest
import torch
import torch.nn as nn
import torch_tensorrt
from parameterized import parameterized
from torch.testing._internal.common_utils import run_tests

import torch_tensorrt
from torch_tensorrt._enums import dtype

from ..conversion.harness import DispatchTestCase
Expand All @@ -28,7 +27,7 @@ def _(input: torch.Tensor, weight: torch.Tensor, b: float = 1e-6) -> torch.Tenso
return input


if not torch_tensorrt.ENABLED_FEATURES.tensorrt_rtx:
if torch_tensorrt.ENABLED_FEATURES.qdp_plugin:
torch_tensorrt.dynamo.conversion.plugins.custom_op(
"flashinfer::rmsnorm", supports_dynamic_shapes=True
)
Expand All @@ -37,8 +36,8 @@ def _(input: torch.Tensor, weight: torch.Tensor, b: float = 1e-6) -> torch.Tenso
@unittest.skip("Not Available")
@unittest.skipIf(
not importlib.util.find_spec("flashinfer")
or torch_tensorrt.ENABLED_FEATURES.tensorrt_rtx,
"flashinfer not installed or TensorRT RTX is present",
or not torch_tensorrt.ENABLED_FEATURES.qdp_plugin,
"flashinfer not installed or QDP Plugin is not available",
)
class TestAutomaticPlugin(DispatchTestCase):

Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.10.0a0
2.11.0a0
Loading