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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
# TensorRT OSS Release Changelog
## 11.2 GA - 2026-8-4
- Samples
- Added a new python sample sample_plugin_v2_to_v3_migration to showcase how to migrate from IPluginV2 to IPluginV3.

- Plugins
- 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.

- Parsers
- Added IRefitterObserver class for better refitting of ONNX models.
- Added support for the DFT operator and 5D GridSample operators.

## 11.1 GA - 2026-6-24
- General
- Default CUDA version updated to 13.3.
Expand Down
67 changes: 66 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,15 @@ option(BUILD_PLUGINS "Build TensorRT plugin" ON)
option(BUILD_PARSERS "Build TensorRT parsers" ON)
option(BUILD_SAMPLES "Build TensorRT samples" ON)
option(BUILD_SAFE_SAMPLES "Build TensorRT safety samples" OFF)
option(BUILD_PYTHON "Build TensorRT python bindings" OFF)
option(TRT_SAFETY_INFERENCE_ONLY "Build only the safety inference components (no safety builders)" OFF)
option(TRT_BUILD_TESTING "Build gtests for TensorRT components" OFF)

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

set(TRT_PRODUCT_IS_RTX OFF CACHE INTERNAL "") # TRT-OSS doesn't support TensorRT-RTX

############################################################################################
# Early dependency discovery
# These must be found before they are used in target definitions
Expand Down Expand Up @@ -349,7 +352,16 @@ else()
endif()

find_library_create_target(nvinfer ${nvinfer_lib_name} SHARED "${TRT_LIB_DIR}")
set_property(TARGET nvinfer PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${TRT_INCLUDE_DIR})
# Include the OSS repo headers before the package headers so that impl/ headers
# checked into the repo (e.g. impl/NvInferPythonPlugin.h) take precedence over
# any same-named impl/ files in the downloaded package, which may differ.
set_property(TARGET nvinfer PROPERTY INTERFACE_INCLUDE_DIRECTORIES
"${CMAKE_CURRENT_SOURCE_DIR}/include"
"${TRT_INCLUDE_DIR}")

if(CMAKE_CROSSCOMPILING)
target_link_options(nvinfer INTERFACE "LINKER:--unresolved-symbols=ignore-in-shared-libs")
endif()

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

if(BUILD_PLUGINS)
Expand All @@ -399,6 +412,58 @@ endif()
add_library(tensorrt_headers INTERFACE)
target_include_directories(tensorrt_headers INTERFACE ${TRT_INCLUDE_DIR})

# Python bindings
if(BUILD_PYTHON)
include(FetchContent)
include(Platforms)

# nvonnxparser is always defined (built or imported), regardless of BUILD_PARSERS.
set(TRT_BUILD_ONNX_PARSER ON)
set(TRT_BUILD_PLUGINS ${BUILD_PLUGINS})

if(NOT DEFINED TRT_BUILD_PLATFORM)
set(TRT_BUILD_PLATFORM ${CMAKE_SYSTEM_PROCESSOR})
endif()

# Default to bindings for just the interpreter's Python version; callers
# can still expand by passing -DTRT_BUILD_PYTHON_PY_VERSIONS=...
find_package(Python3 COMPONENTS Interpreter REQUIRED)
set(TRT_BUILD_PYTHON_PY_VERSIONS "${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}"
CACHE STRING "The list of python versions to build TensorRT bindings for.")

# The lean / dispatch bindings link the prebuilt runtime libs. Import them as
# targets the same way nvinfer is imported above so they are always in-graph.
if(MSVC)
set(nvinfer_lean_lib_name "nvinfer_lean_${TRT_SOVERSION}${TRT_LIB_SUFFIX}")
set(nvinfer_dispatch_lib_name "nvinfer_dispatch_${TRT_SOVERSION}${TRT_LIB_SUFFIX}")
else()
set(nvinfer_lean_lib_name "nvinfer_lean")
set(nvinfer_dispatch_lib_name "nvinfer_dispatch")
endif()
find_library_create_target(tensorrt_lean_runtime ${nvinfer_lean_lib_name} SHARED "${TRT_LIB_DIR}")
set_property(TARGET tensorrt_lean_runtime PROPERTY INTERFACE_INCLUDE_DIRECTORIES
"${CMAKE_CURRENT_SOURCE_DIR}/include"
"${TRT_INCLUDE_DIR}")
find_library_create_target(tensorrt_dispatch_runtime ${nvinfer_dispatch_lib_name} SHARED "${TRT_LIB_DIR}")
set_property(TARGET tensorrt_dispatch_runtime PROPERTY INTERFACE_INCLUDE_DIRECTORIES
"${CMAKE_CURRENT_SOURCE_DIR}/include"
"${TRT_INCLUDE_DIR}")

# OSS uses the system Python headers (the Debian/Ubuntu python<ver>-dev layout).
set(TRT_BUILD_PYTHON_EXTERNALS_PATH "/usr/include" CACHE PATH
"Path to the parent folder of the versioned python headers/libs.")

# Variables consumed by python/packaging when building the bindings wheel.
# (TensorRT_VERSION / TensorRT_SOURCE_DIR are provided by project(TensorRT VERSION ...).)
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} TRT_LOWERCASE_CMAKE_SYSTEM_PROCESSOR)
set(TENSORRT_BASE_NAME "nvinfer")
set(TRT_CUDA_VERSION "${CUDAToolkit_VERSION_MAJOR}.${CUDAToolkit_VERSION_MINOR}")
set(TensorRT_PACKAGE_VERSION "${TRT_VERSION}.${TRT_BUILD}")
set(TRT_BUILD_PYTHON_STANDALONE_WHEELS OFF)

add_subdirectory(python)
endif()

# Samples
if(BUILD_SAMPLES OR BUILD_SAFE_SAMPLES)
set(TRT_BUILD_ENABLE_NEW_SAMPLES_FLOW ON)
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ To build the TensorRT-OSS components, you will first need the following software

**TensorRT GA build**

- TensorRT v11.1.0.106
- TensorRT v11.2.1.2
- Available from direct download links listed below

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

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

- [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)
- [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)
- [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)
- [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)
- [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)
- [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)
- [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)
- [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)

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

```bash
cd ~/Downloads
tar --zstd -xvf TensorRT-Enterprise-11.1.0.106-Linux-x86_64-cuda-13.3-Release-external.tar.zst
export TRT_LIBPATH=`pwd`/TensorRT-11.1.0.106/lib
tar --zstd -xvf TensorRT-Enterprise-11.2.1.2-Linux-x86_64-cuda-13.3-Release-external.tar.zst
export TRT_LIBPATH=`pwd`/TensorRT-11.2.1.2/lib
```

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

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

## Setting Up The Build Environment
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11.1.0.106
11.2.1.2
1 change: 1 addition & 0 deletions cmake/modules/FetchCCCL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ set(CCCL_TAG "v3.4.0-rc0" CACHE STRING "The commit hash to FetchContent_Declare
# We use this directory to ensure we only fetch a single copy of dependencies, even between builds.
# $HOME/storage is expected to be mounted from the host for developers.
set(TRT_THIRD_PARTY_DL_DIR "$ENV{HOME}/storage" CACHE PATH "Directory to download third party dependencies to")
file(TO_CMAKE_PATH "${TRT_THIRD_PARTY_DL_DIR}" TRT_THIRD_PARTY_DL_DIR)

FetchContent_Declare(
cccl
Expand Down
41 changes: 41 additions & 0 deletions cmake/modules/FetchPyBind11.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


include_guard()

# 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:
set(_pybind11_default_repo "https://github.com/pybind/pybind11.git")


set(PYBIND11_REPO ${_pybind11_default_repo} CACHE STRING "The base project URL to FetchContent_Declare for pybind11" )
set(PYBIND11_TAG "v3.0.1" CACHE STRING "The commit hash to FetchContent_Declare for pybind11")

# We use this directory to ensure we only fetch a single copy of dependencies, even between builds.
# $HOME/storage is expected to be mounted from the host for developers.
set(TRT_THIRD_PARTY_DL_DIR "$ENV{HOME}/storage" CACHE PATH "Directory to download third party dependencies to")
file(TO_CMAKE_PATH "${TRT_THIRD_PARTY_DL_DIR}" TRT_THIRD_PARTY_DL_DIR)

FetchContent_Declare(
pybind11
PREFIX "${CMAKE_BINARY_DIR}/third_party/pybind11"
GIT_REPOSITORY ${PYBIND11_REPO}
GIT_TAG ${PYBIND11_TAG}
GIT_SHALLOW TRUE
SOURCE_DIR "${TRT_THIRD_PARTY_DL_DIR}/pybind11/${PYBIND11_TAG}"
EXCLUDE_FROM_ALL
UPDATE_DISCONNECTED ${TRT_FETCH_CONTENT_UPDATES_DISCONNECTED}
OVERRIDE_FIND_PACKAGE # ONNX is going to try and look for pybind11, so we redirect it to here.
)
FetchContent_MakeAvailable(pybind11)
24 changes: 24 additions & 0 deletions cmake/modules/FlagToInt.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# \brief Converts a truthy flag (usually a boolean) to an integer (0 or 1).
# \param flagName The name of the flag to convert.
# \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.
function(flagToInt flagName)
if(${${flagName}})
set(${flagName}_INT 1 PARENT_SCOPE)
else()
set(${flagName}_INT 0 PARENT_SCOPE)
endif()
endfunction()
4 changes: 2 additions & 2 deletions cmake/modules/WindowsLibSuffixes.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -31,7 +31,7 @@ function(update_windows_output_name target_name major_version minor_version)
set(tgt_output_name ${target_name})
endif()

if(${TRT_BUILD_WINML})
if(${TRT_PRODUCT_IS_RTX})
set(tgt_output_name "${tgt_output_name}_${major_version}_${minor_version}")
else()
set(tgt_output_name "${tgt_output_name}_${major_version}")
Expand Down
2 changes: 1 addition & 1 deletion demo/Diffusion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This demo application ("demoDiffusion") showcases the acceleration of Stable Dif
### Clone the TensorRT OSS repository

```bash
git clone git@github.com:NVIDIA/TensorRT.git -b release/11.0 --single-branch
git clone git@github.com:NVIDIA/TensorRT.git
cd TensorRT
```

Expand Down
Loading
Loading