Skip to content

Commit 1dade06

Browse files
authored
TensorRT 11.2 OSS Release (#4823)
Signed-off-by: Kevin Chen <kevinch@nvidia.com>
1 parent a892d22 commit 1dade06

133 files changed

Lines changed: 8338 additions & 775 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
# TensorRT OSS Release Changelog
2+
## 11.2 GA - 2026-8-4
3+
- Samples
4+
- Added a new python sample sample_plugin_v2_to_v3_migration to showcase how to migrate from IPluginV2 to IPluginV3.
5+
6+
- Plugins
7+
- Added a new FFTPlugin, a cuFFT-backed plugin for complex-to-complex, real-to-complex, and complex-to-real transforms, to support the ONNX DFT operator.
8+
9+
- Parsers
10+
- Added IRefitterObserver class for better refitting of ONNX models.
11+
- Added support for the DFT operator and 5D GridSample operators.
12+
213
## 11.1 GA - 2026-6-24
314
- General
415
- Default CUDA version updated to 13.3.

CMakeLists.txt

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,15 @@ option(BUILD_PLUGINS "Build TensorRT plugin" ON)
139139
option(BUILD_PARSERS "Build TensorRT parsers" ON)
140140
option(BUILD_SAMPLES "Build TensorRT samples" ON)
141141
option(BUILD_SAFE_SAMPLES "Build TensorRT safety samples" OFF)
142+
option(BUILD_PYTHON "Build TensorRT python bindings" OFF)
142143
option(TRT_SAFETY_INFERENCE_ONLY "Build only the safety inference components (no safety builders)" OFF)
143144
option(TRT_BUILD_TESTING "Build gtests for TensorRT components" OFF)
144145

145146
# Must be set before add_subdirectory(plugin); the option() below is gated on BUILD_SAMPLES.
146147
set(TRT_BUILD_WINML OFF)
147148

149+
set(TRT_PRODUCT_IS_RTX OFF CACHE INTERNAL "") # TRT-OSS doesn't support TensorRT-RTX
150+
148151
############################################################################################
149152
# Early dependency discovery
150153
# These must be found before they are used in target definitions
@@ -349,7 +352,16 @@ else()
349352
endif()
350353

351354
find_library_create_target(nvinfer ${nvinfer_lib_name} SHARED "${TRT_LIB_DIR}")
352-
set_property(TARGET nvinfer PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${TRT_INCLUDE_DIR})
355+
# Include the OSS repo headers before the package headers so that impl/ headers
356+
# checked into the repo (e.g. impl/NvInferPythonPlugin.h) take precedence over
357+
# any same-named impl/ files in the downloaded package, which may differ.
358+
set_property(TARGET nvinfer PROPERTY INTERFACE_INCLUDE_DIRECTORIES
359+
"${CMAKE_CURRENT_SOURCE_DIR}/include"
360+
"${TRT_INCLUDE_DIR}")
361+
362+
if(CMAKE_CROSSCOMPILING)
363+
target_link_options(nvinfer INTERFACE "LINKER:--unresolved-symbols=ignore-in-shared-libs")
364+
endif()
353365

354366
# tensorrt is aliased downstream; CMake forbids aliasing an alias.
355367
add_library(tensorrt INTERFACE IMPORTED)
@@ -378,6 +390,7 @@ set(HINT_PATHS "${TRT_OUT_DIR}" "${TRT_LIB_DIR}")
378390
if(NOT TARGET trt_global_definitions)
379391
add_library(trt_global_definitions INTERFACE)
380392
target_include_directories(trt_global_definitions INTERFACE ${CUDAToolkit_INCLUDE_DIRS})
393+
target_compile_definitions(trt_global_definitions INTERFACE TRT_BUILD_ONNX_PARSER=1)
381394
endif()
382395

383396
if(BUILD_PLUGINS)
@@ -399,6 +412,58 @@ endif()
399412
add_library(tensorrt_headers INTERFACE)
400413
target_include_directories(tensorrt_headers INTERFACE ${TRT_INCLUDE_DIR})
401414

415+
# Python bindings
416+
if(BUILD_PYTHON)
417+
include(FetchContent)
418+
include(Platforms)
419+
420+
# nvonnxparser is always defined (built or imported), regardless of BUILD_PARSERS.
421+
set(TRT_BUILD_ONNX_PARSER ON)
422+
set(TRT_BUILD_PLUGINS ${BUILD_PLUGINS})
423+
424+
if(NOT DEFINED TRT_BUILD_PLATFORM)
425+
set(TRT_BUILD_PLATFORM ${CMAKE_SYSTEM_PROCESSOR})
426+
endif()
427+
428+
# Default to bindings for just the interpreter's Python version; callers
429+
# can still expand by passing -DTRT_BUILD_PYTHON_PY_VERSIONS=...
430+
find_package(Python3 COMPONENTS Interpreter REQUIRED)
431+
set(TRT_BUILD_PYTHON_PY_VERSIONS "${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}"
432+
CACHE STRING "The list of python versions to build TensorRT bindings for.")
433+
434+
# The lean / dispatch bindings link the prebuilt runtime libs. Import them as
435+
# targets the same way nvinfer is imported above so they are always in-graph.
436+
if(MSVC)
437+
set(nvinfer_lean_lib_name "nvinfer_lean_${TRT_SOVERSION}${TRT_LIB_SUFFIX}")
438+
set(nvinfer_dispatch_lib_name "nvinfer_dispatch_${TRT_SOVERSION}${TRT_LIB_SUFFIX}")
439+
else()
440+
set(nvinfer_lean_lib_name "nvinfer_lean")
441+
set(nvinfer_dispatch_lib_name "nvinfer_dispatch")
442+
endif()
443+
find_library_create_target(tensorrt_lean_runtime ${nvinfer_lean_lib_name} SHARED "${TRT_LIB_DIR}")
444+
set_property(TARGET tensorrt_lean_runtime PROPERTY INTERFACE_INCLUDE_DIRECTORIES
445+
"${CMAKE_CURRENT_SOURCE_DIR}/include"
446+
"${TRT_INCLUDE_DIR}")
447+
find_library_create_target(tensorrt_dispatch_runtime ${nvinfer_dispatch_lib_name} SHARED "${TRT_LIB_DIR}")
448+
set_property(TARGET tensorrt_dispatch_runtime PROPERTY INTERFACE_INCLUDE_DIRECTORIES
449+
"${CMAKE_CURRENT_SOURCE_DIR}/include"
450+
"${TRT_INCLUDE_DIR}")
451+
452+
# OSS uses the system Python headers (the Debian/Ubuntu python<ver>-dev layout).
453+
set(TRT_BUILD_PYTHON_EXTERNALS_PATH "/usr/include" CACHE PATH
454+
"Path to the parent folder of the versioned python headers/libs.")
455+
456+
# Variables consumed by python/packaging when building the bindings wheel.
457+
# (TensorRT_VERSION / TensorRT_SOURCE_DIR are provided by project(TensorRT VERSION ...).)
458+
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} TRT_LOWERCASE_CMAKE_SYSTEM_PROCESSOR)
459+
set(TENSORRT_BASE_NAME "nvinfer")
460+
set(TRT_CUDA_VERSION "${CUDAToolkit_VERSION_MAJOR}.${CUDAToolkit_VERSION_MINOR}")
461+
set(TensorRT_PACKAGE_VERSION "${TRT_VERSION}.${TRT_BUILD}")
462+
set(TRT_BUILD_PYTHON_STANDALONE_WHEELS OFF)
463+
464+
add_subdirectory(python)
465+
endif()
466+
402467
# Samples
403468
if(BUILD_SAMPLES OR BUILD_SAFE_SAMPLES)
404469
set(TRT_BUILD_ENABLE_NEW_SAMPLES_FLOW ON)

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ To build the TensorRT-OSS components, you will first need the following software
4848

4949
**TensorRT GA build**
5050

51-
- TensorRT v11.1.0.106
51+
- TensorRT v11.2.1.2
5252
- Available from direct download links listed below
5353

5454
**System Packages**
@@ -103,24 +103,24 @@ To build the TensorRT-OSS components, you will first need the following software
103103

104104
Else download and extract the TensorRT GA build from [NVIDIA Developer Zone](https://developer.nvidia.com) with the direct links below:
105105

106-
- [TensorRT 11.1.0.106 for CUDA 13.3, Linux x86_64](https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/11.1.0/tars/TensorRT-Enterprise-11.1.0.106-Linux-x86_64-cuda-13.3-Release-external.tar.zst)
107-
- [TensorRT 11.1.0.106 for CUDA 12.9, Linux x86_64](https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/11.1.0/tars/TensorRT-Enterprise-11.1.0.106-Linux-x86_64-cuda-12.9-Release-external.tar.zst)
108-
- [TensorRT 11.1.0.106 for CUDA 13.3, Windows x86_64](https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/11.1.0/zip/TensorRT-Enterprise-11.1.0.106-Windows-amd64-cuda-13.3-Release-external.zip)
109-
- [TensorRT 11.1.0.106 for CUDA 12.9, Windows x86_64](https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/11.1.0/zip/TensorRT-Enterprise-11.1.0.106-Windows-amd64-cuda-12.9-Release-external.zip)
106+
- [TensorRT 11.2.1.2 for CUDA 13.3, Linux x86_64](https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/11.2.1/tars/TensorRT-Enterprise-11.2.1.2-Linux-x86_64-cuda-13.3-Release-external.tar.zst)
107+
- [TensorRT 11.2.1.2 for CUDA 12.9, Linux x86_64](https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/11.2.1/tars/TensorRT-Enterprise-11.2.1.2-Linux-x86_64-cuda-12.9-Release-external.tar.zst)
108+
- [TensorRT 11.2.1.2 for CUDA 13.3, Windows x86_64](https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/11.2.1/zip/TensorRT-Enterprise-11.2.1.2-Windows-amd64-cuda-13.3-Release-external.zip)
109+
- [TensorRT 11.2.1.2 for CUDA 12.9, Windows x86_64](https://developer.nvidia.com/downloads/compute/machine-learning/tensorrt/11.2.1/zip/TensorRT-Enterprise-11.2.1.2-Windows-amd64-cuda-12.9-Release-external.zip)
110110

111111
**Example: Ubuntu 22.04 on x86-64 with cuda-13.3**
112112

113113
```bash
114114
cd ~/Downloads
115-
tar --zstd -xvf TensorRT-Enterprise-11.1.0.106-Linux-x86_64-cuda-13.3-Release-external.tar.zst
116-
export TRT_LIBPATH=`pwd`/TensorRT-11.1.0.106/lib
115+
tar --zstd -xvf TensorRT-Enterprise-11.2.1.2-Linux-x86_64-cuda-13.3-Release-external.tar.zst
116+
export TRT_LIBPATH=`pwd`/TensorRT-11.2.1.2/lib
117117
```
118118

119119
**Example: Windows on x86-64 with cuda-12.9**
120120

121121
```powershell
122-
Expand-Archive -Path TensorRT-Enterprise-11.1.0.106-Windows-amd64-cuda-12.9-Release-external.zip
123-
$env:TRT_LIBPATH="$pwd\TensorRT-11.1.0.106\lib"
122+
Expand-Archive -Path TensorRT-Enterprise-11.2.1.2-Windows-amd64-cuda-12.9-Release-external.zip
123+
$env:TRT_LIBPATH="$pwd\TensorRT-11.2.1.2\lib"
124124
```
125125

126126
## Setting Up The Build Environment

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
11.1.0.106
1+
11.2.1.2

cmake/modules/FetchCCCL.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ set(CCCL_TAG "v3.4.0-rc0" CACHE STRING "The commit hash to FetchContent_Declare
2424
# We use this directory to ensure we only fetch a single copy of dependencies, even between builds.
2525
# $HOME/storage is expected to be mounted from the host for developers.
2626
set(TRT_THIRD_PARTY_DL_DIR "$ENV{HOME}/storage" CACHE PATH "Directory to download third party dependencies to")
27+
file(TO_CMAKE_PATH "${TRT_THIRD_PARTY_DL_DIR}" TRT_THIRD_PARTY_DL_DIR)
2728

2829
FetchContent_Declare(
2930
cccl

cmake/modules/FetchPyBind11.cmake

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
16+
include_guard()
17+
18+
# This is set and immediately overwritten intentionally. It's here to document the public repo, and to provide the boilerplate we'd use if we ever ship it publicly:
19+
set(_pybind11_default_repo "https://github.com/pybind/pybind11.git")
20+
21+
22+
set(PYBIND11_REPO ${_pybind11_default_repo} CACHE STRING "The base project URL to FetchContent_Declare for pybind11" )
23+
set(PYBIND11_TAG "v3.0.1" CACHE STRING "The commit hash to FetchContent_Declare for pybind11")
24+
25+
# We use this directory to ensure we only fetch a single copy of dependencies, even between builds.
26+
# $HOME/storage is expected to be mounted from the host for developers.
27+
set(TRT_THIRD_PARTY_DL_DIR "$ENV{HOME}/storage" CACHE PATH "Directory to download third party dependencies to")
28+
file(TO_CMAKE_PATH "${TRT_THIRD_PARTY_DL_DIR}" TRT_THIRD_PARTY_DL_DIR)
29+
30+
FetchContent_Declare(
31+
pybind11
32+
PREFIX "${CMAKE_BINARY_DIR}/third_party/pybind11"
33+
GIT_REPOSITORY ${PYBIND11_REPO}
34+
GIT_TAG ${PYBIND11_TAG}
35+
GIT_SHALLOW TRUE
36+
SOURCE_DIR "${TRT_THIRD_PARTY_DL_DIR}/pybind11/${PYBIND11_TAG}"
37+
EXCLUDE_FROM_ALL
38+
UPDATE_DISCONNECTED ${TRT_FETCH_CONTENT_UPDATES_DISCONNECTED}
39+
OVERRIDE_FIND_PACKAGE # ONNX is going to try and look for pybind11, so we redirect it to here.
40+
)
41+
FetchContent_MakeAvailable(pybind11)

cmake/modules/FlagToInt.cmake

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# \brief Converts a truthy flag (usually a boolean) to an integer (0 or 1).
16+
# \param flagName The name of the flag to convert.
17+
# \return A CMake variable with the same name as the flag, but suffixed with "_INT" containing 1 if the flag was true and 0 otherwise.
18+
function(flagToInt flagName)
19+
if(${${flagName}})
20+
set(${flagName}_INT 1 PARENT_SCOPE)
21+
else()
22+
set(${flagName}_INT 0 PARENT_SCOPE)
23+
endif()
24+
endfunction()

cmake/modules/WindowsLibSuffixes.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -31,7 +31,7 @@ function(update_windows_output_name target_name major_version minor_version)
3131
set(tgt_output_name ${target_name})
3232
endif()
3333

34-
if(${TRT_BUILD_WINML})
34+
if(${TRT_PRODUCT_IS_RTX})
3535
set(tgt_output_name "${tgt_output_name}_${major_version}_${minor_version}")
3636
else()
3737
set(tgt_output_name "${tgt_output_name}_${major_version}")

demo/Diffusion/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This demo application ("demoDiffusion") showcases the acceleration of Stable Dif
77
### Clone the TensorRT OSS repository
88

99
```bash
10-
git clone git@github.com:NVIDIA/TensorRT.git -b release/11.0 --single-branch
10+
git clone git@github.com:NVIDIA/TensorRT.git
1111
cd TensorRT
1212
```
1313

0 commit comments

Comments
 (0)