You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d6abe23
Browse filesBrowse the repository at this point in the historyBrowse files
This is a draft because the page describes the intended end state of
Torch-TensorRT 2.15. Some links go to sections of the Torch-TensorRT
guide that exist only after pytorch/TensorRT#4927 merges and its docs
site is rebuilt. And the examples rely on 2.15 changes from
pytorch/TensorRT#4909, such as `torch_tensorrt.save` keeping the
compiled graph by default.
## What is wrong today
The TensorRT backend page has drifted away from Torch-TensorRT, the
project that builds and ships the TensorRT delegate.
- It points readers at a nightly build from early October.
- It says CUDA graph replay never runs for engines on the shared
activation scratch. Newer builds run it.
- It repeats most of the Torch-TensorRT guide, so every delegate change
is made twice.
- The backends table lists TensorRT as Linux only.
The CUDA backend page and the getting started page also disagree with
the TensorRT page and with the code: on outputs kept on the GPU, on what
happens when a planned input gets GPU memory, on CUDA versions, GPUs and
Python versions, and on Windows.
## What this change does
The TensorRT page keeps the usual backend sections, says less in each,
and shows more code:
- Features, target requirements, and development requirements with the
one-line install command.
- Export, including sending the operators TensorRT cannot compile to the
CUDA backend, and keeping inputs and outputs on the GPU.
- Runtime integration from Python, and a complete C++ project with the
commands to build and run it.
- A short list of performance options that link to the Torch-TensorRT
guide.
It describes Torch-TensorRT 2.15 and newer, and marks the two features
that need a newer build.
A second commit fixes the CUDA backend page, the getting started page
and one docstring on the points above. To keep data on the GPU, all
pages now leave inputs and outputs unplanned, which copies the least.
## What was tested
On Linux x86-64 with an H100 GPU, an earlier version of the TensorRT
page was run end to end: every Python block in order with nightly
Torch-TensorRT, and the C++ example built and run against the installed
packages.
With nightly packages, the GPU input and output recipe was run from
Python for both backends, and the CUDA page's C++ lines were built and
run. A profiler showed one GPU copy fewer per Python call than with
planned outputs.
The other fixes were checked only by reading them against the sources.
Windows was not tested.
-**Hardware**: NVIDIA GPU with compute capability 8.0 (Ampere) or newer. This is the floor the
18
+
prebuilt packages are built for.
19
+
-**CUDA**: 13 for the prebuilt packages. On Linux they bring the CUDA runtime with them. On
20
+
Windows it comes from a CUDA 13 toolkit install. A build from source also supports CUDA 12.6.
21
+
-**Operating System**: Linux, or Windows from C++ for programs exported on Linux (see
22
+
[CUDA on Windows](../../using-executorch-cpp.md#cuda-on-windows))
23
+
-**Drivers**: An NVIDIA driver that supports the CUDA version you use: CUDA 13 for the prebuilt
24
+
packages.
21
25
22
26
## Development Requirements
23
27
24
28
To develop and export models using the CUDA backend:
25
29
26
-
-**Python**: Python 3.8+
30
+
-**Python**: Python 3.11 to 3.15
27
31
-**PyTorch**: PyTorch with CUDA support
32
+
-**CUDA Toolkit**: export compiles kernels with `nvcc`, the CUDA compiler, so it needs a CUDA toolkit
28
33
-**ExecuTorch**: Install ExecuTorch with CUDA backend support
29
34
30
35
## Using the CUDA Backend
@@ -83,7 +88,7 @@ For a complete working example, see the [CUDA export script](https://github.com/
83
88
84
89
## Runtime Integration
85
90
86
-
To run the model on device, use the standard ExecuTorch runtime APIs. See [Running on Device](getting-started.md#running-on-device) for more information.
91
+
To run the model on device, use the standard ExecuTorch runtime APIs. See [Running on Device](../../getting-started.md#running-on-device) for more information.
87
92
88
93
When building from source, pass `-DEXECUTORCH_BUILD_CUDA=ON` when configuring the CMake build to compile the CUDA backend.
0 commit comments