Skip to content

chore: Implement FindTensorRT module with component support#42

Open
matiaslin wants to merge 2 commits intoNVIDIA:mainfrom
matiaslin:find_tensorrt_dependency_discovery
Open

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

Conversation

@matiaslin
Copy link

@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

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>
Copy link

@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

@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
Collaborator

LGTM also.

@matiaslin
Copy link
Author

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

@nvluxiaoz
Copy link
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
Author

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

Signed-off-by: matiaslin <45382001+matiaslin@users.noreply.github.com>
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