pytorch / pytorch/TensorRT

✨[Feature] Preserve Higher-Level Operators in Torch-TRT Dynamo Paths

Open
#2,729 1 comment 0 reactions 1 assignee View on GitHub

@bowang007 is already working on this.

Since Jul 30, 2026.

feature request story: Dynamo Frontend & Partitioning
Dominant language
Python
Stars
3k
Forks
410
Avg merge
3d 18h
Merged PRs (30d)
78

Description

Is your feature request related to a problem? Please describe.
In a few cases, torch.nn.Module objects are decomposed by AOT further than desired. For instance, see https://github.com/pytorch/TensorRT/pull/2683#issuecomment-1989788853. In that case, torch.nn.functional.interpolate should be decomposed into aten.upsample_* or left as-is, for direct conversion to TRT.

Describe the solution you'd like
Use a pre-AOT pass to replace such nn operators with a custom op or explicitly exclude these operators from AOT decomposition (needs investigation as to whether this is possible for both Dynamo paths). See the related issues and work below.

Additional context
Related to #1894, #1979

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.