Skip to content

[Relax][TensorRT] Add partition_for_tensorrt and a pattern table - #19820

Merged
MasterJH5574 merged 1 commit into
apache:mainfrom
tlopex:partition-for-tensorrt
Jun 18, 2026
Merged

[Relax][TensorRT] Add partition_for_tensorrt and a pattern table#19820
MasterJH5574 merged 1 commit into
apache:mainfrom
tlopex:partition-for-tensorrt

Conversation

@tlopex

@tlopex tlopex commented Jun 17, 2026

Copy link
Copy Markdown
Member

This pr is the follow-up pr to #19810 Add partition_for_tensorrt, which offloads TensorRT-supported subgraphs from a module with a single call, together with the pattern table whose composite names ("tensorrt.") match the runtime converter registry. This is the entry point other BYOC backends expose as partition_for_.

Tests: an end-to-end test that partition_for_tensorrt offloads a conv2d -> relu subgraph and that the result matches the LLVM reference; validated on local gpu.

Add partition_for_tensorrt, which offloads TensorRT-supported subgraphs from a
module with a single call, together with the pattern table whose composite names
("tensorrt.<op>") match the runtime converter registry (the converters landed in
apache#19810). This is the entry point other BYOC backends expose as partition_for_<name>.

Tests: an end-to-end test that partition_for_tensorrt offloads a conv2d -> relu
subgraph and that the result matches the LLVM reference; validated on RTX 2070 and
RTX 5090.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the pattern table and partitioning logic for the TensorRT BYOC backend in TVM Relax, including the partition_for_tensorrt function to offload supported subgraphs. It also adds an end-to-end test verifying the partitioning of a conv2d -> relu subgraph. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@tlopex

tlopex commented Jun 17, 2026

Copy link
Copy Markdown
Member Author

@tvm-bot rerun

@MasterJH5574
MasterJH5574 merged commit b7807db into apache:main Jun 18, 2026
11 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants