Skip to content

chore: Implement FindTensorRT module with component support#42

Closed
matiaslin wants to merge 1 commit intoNVIDIA:mainfrom
matiaslin:find_tensorrt_dependency_discovery
Closed

chore: Implement FindTensorRT module with component support#42
matiaslin wants to merge 1 commit intoNVIDIA:mainfrom
matiaslin:find_tensorrt_dependency_discovery

Conversation

@matiaslin
Copy link
Copy Markdown

@matiaslin matiaslin commented Mar 2, 2026

Summary

What does this PR do?

We modernize the TensorRT discovery logic by implementing a FindTensorRT.cmake module. This replaces the manual and fragmented include dirs and library discovery code with a standardized find_package pattern.

Usage

find_package(TensorRT REQUIRED COMPONENTS OnnxParser)

Checklist

  • Make sure you read and follow Contributor guidelines and your commits are signed.
  • Is this change backward compatible?: Yes
  • Did you add or update any necessary documentation?: Yes

Comment thread CMakeLists.txt
Comment thread CMakeLists.txt
Comment thread CMakeLists.txt
Copy link
Copy Markdown

@WilliamTambellini WilliamTambellini left a comment

Choose a reason for hiding this comment

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

nit

Copy link
Copy Markdown

@fkaster-nvidia fkaster-nvidia left a comment

Choose a reason for hiding this comment

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

LGTM

@nvluxiaoz nvluxiaoz requested a review from fans-nv March 3, 2026 20:26
@nvluxiaoz
Copy link
Copy Markdown
Collaborator

LGTM also.

@matiaslin
Copy link
Copy Markdown
Author

Thank you all for the reviews! @nvluxiaoz, any updates on merging this PR? Thank you.

@nvluxiaoz
Copy link
Copy Markdown
Collaborator

We are in the process of merging it into Edge-LLM's internal CI. Expect to show up in the next 1 or 2 releases. Thanks a lot for the contribution!

@matiaslin
Copy link
Copy Markdown
Author

Sounds good. Thank you for the update and for the reviews!

Standardized TensorRT discovery by replacing manual
header/library path checks with a find_package pattern.
Implemented component handling to allow surgical linking of the
ONNX parser.
Updated documentation to clarify that TRT_PACKAGE_DIR is now a
hint.

Signed-off-by: malin <matiasenoclin@gmail.com>
Signed-off-by: matiaslin <matiasenoclin@gmail.com>
@matiaslin matiaslin force-pushed the find_tensorrt_dependency_discovery branch from 698439f to 3aec2e1 Compare April 20, 2026 16:51
@matiaslin
Copy link
Copy Markdown
Author

Just rebased and resolved merge conflicts to make this PR ready for merge.
Thank you.

@nvluxiaoz
Copy link
Copy Markdown
Collaborator

This MR is included in https://github.com/NVIDIA/TensorRT-Edge-LLM/tree/release/0.7.0. Closing this as merged. Thanks!

@nvluxiaoz nvluxiaoz closed this Apr 28, 2026
@matiaslin
Copy link
Copy Markdown
Author

Thank you @nvluxiaoz for merging!

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.

Implement FindTensorRT.cmake module for standardized dependency discovery.

4 participants