Repository navigation
[2.15] Bump the ExecuTorch delegate to 0.2.1 and fix the ExecuTorch guide - #4909
Open
shoumikhin wants to merge 5 commits into
Open
shoumikhin wants to merge 5 commits into
shoumikhin wants to merge 5 commits into
Conversation
shoumikhin
force-pushed
the
backport-2.15-4833
branch
from
October 22, 2026 21:26
4a48c93 to
0238526
Compare
shoumikhin
force-pushed
the
backport-2.15-4833
branch
2 times, most recently
from
October 23, 2026 13:34
74dcb90 to
fa1d8a3
Compare
shoumikhin
force-pushed
the
backport-2.15-4833
branch
from
October 24, 2026 03:31
fa1d8a3 to
c386d03
Compare
shoumikhin
force-pushed
the
backport-2.15-4833
branch
2 times, most recently
from
October 25, 2026 05:30
566d13c to
9bac35f
Compare
shoumikhin
force-pushed
the
backport-2.15-4833
branch
from
October 26, 2026 01:34
9bac35f to
1f9a982
Compare
shoumikhin
added a commit
to shoumikhin/TensorRT
that referenced
this pull request
Oct 26, 2026
The install section showed a long command for 2.15 that named the delegate package and four
indexes, and a nightly command with two indexes. Each channel now has one command:
pip install "torch_tensorrt[executorch]"
pip install --pre "torch_tensorrt[executorch]" --index-url https://download.pytorch.org/whl/nightly/cu132
A release from PyPI is built for CUDA 13.2, the CUDA version of PyTorch's own PyPI wheel, and its
executorch extra brings ExecuTorch's CUDA 13.2 build and the delegate. A nightly's extra brings
the matching nightlies from the nightly index.
On Windows, PyPI has only the CPU builds of PyTorch and ExecuTorch, so the release section says to
add the PyTorch CUDA index there.
The pages also said that 2.15 re-exports in save() by default, never replays an engine on the
shared activation scratch, has no Windows delegate, and cannot pass runtime options from Python.
The 2.15 backport (pytorch#4909) brings the save() and replay fixes and the Windows delegate, and the
ExecuTorch release it pins has the Python option API, so those notes go.
The install command test let a docs command that names the delegate skip --pre. Only the old
2.15 command needed that, so the exception and its test cases go. The case that refuses a
nightly command without --pre now uses the guide's --index-url form.
shoumikhin
added a commit
to shoumikhin/TensorRT
that referenced
this pull request
Oct 26, 2026
The install section showed a long command for 2.15 that named the delegate package and four
indexes, and a nightly command with two indexes. Each channel now has one command:
pip install "torch_tensorrt[executorch]"
pip install --pre "torch_tensorrt[executorch]" --index-url https://download.pytorch.org/whl/nightly/cu132
A release from PyPI is built for CUDA 13.2, the CUDA version of PyTorch's own PyPI wheel, and its
executorch extra brings ExecuTorch's CUDA 13.2 build and the delegate. A nightly's extra brings
the matching nightlies from the nightly index.
On Windows, PyPI has only the CPU builds of PyTorch and ExecuTorch, so the release section says to
add the PyTorch CUDA index there.
The pages also said that 2.15 re-exports in save() by default, never replays an engine on the
shared activation scratch, has no Windows delegate, and cannot pass runtime options from Python.
The 2.15 backport (pytorch#4909) brings the save() and replay fixes and the Windows delegate, and the
ExecuTorch release it pins has the Python option API, so those notes go.
The install command test let a docs command that names the delegate skip --pre. Only the old
2.15 command needed that, so the exception and its test cases go. The case that refuses a
nightly command without --pre now uses the guide's --index-url form.
shoumikhin
force-pushed
the
backport-2.15-4833
branch
from
October 26, 2026 05:16
1f9a982 to
4a371d5
Compare
shoumikhin
force-pushed
the
backport-2.15-4833
branch
from
October 26, 2026 18:23
4a371d5 to
17f1243
Compare
lanluo-nvidia
self-requested a review
October 26, 2026 20:24
shoumikhin
force-pushed
the
backport-2.15-4833
branch
from
October 26, 2026 20:48
17f1243 to
9e4cf70
Compare
shoumikhin
added a commit
to shoumikhin/TensorRT
that referenced
this pull request
Oct 26, 2026
The install section showed a long command for 2.15 that named the delegate package and four
indexes, and a nightly command with two indexes. Each channel now has one command:
pip install "torch_tensorrt[executorch]"
pip install --pre "torch_tensorrt[executorch]" --index-url https://download.pytorch.org/whl/nightly/cu132
A release from PyPI is built for CUDA 13.2, the CUDA version of PyTorch's own PyPI wheel, and its
executorch extra brings ExecuTorch's CUDA 13.2 build and the delegate. A nightly's extra brings
the matching nightlies from the nightly index.
On Windows, PyPI has only the CPU builds of PyTorch and ExecuTorch, so the release section says to
add the PyTorch CUDA index there.
The pages also said that 2.15 re-exports in save() by default, never replays an engine on the
shared activation scratch, has no Windows delegate, and cannot pass runtime options from Python.
The 2.15 backport (pytorch#4909) brings the save() and replay fixes and the Windows delegate, and the
ExecuTorch release it pins has the Python option API, so those notes go.
The install command test let a docs command that names the delegate skip --pre. Only the old
2.15 command needed that, so the exception and its test cases go. The case that refuses a
nightly command without --pre now uses the guide's --index-url form.
shoumikhin
force-pushed
the
backport-2.15-4833
branch
from
October 27, 2026 00:30
9e4cf70 to
1c16a74
Compare
shoumikhin
added a commit
to pytorch/executorch
that referenced
this pull request
Oct 27, 2026
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.
shoumikhin
added a commit
to shoumikhin/TensorRT
that referenced
this pull request
Oct 27, 2026
The install section showed a long command for 2.15 that named the delegate package and four
indexes, and a nightly command with two indexes. Each channel now has one command:
pip install "torch_tensorrt[executorch]"
pip install --pre "torch_tensorrt[executorch]" --index-url https://download.pytorch.org/whl/nightly/cu132
A release from PyPI is built for CUDA 13.2, the CUDA version of PyTorch's own PyPI wheel, and its
executorch extra brings ExecuTorch's CUDA 13.2 build and the delegate. A nightly's extra brings
the matching nightlies from the nightly index.
On Windows, PyPI has only the CPU builds of PyTorch and ExecuTorch, so the release section says to
add the PyTorch CUDA index there.
The pages also said that 2.15 re-exports in save() by default, never replays an engine on the
shared activation scratch, has no Windows delegate, and cannot pass runtime options from Python.
The 2.15 backport (pytorch#4909) brings the save() and replay fixes and the Windows delegate, and the
ExecuTorch release it pins has the Python option API, so those notes go.
The install command test let a docs command that names the delegate skip --pre. Only the old
2.15 command needed that, so the exception and its test cases go. The case that refuses a
nightly command without --pre now uses the guide's --index-url form.
Since the pytorch#4821 backport, every .pte saved from this branch stores its engines as named data (blob tag TR03). The 0.2.0 delegate published with the first 2.15.0 release candidate predates that and refuses these files with only "failed to parse TensorRT blob". A delegate rebuilt from this branch at the same version would look identical to pip, so an environment that already has the old one would keep it. Bump the delegate to 0.2.1, so pip sees it as newer than 0.2.0 and replaces the old delegate wherever it installs one. The README's build recipe uses the new version.
The guide on this branch installs a release with one command:
pip install "torch_tensorrt[executorch]"
Once this branch pins an ExecuTorch release, its PyPI wheel's executorch
extra brings ExecuTorch's CUDA 13.2 build and the delegate built for
CUDA 13.2, so naming either in the command would only let them drift
apart. A new test checks that the guide's release install is exactly
this command.
The install command test also gains a case that refuses a command which
names the nightly index without --pre.
The saving section still printed a nightly install command and said the integration supports Linux. On this branch that command takes main's nightly in a fresh environment, and with 2.15 installed it adds ExecuTorch but no delegate, because a release's extra leaves the delegate out. It also disagreed with the guide linked just above it. Replace the platform sentence and the command with a pointer to the guide's Installation section.
The 2.15 guide and the pages it links disagreed with each other and with the code: - The saving section said each delegate of a coalesced program runs on its own CUDA stream, and that a zero-copy TensorRT delegate returns before its engine finishes. Both delegates use the calling thread's default stream, and the TensorRT delegate waits for its work. The section now says so, and names the one case that needs a sync: the CUDA backend running last. - Two pages described an overwritten coalesced weight file differently. Both now say it can give wrong answers or fail to load. - The comparison table said a .pt2 runs on Windows. AOTInductor packaging is Linux only. - The guide promised dynamic shapes in a section that has none, and its example list missed two examples. - A coalesced program's data file is passed when loading from Python, the JetPack build joins the builds without a delegate, and ATen, KV and SM are spelled out. - The saving page's format list no longer calls ExecuTorch output Linux-only. - The guide said a host tensor passed to a device-resident program only costs a copy, and that Python cannot run a program with unplanned outputs. ExecuTorch's Python runtime refuses the host tensor and allocates device memory for unplanned outputs, so the guide and the runtime README now say so. - Two save() error messages said the integration supports only Linux. It supports Windows x86-64 too.
On this branch the guide was picked after the change that stops save() from retracing, so its examples still pass retrace=False and arg_inputs, and the text presents them as two extra arguments save needs. For the ExecuTorch format save() now keeps the compiled graph as it is and needs no example inputs. The examples now use one extra argument, output_format="executorch", as on main. The CUDA graph paragraph also said that engines on the shared activation scratch never replay. With pytorch#4833 they do, each with its own buffers for its inputs and outputs, and they record again when the pool moves to a larger buffer. The paragraph now says so.
shoumikhin
force-pushed
the
backport-2.15-4833
branch
from
October 27, 2026 20:05
1c16a74 to
325a66a
Compare
shoumikhin
added a commit
to shoumikhin/TensorRT
that referenced
this pull request
Oct 27, 2026
The install section showed a long command for 2.15 that named the delegate package and four
indexes. Each channel now has one command:
pip install "torch_tensorrt[executorch]"
pip install --pre "torch_tensorrt[executorch]" --index-url https://download.pytorch.org/whl/nightly/cu132 --extra-index-url https://pypi.org/simple
A release from PyPI is built for CUDA 13.2, the CUDA version of PyTorch's own PyPI wheel, and its
executorch extra brings ExecuTorch's CUDA 13.2 build and the delegate. A nightly's extra brings
the matching nightlies from the nightly index. The nightly command keeps PyPI as a second index,
because TensorRT's wheels and a few other dependencies are only there, the same as the README.
On Windows, PyPI has only the CPU builds of PyTorch and ExecuTorch, so the release section says to
add the PyTorch CUDA index there.
The pages also said that 2.15 re-exports in save() by default, never replays an engine on the
shared activation scratch, has no Windows delegate, and cannot pass runtime options from Python.
The 2.15 backport (pytorch#4909) brings the save() and replay fixes and the Windows delegate, and the
ExecuTorch release it pins has the Python option API, so those notes go.
The install command test let a docs command that names the delegate skip --pre. Only the old
2.15 command needed that, so the exception and its test cases go. The case that refuses a
nightly command without --pre now uses the guide's --index-url form.
shoumikhin
added a commit
to shoumikhin/TensorRT
that referenced
this pull request
Oct 27, 2026
The install section showed a long command for 2.15 that named the delegate package and four
indexes, and a nightly command with two indexes. Each channel now has one command:
pip install "torch_tensorrt[executorch]"
pip install --pre "torch_tensorrt[executorch]" --index-url https://download.pytorch.org/whl/nightly/cu132
A release from PyPI is built for CUDA 13.2, the CUDA version of PyTorch's own PyPI wheel, and its
executorch extra brings ExecuTorch's CUDA 13.2 build and the delegate. A nightly's extra brings
the matching nightlies from the nightly index.
On Windows, PyPI has only the CPU builds of PyTorch and ExecuTorch, so the release section says to
add the PyTorch CUDA index there.
The pages also said that 2.15 re-exports in save() by default, never replays an engine on the
shared activation scratch, has no Windows delegate, and cannot pass runtime options from Python.
The 2.15 backport (pytorch#4909) brings the save() and replay fixes and the Windows delegate, and the
ExecuTorch release it pins has the Python option API, so those notes go.
The install command test let a docs command that names the delegate skip --pre. Only the old
2.15 command needed that, so the exception and its test cases go. The case that refuses a
nightly command without --pre now uses the guide's --index-url form.
shoumikhin
added a commit
to shoumikhin/TensorRT
that referenced
this pull request
Oct 27, 2026
The install section showed a long command for 2.15 that named the delegate package and four
indexes, and a nightly command with two indexes. Each channel now has one command:
pip install "torch_tensorrt[executorch]"
pip install --pre "torch_tensorrt[executorch]" --index-url https://download.pytorch.org/whl/nightly/cu132
A release from PyPI is built for CUDA 13.2, the CUDA version of PyTorch's own PyPI wheel, and its
executorch extra brings ExecuTorch's CUDA 13.2 build and the delegate. A nightly's extra brings
the matching nightlies from the nightly index.
On Windows, PyPI has only the CPU builds of PyTorch and ExecuTorch, so the release section says to
add the PyTorch CUDA index there.
The pages also said that 2.15 re-exports in save() by default, never replays an engine on the
shared activation scratch, has no Windows delegate, and cannot pass runtime options from Python.
The 2.15 backport (pytorch#4909) brings the save() and replay fixes and the Windows delegate, and the
ExecuTorch release it pins has the Python option API, so those notes go.
The install command test let a docs command that names the delegate skip --pre. Only the old
2.15 command needed that, so the exception and its test cases go. The case that refuses a
nightly command without --pre now uses the guide's --index-url form.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is wrong today
The 2.15 branch now has #4919 and the other ExecuTorch changes from
main. Two problems are left:.ptesaved from this branch stores its engines as named data. The 0.2.0 delegate from the first 2.15.0 release candidate cannot read them and fails with only "failed to parse TensorRT blob". A delegate rebuilt at the same version looks the same to pip, so an environment with the old one keeps it.main).What this change does
pip install "torch_tensorrt[executorch]", and a test case that refuses a command naming the nightly index without--pre..ptesaving section at the guide's install commands.save()errors that said only Linux works.retrace=Falseandarg_inputs, whichsave()no longer needs, and it now says engines on the shared activation scratch replay CUDA graphs.What the release command still needs
The guide's one-command release install brings the delegate only after these steps:
Do not promote the first 2.15.0 release candidate: it predates this change.
The nightly index does not carry
dllistor TensorRT, so the nightly command also needs--extra-index-url https://pypi.org/simplefor now.What was tested