Skip to content

fix(executorch): require the delegate only where its ExecuTorch build is published, and fix the install advice - #4919

Merged
lanluo-nvidia merged 4 commits into
pytorch:mainfrom
shoumikhin:executorch-companion-nightly-only
Oct 27, 2026
Merged

lanluo-nvidia merged 4 commits into
pytorch:mainfrom
shoumikhin:executorch-companion-nightly-only

Conversation

@shoumikhin

@shoumikhin shoumikhin commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

What is wrong today

A published wheel's executorch extra requires the delegate package, torch-tensorrt-executorch-runtime, and the delegate pins one exact ExecuTorch build. If the wheel's index lacks either, pip does not fail. It quietly installs another torch-tensorrt without the delegate.

What this change does

  1. The extra requires the delegate only where its ExecuTorch build is published:

    • a nightly whose pin is an ExecuTorch nightly,
    • a release candidate whose pin is an ExecuTorch release,
    • a Linux PyPI wheel whose pin is an ExecuTorch release.

    For 2.15 on Linux, PyPI gets the CUDA 13.2 builds of PyTorch and ExecuTorch, so it must get the cu132 Torch-TensorRT and delegate wheels too, or one install mixes CUDA versions. The release workflows still build cu132 and cu134; the release checklist says to upload the cu132 wheels to PyPI. PyPI's Windows ExecuTorch is a CPU build, so the Windows PyPI wheel leaves the delegate out and builds none.

  2. The error messages name the installed version, the recorded delegate, and indexes that have both: the nightly index for a nightly, the test index for a release candidate, and the stable index for a PyPI release.

  3. Build jobs also search the test index for a release pin.

  4. The guide shows one install command per channel, and the runtime README links to it.

Docs describe the end state; still needed

What was tested

  • Unit tests run the real setup.py blocks, workflow steps and release matrix script. Each changed check fails a test when reverted. Only the nightly case runs in pull request CI.
  • Linux aarch64: the published nightly (built before this change) installed matching nightlies, and a small model ran through the delegate and matched PyTorch.
  • With stand-in wheels on local indexes, the command resolves to torch-tensorrt 2.15.0, delegate 0.2.1 and ExecuTorch 1.6.0.
  • Not tested: a real release, and Windows.

@meta-cla meta-cla Bot added the cla signed label Oct 22, 2026
@github-actions github-actions Bot added documentation Improvements or additions to documentation component: tests Issues re: Tests component: build system Issues re: Build system component: api [Python] Issues re: Python API labels Oct 22, 2026
@shoumikhin
shoumikhin force-pushed the executorch-companion-nightly-only branch from 1c5efa5 to ebcd2ca Compare October 22, 2026 20:11
@shoumikhin

Copy link
Copy Markdown
Contributor Author

@lanluo-nvidia @narendasan could you take a look when you have a moment?

@shoumikhin
shoumikhin force-pushed the executorch-companion-nightly-only branch 2 times, most recently from 51f3eb3 to 3b3a5a6 Compare October 23, 2026 13:34
shoumikhin added a commit to shoumikhin/TensorRT that referenced this pull request Oct 23, 2026
…els, and fix the install advice (pytorch#4919)

Backports pytorch#4919. With pytorch#4882 alone, every wheel built on this branch
would require its exact delegate companion from the executorch extra.
This branch builds only release candidates and releases. A release
candidate is copied to the stable index without its companion, and PyPI
can hold only one companion build, for one CUDA version. pip does not
fail on an extra it cannot meet: it quietly installs torch-tensorrt
2.14 instead.

- Only nightly wheels now require the companion. Release candidates and
  releases record its version for the error messages only.
- A companion built for PyPI requires the CUDA build of ExecuTorch again,
  with its label. PyPI's ExecuTorch is a CPU build without the CUDA
  library the delegate links.
- The install guide names the companion for a release at this branch's
  version (0.2.*), from the test index that keeps it, plus the nightly
  index that carries the development ExecuTorch build it pins. If either
  is missing, pip now fails instead of installing an older release.
- The delegate advice names the test index for any build but a nightly,
  and on Windows the CPU nightly index that carries torchao.
- Stale comments and test messages are updated, and new tests check the
  guide's release command and run the real version-file reader.
shoumikhin added a commit to shoumikhin/TensorRT that referenced this pull request Oct 24, 2026
… is on the same index, and fix the install advice (pytorch#4919)

Backports pytorch#4919. With pytorch#4882 alone, every wheel built on this branch
requires its exact delegate companion from the executorch extra. pip can
install that only where the wheel's index also has the ExecuTorch build
the companion pins. When it cannot, pip does not fail: it quietly
installs an older torch-tensorrt.

- The extra requires the companion only for a nightly wheel pinning a
  development ExecuTorch build, or a release candidate pinning an
  ExecuTorch release. The jobs that build and test the companion install
  the pin from both the nightly and the test index, and the Linux device
  job checks the rule.
- A companion built for PyPI requires the CUDA build of ExecuTorch, with
  its label. PyPI's ExecuTorch is a CPU build the delegate cannot load.
- The error messages name the installed version, the wheel's CUDA
  channel and the indexes that have the companion and its ExecuTorch.
  The message for a build without a companion points to the instructions
  for building one.
- The companion README's nightly command gains --upgrade, and the guide
  and README explain the Windows nightly install.

Differences from main: this branch still pins a development ExecuTorch
build, so its release candidates do not require the companion. The
install guide names it at this branch's version (0.2.*) with the test and
nightly indexes, plus the CPU nightly index on Windows. Tests check that
command and allow it without --pre; one fails once the pin becomes a
release, when the guide should switch to main's command.
@shoumikhin
shoumikhin force-pushed the executorch-companion-nightly-only branch from 3b3a5a6 to 4cb2098 Compare October 24, 2026 03:31
shoumikhin added a commit to shoumikhin/TensorRT that referenced this pull request Oct 24, 2026
… is on the same index, and fix the install advice (pytorch#4919)

Backports pytorch#4919. With pytorch#4882 alone, every wheel published from this
branch requires its exact delegate companion from the executorch extra.
pip can meet that requirement only where the wheel's index also has the
ExecuTorch build the companion pins. When it cannot, pip does not fail:
it quietly installs an older torch-tensorrt.

- The extra requires the companion only for a nightly wheel pinning a
  development ExecuTorch build, or a release candidate pinning an
  ExecuTorch release. The jobs that build and test the companion install
  the pin from both the nightly and the test index, and the Linux device
  job checks the rule.
- A companion built for PyPI requires the CUDA build of ExecuTorch, with
  its label. PyPI's ExecuTorch is a CPU build the delegate cannot load.
- The error messages name the installed version, the wheel's CUDA
  channel and the indexes that have the companion and its ExecuTorch.
  The message for a build without a companion points to the instructions
  for building one.
- The companion README's nightly command gains --upgrade, and the guide
  and README explain the Windows nightly install.

Differences from main: this branch still pins a development ExecuTorch
build, so its release candidates do not require the companion. The
install guide names it at this branch's version (0.2.*) with the test and
nightly indexes, plus the CPU nightly index on Windows. Tests check that
command and allow it without --pre; one fails once the pin becomes a
release, when the guide should switch to main's command.
@shoumikhin shoumikhin changed the title fix(executorch): require the delegate companion only from nightly wheels, and fix the install advice fix(executorch): require the delegate only where its ExecuTorch build is on the same index, and fix the install advice Oct 24, 2026
@shoumikhin
shoumikhin force-pushed the executorch-companion-nightly-only branch from 4cb2098 to 9b9dead Compare October 24, 2026 23:02
@shoumikhin shoumikhin changed the title fix(executorch): require the delegate only where its ExecuTorch build is on the same index, and fix the install advice fix(executorch): require the delegate only from nightly wheels, and fix the install advice Oct 24, 2026
shoumikhin added a commit to shoumikhin/TensorRT that referenced this pull request Oct 24, 2026
…ix the install advice (pytorch#4919)

Backports pytorch#4919. With pytorch#4882 alone, every wheel published from this
branch requires its exact delegate companion from the executorch extra.
pip can meet that requirement only where the wheel's index also has the
companion and the ExecuTorch build it pins. When it cannot, pip does not
fail: it quietly installs another torch-tensorrt.

- The extra requires the companion only for a nightly wheel pinning a
  development ExecuTorch build. Promotion copies a release candidate to
  the stable index without its companion, so releases leave it out. The
  jobs that build and test the companion install the pin from both the
  nightly and the test index, and the Linux device job checks the rule.
  The README's build-time install of the pin names the test index too.
- A companion built for PyPI requires the CUDA build of ExecuTorch, with
  its label. PyPI's ExecuTorch is a CPU build the delegate cannot load.
- The error messages name the installed version, the recorded companion,
  the wheel's CUDA channel and the indexes that have the companion and
  its ExecuTorch. The message for a build without a companion points to
  the instructions for building one.
- The companion README's nightly command gains --upgrade, and the guide
  and README explain the Windows nightly install.
- The companion README says which wheels bring it, and no longer says
  pip fails without NVIDIA's index (TensorRT's PyPI source package
  downloads NVIDIA's wheel itself, only more slowly).

Differences from main: the install guide names the companion at this
branch's version (0.2.*) with the test and nightly indexes, plus the CPU
nightly index on Windows, because a release's extra leaves it out. Tests
check that command and allow it without --pre; one fails once the pin
becomes an ExecuTorch release, when the command has to take ExecuTorch
from the test index instead.
@shoumikhin
shoumikhin force-pushed the executorch-companion-nightly-only branch from 9b9dead to 7b26a19 Compare October 25, 2026 05:30
shoumikhin added a commit to shoumikhin/TensorRT that referenced this pull request Oct 25, 2026
… is published, and fix the install advice (pytorch#4919)

Backports pytorch#4919. With pytorch#4882 alone, every wheel published from this
branch requires its exact delegate companion from the executorch extra.
pip can meet that requirement only where the wheel comes from a place
that also has the companion and the ExecuTorch build it pins. When it
cannot, pip does not fail: it quietly installs another torch-tensorrt.

- The extra requires the companion only where its ExecuTorch build is
  published: a nightly pinning a development build, or a release
  candidate or Linux PyPI wheel pinning an ExecuTorch release. On Linux,
  PyPI gets ExecuTorch's CUDA build for the CUDA version of PyTorch's
  PyPI wheel, so the PyPI release wheels, companion included, are built
  for that one CUDA version (13.2). PyPI's Windows PyTorch and ExecuTorch
  are CPU builds, so the Windows PyPI wheel leaves the companion out.
  While this branch pins a development build, its release candidates and
  PyPI wheels leave the companion out; once it pins an ExecuTorch
  release, they require it.
- The workflows record the channel for every build except a Windows
  PyPI wheel, and pypi for a Linux one. The jobs that build and test the companion install the
  pin from both the nightly and the test index, and the Linux device job
  checks the rule.
- The error messages name the installed version, the recorded companion,
  the wheel's CUDA channel and the indexes that have the companion and
  its ExecuTorch. The message for a build without a companion points to
  the instructions for building one.
- The release checklist says to publish ExecuTorch and the companion
  before torch-tensorrt, on the stable index and on PyPI.
- The companion README's nightly command gains --upgrade, and the guide
  and README explain the Windows nightly install. The README no longer
  says pip fails without NVIDIA's index (TensorRT's PyPI source package
  downloads NVIDIA's wheel itself, only more slowly).

Differences from main: the install guide names the companion at this
branch's version with the test and nightly indexes (plus the CPU nightly
index on Windows), because this branch still pins a development
ExecuTorch build, and a test checks that command. A later commit on this
branch replaces both with the one-command install.
@shoumikhin shoumikhin changed the title fix(executorch): require the delegate only from nightly wheels, and fix the install advice fix(executorch): require the delegate only where its ExecuTorch build is published, and fix the install advice Oct 25, 2026
@shoumikhin
shoumikhin force-pushed the executorch-companion-nightly-only branch from 7b26a19 to 82c73eb Compare October 26, 2026 01:34
shoumikhin added a commit to shoumikhin/TensorRT that referenced this pull request Oct 26, 2026
… is published, and fix the install advice (pytorch#4919)

Backports pytorch#4919. With pytorch#4882 alone, every wheel published from this
branch requires its exact delegate companion from the executorch extra.
pip can meet that requirement only where the wheel comes from a place
that also has the companion and the ExecuTorch build it pins. When it
cannot, pip does not fail: it quietly installs another torch-tensorrt.

- The extra requires the companion only where its ExecuTorch build is
  published: a nightly pinning a development build, or a release
  candidate or Linux PyPI wheel pinning an ExecuTorch release. On Linux,
  PyPI gets ExecuTorch's CUDA build for the CUDA version of PyTorch's
  PyPI wheel, so the PyPI release wheels, companion included, are built
  for that one CUDA version (13.2). PyPI's Windows PyTorch and ExecuTorch
  are CPU builds, so the Windows PyPI wheel leaves the companion out.
  While this branch pins a development build, its release candidates and
  PyPI wheels leave the companion out; once it pins an ExecuTorch
  release, they require it.
- The workflows record the channel for every build except a Windows
  PyPI wheel, and pypi for a Linux one. The jobs that build and test the companion install the
  pin from both the nightly and the test index, and the Linux device job
  checks the rule.
- The error messages name the installed version, the recorded companion,
  the wheel's CUDA channel and the indexes that have the companion and
  its ExecuTorch. The message for a build without a companion points to
  the instructions for building one.
- The release checklist starts with pinning an ExecuTorch release, then
  says to publish ExecuTorch and the companion before torch-tensorrt, on
  the stable index and on PyPI. A Windows release wheel's job no longer
  builds a companion, since PyPI's Windows ExecuTorch cannot load it.
- The companion README's nightly command gains --upgrade, and the guide
  and README explain the Windows nightly install. The README no longer
  says pip fails without NVIDIA's index (TensorRT's PyPI source package
  downloads NVIDIA's wheel itself, only more slowly).

Differences from main: the install guide names the companion at this
branch's version with the test and nightly indexes (plus the CPU nightly
index on Windows), because this branch still pins a development
ExecuTorch build, and a test checks that command. A later commit on this
branch replaces both with the one-command install.
@shoumikhin
shoumikhin force-pushed the executorch-companion-nightly-only branch from 82c73eb to 87fd824 Compare October 26, 2026 05:16
shoumikhin added a commit to shoumikhin/TensorRT that referenced this pull request Oct 26, 2026
… is published, and fix the install advice (pytorch#4919)

Backports pytorch#4919. With pytorch#4882 alone, every wheel published from this
branch requires its exact delegate companion from the executorch extra.
pip can meet that requirement only where the wheel comes from a place
that also has the companion and the ExecuTorch build it pins. When it
cannot, pip does not fail: it quietly installs another torch-tensorrt.

- The extra requires the companion only where its ExecuTorch build is
  published: a nightly pinning a development build, or a release
  candidate or Linux PyPI wheel pinning an ExecuTorch release. On Linux,
  PyPI gets ExecuTorch's CUDA build for the CUDA version of PyTorch's
  PyPI wheel, so the PyPI release wheels, companion included, are built
  for that one CUDA version (13.2). PyPI's Windows PyTorch and ExecuTorch
  are CPU builds, so the Windows PyPI wheel leaves the companion out.
  While this branch pins a development build, its release candidates and
  PyPI wheels leave the companion out; once it pins an ExecuTorch
  release, they require it.
- The workflows record the channel for every build except a Windows
  PyPI wheel, and pypi for a Linux one. The jobs that build and test the companion install the
  pin from both the nightly and the test index, and the Linux device job
  checks the rule.
- The error messages name the installed version, the recorded companion,
  the wheel's CUDA channel and the indexes that have the companion and
  its ExecuTorch: for a PyPI wheel the stable index, with no CPU nightly
  index on Windows. The message for a build without a companion points
  to the instructions for building one.
- The release checklist starts with pinning an ExecuTorch release, then
  says to publish ExecuTorch and the companion before torch-tensorrt, on
  the stable index and on PyPI. A Windows release wheel's job no longer
  builds a companion, since PyPI's Windows ExecuTorch cannot load it.
- The companion README's nightly command gains --upgrade, and the guide
  and README explain the Windows nightly install. The README no longer
  says pip fails without NVIDIA's index (TensorRT's PyPI source package
  downloads NVIDIA's wheel itself, only more slowly).

Differences from main: the install guide names the companion at this
branch's version with the test and nightly indexes (plus the CPU nightly
index on Windows), because this branch still pins a development
ExecuTorch build, and a test checks that command. A later commit on this
branch replaces both with the one-command install.
@github-actions
github-actions Bot requested a review from narendasan October 26, 2026 17:40
shoumikhin added a commit to shoumikhin/TensorRT that referenced this pull request Oct 26, 2026
… is published, and fix the install advice (pytorch#4919)

Backports pytorch#4919. With pytorch#4882 alone, every wheel published from this
branch requires its exact delegate companion from the executorch extra.
pip can meet that requirement only where the wheel comes from a place
that also has the companion and the ExecuTorch build it pins. When it
cannot, pip does not fail: it quietly installs another torch-tensorrt.

- The extra requires the companion only where its ExecuTorch build is
  published: a nightly pinning a development build, or a release
  candidate or Linux PyPI wheel pinning an ExecuTorch release. On Linux,
  PyPI gets ExecuTorch's CUDA build for the CUDA version of PyTorch's
  PyPI wheel, so the PyPI release wheels, companion included, are built
  for that one CUDA version (13.2). PyPI's Windows PyTorch and ExecuTorch
  are CPU builds, so the Windows PyPI wheel leaves the companion out.
  While this branch pins a development build, its release candidates and
  PyPI wheels leave the companion out; once it pins an ExecuTorch
  release, they require it.
- The workflows record the channel for every build except a Windows
  PyPI wheel, and pypi for a Linux one. The jobs that build and test the companion install the
  pin from both the nightly and the test index, and the Linux device job
  checks the rule.
- The error messages name the installed version, the recorded companion,
  the wheel's CUDA channel and the indexes that have the companion and
  its ExecuTorch: for a PyPI wheel the stable index, with no CPU nightly
  index on Windows. The message for a build without a companion points
  to the instructions for building one.
- The release checklist starts with pinning an ExecuTorch release, then
  says to publish ExecuTorch and the companion before torch-tensorrt, on
  the stable index and on PyPI. A Windows release wheel's job no longer
  builds a companion, since PyPI's Windows ExecuTorch cannot load it.
- The companion README's nightly command gains --upgrade, and the guide
  and README explain the Windows nightly install. The README no longer
  says pip fails without NVIDIA's index (TensorRT's PyPI source package
  downloads NVIDIA's wheel itself, only more slowly).

Differences from main: the install guide names the companion at this
branch's version with the test and nightly indexes (plus the CPU nightly
index on Windows), because this branch still pins a development
ExecuTorch build, and a test checks that command. A later commit on this
branch replaces both with the one-command install.
# The release wheels go to PyPI, which holds one file per name, so they are built only for the
# CUDA version of PyTorch's own PyPI wheel. The ExecuTorch delegate built here pins ExecuTorch's
# build for that CUDA version. Tarballs follow the CUDA rows in filter-matrix.py.
"wheel": ["cu132"],

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

our generate-release-matrix.py is for generate the one for both pypi and github release stuff, so it is for both cu132 and cu134, and for pypi we upload cu134, for github release we upload both cu132 and cu134

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, you are right: the script feeds more than PyPI, so it should not drop cu134. I put the matrix back, so the release workflows build cu132 and cu134 again, as they do on main. I will make the same change in #4909.

What I would change is which build goes to PyPI. A plain pip install "torch_tensorrt[executorch]" takes torch and executorch from PyPI. For 2.15, torch there will be the CUDA 13.2 build (pytorch/test-infra#9195), and pytorch/test-infra#9215 stages ExecuTorch's CUDA 13.2 build the same way. If Torch-TensorRT and the delegate on PyPI are cu134, one install mixes CUDA 13.2 and 13.4. So the release checklist now says to upload the cu132 wheels to PyPI. cu134 users still get cu134 from the PyTorch index.

Does that work for your release process?

shoumikhin added a commit to shoumikhin/TensorRT that referenced this pull request Oct 26, 2026
… is published, and fix the install advice (pytorch#4919)

Backports pytorch#4919. With pytorch#4882 alone, every wheel published from this
branch requires its exact delegate companion from the executorch extra.
pip can meet that requirement only where the wheel comes from a place
that also has the companion and the ExecuTorch build it pins. When it
cannot, pip does not fail: it quietly installs another torch-tensorrt.

- The extra requires the companion only where its ExecuTorch build is
  published: a nightly pinning a development build, or a release
  candidate or Linux PyPI wheel pinning an ExecuTorch release. On Linux,
  PyPI gets ExecuTorch's CUDA build for the CUDA version of PyTorch's
  PyPI wheel, so the PyPI release wheels, companion included, are built
  for that one CUDA version (13.2). PyPI's Windows PyTorch and ExecuTorch
  are CPU builds, so the Windows PyPI wheel leaves the companion out.
  While this branch pins a development build, its release candidates and
  PyPI wheels leave the companion out; once it pins an ExecuTorch
  release, they require it.
- The workflows record the channel for every build except a Windows
  PyPI wheel, and pypi for a Linux one. The jobs that build and test the companion install the
  pin from both the nightly and the test index, and the Linux device job
  checks the rule.
- The error messages name the installed version, the recorded companion,
  the wheel's CUDA channel and the indexes that have the companion and
  its ExecuTorch: for a PyPI wheel the stable index, with no CPU nightly
  index on Windows. The message for a build without a companion points
  to the instructions for building one.
- The release checklist starts with pinning an ExecuTorch release, then
  says to publish ExecuTorch and the companion before torch-tensorrt, on
  the stable index and on PyPI. A Windows release wheel's job no longer
  builds a companion, since PyPI's Windows ExecuTorch cannot load it.
- The companion README's nightly command gains --upgrade, and the guide
  and README explain the Windows nightly install. The README no longer
  says pip fails without NVIDIA's index (TensorRT's PyPI source package
  downloads NVIDIA's wheel itself, only more slowly).

Differences from main: the install guide names the companion at this
branch's version with the test and nightly indexes (plus the CPU nightly
index on Windows), because this branch still pins a development
ExecuTorch build, and a test checks that command. A later commit on this
branch replaces both with the one-command install.
… is published

Every published wheel's executorch extra requires the delegate built beside it, and the
delegate pins one exact ExecuTorch build. pip can meet the extra only if the place the wheel
comes from also has that build and the delegate. Otherwise it does not fail: it quietly
installs another torch-tensorrt, for example PyPI's wheel of the same version, which brings no
delegate.

So the extra now requires the delegate only where its ExecuTorch build is published:

- a nightly wheel whose pin is a development build (the nightly index has it),
- a release candidate whose pin is an ExecuTorch release (the test index has it),
- a Linux PyPI wheel whose pin is an ExecuTorch release. On Linux, PyPI gets ExecuTorch's CUDA
  build for the CUDA version of PyTorch's own PyPI wheel, 13.2. The release workflows still
  build every wheel for CUDA 13.2 and 13.4, and the checklist now says PyPI gets the 13.2
  wheels, delegate included, so all of them agree. PyPI's Windows PyTorch
  and ExecuTorch are CPU builds, so the Windows PyPI wheel leaves the delegate out.

The build workflows record the channel for every build except a Windows PyPI wheel, and `pypi`
for a Linux one.
After promotion to the stable index, the extra stays installable only if ExecuTorch and the
delegate get there before torch-tensorrt. The release checklist now says so, for the stable index
and for PyPI.

The jobs that build and test the delegate install the pin from both the nightly and the test
index, so they keep working once the pin is an ExecuTorch release, and the Linux device job
checks the rule. The guide and the delegate README say which wheels bring the delegate, and the
README's nightly command gains --upgrade, so an older nightly does not stay installed. The
README's build-time install of the pin names the test index too, and the README no longer says
pip fails without NVIDIA's index: TensorRT's PyPI source package downloads NVIDIA's wheel
itself, only more slowly.

Tested with the packaging unit tests, which run the setup.py blocks and the workflow steps.
Each changed check fails a test when it is reverted.
…e and its ExecuTorch

The error messages for a missing ExecuTorch or a missing delegate named only the nightly index,
or the stable index, which does not get a release candidate's delegate today. The ExecuTorch
advice also asked for the extra without a version, so pip could replace the installed wheel.

The build now records which channel has the pinned ExecuTorch, beside the delegate's channel.
The advice names the installed version, the recorded delegate (so a wheel whose extra leaves it
out still gets the ExecuTorch build it pins), the wheel's own CUDA channel and those indexes,
plus, on Windows, the CPU nightly index for a nightly ExecuTorch, whose torchao is only there.
For a PyPI wheel it names the test index, which keeps the delegate for every CUDA version. The
message for a build without a delegate now says which wheels have one and where to read how to
build it. The guide points to the advice, and it and the delegate README tell Windows users of
the nightly to install PyTorch first and then add that index, so pip does not take PyTorch's
CPU build from it.

The guide no longer says PyPI has only a CPU build of ExecuTorch: on Linux it has the CUDA 13.2
build. The guide and the delegate README list the wheels whose extra brings the delegate, and the
release checklist starts with pinning an ExecuTorch release, names the file in pytorch/test-infra
that holds the delegate's release version, and says the dry-run check is for Linux. A Windows
release wheel's job no longer builds a delegate wheel, since PyPI's Windows ExecuTorch cannot
load it; the version is still recorded for the install advice.

Tested with unit tests that run the advice helpers against recorded build fields.
… steps

The guide and the delegate README listed which wheels bring the delegate, and added steps that
only cover packages missing from an index: PyPI and NVIDIA's index next to the nightly index, and
on Windows a PyTorch install first plus the CPU nightly index for torchao. The install advice in
the error messages added that CPU index on Windows too; it no longer does, and a test checks that.

Each channel now has one command, describing how the install is meant to work:

    pip install "torch_tensorrt[executorch]"
    pip install --pre "torch_tensorrt[executorch]" --index-url https://download.pytorch.org/whl/nightly/cu132

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 README's table of versions measured in September goes too.
When a PyPI wheel cannot load its delegate, the error message named PyTorch's test index for the
delegate and its ExecuTorch release. The guide installs a release from PyPI, and the stable index
keeps the release's delegate and the ExecuTorch release it pins for every CUDA version, so the
advice for a PyPI wheel now names the stable index:

    pip install --pre "torch_tensorrt[executorch]==2.15.0" "torch-tensorrt-executorch-runtime==0.2.1" --extra-index-url https://download.pytorch.org/whl/cu132

A wheel from the PyTorch indexes records the test channel, as a release candidate and after
promotion alike, so its advice still names the test index, which keeps it.
@shoumikhin
shoumikhin force-pushed the executorch-companion-nightly-only branch from 87fd824 to cbd950c Compare October 26, 2026 22:09
shoumikhin added a commit to shoumikhin/TensorRT that referenced this pull request Oct 27, 2026
… is published, and fix the install advice (pytorch#4919)

Backports pytorch#4919. With pytorch#4882 alone, every wheel published from this
branch requires its exact delegate companion from the executorch extra.
pip can meet that requirement only where the wheel comes from a place
that also has the companion and the ExecuTorch build it pins. When it
cannot, pip does not fail: it quietly installs another torch-tensorrt.

- The extra requires the companion only where its ExecuTorch build is
  published: a nightly pinning a development build, or a release
  candidate or Linux PyPI wheel pinning an ExecuTorch release. On Linux,
  PyPI gets ExecuTorch's CUDA build for the CUDA version of PyTorch's
  PyPI wheel, 13.2. The release workflows still build every wheel for
  CUDA 13.2 and 13.4, and the checklist now says PyPI gets the 13.2
  wheels, companion included. PyPI's Windows PyTorch and ExecuTorch
  are CPU builds, so the Windows PyPI wheel leaves the companion out.
  While this branch pins a development build, its release candidates and
  PyPI wheels leave the companion out; once it pins an ExecuTorch
  release, they require it.
- The workflows record the channel for every build except a Windows
  PyPI wheel, and pypi for a Linux one. The jobs that build and test the companion install the
  pin from both the nightly and the test index, and the Linux device job
  checks the rule.
- The error messages name the installed version, the recorded companion,
  the wheel's CUDA channel and the indexes that have the companion and
  its ExecuTorch: for a PyPI wheel the stable index, with no CPU nightly
  index on Windows. The message for a build without a companion points
  to the instructions for building one.
- The release checklist starts with pinning an ExecuTorch release, then
  says to publish ExecuTorch and the companion before torch-tensorrt, on
  the stable index and on PyPI. A Windows release wheel's job no longer
  builds a companion, since PyPI's Windows ExecuTorch cannot load it.
- The companion README's nightly command gains --upgrade, and the guide
  and README explain the Windows nightly install. The README no longer
  says pip fails without NVIDIA's index (TensorRT's PyPI source package
  downloads NVIDIA's wheel itself, only more slowly).

Differences from main: the install guide names the companion at this
branch's version with the test and nightly indexes (plus the CPU nightly
index on Windows), because this branch still pins a development
ExecuTorch build, and a test checks that command. A later commit on this
branch replaces both with the one-command install.

@lanluo-nvidia lanluo-nvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@lanluo-nvidia
lanluo-nvidia merged commit 98c5726 into pytorch:main Oct 27, 2026
205 of 213 checks passed
lanluo-nvidia pushed a commit that referenced this pull request Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci: full cla signed component: api [Python] Issues re: Python API component: build system Issues re: Build system component: tests Issues re: Tests documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants