Skip to content

Conversation

@zgjja
Copy link
Contributor

@zgjja zgjja commented Jan 15, 2026

Commit Log

Major Update: Unified TensorRT Support & Refactors

  • Upgraded 8 models in this repo to support TensorRT SDK versions from 7.2.2+ to 10.14.x+.
  • For models with 3-channel input image, default to running inference with real image inputs to simplify debugging.
  • Refactored internal components like utils.h to improve readability.
  • add some basic TensorRT SDKs version verification code
  • add 2 ways of preprocessing input logic: cpu(Opencv), gpu(TensorRT SDK), enable gpu by default for TensorRT > 8.5.1
  • use a new way to handle input and output tensor, so as to make all subprojects can use the same doInference() logic with ease
  • add gen_wts.py into some model, using the models downloaded from torchvision or transformers
  • update all cmake scripts with Modern CMake style, isolating find TensorRT SDK logic into a separate cmake file for code reuse
  • update all coresponding README
  • create assets and models folder for easier management and move exising assets into them

Breaking change

  • TensorRT < 7.2.2 are fully DEPRECATED
  • TensorRT < 8 for sm80+ gpus are not supported (missing some ops)
  • Opencv is now required to compile these demos

Note

  • TensorRT 8.x are not fully tested yet
  • FindTensorRT.cmake is not tested on Windows and ARM platform yet

Test Result

The refactored codebase is fully tested on RTX3090Ti and RTX4080 GPU, with TensorRT 7.2.2 SDK and 10.13.3 SDK respectively, meaning that some of limitations of TensorRT 8~9 SDK may not be fully covered or considered.

Here are the serialization and inference logs for all refactored subprojects:

  1. RTX3090Ti with TensorRT 7.2.2 SDK
    rtx3090ti-trt7.2.2.zip
    2026-01-15 add: googlenet and lprnet log show error in this file, I have fixed it.

  2. RTX4080 with TensorRT 10.9.0 SDK
    rtx4080-trt10.9.0.zip

@mpj1234
Copy link
Collaborator

mpj1234 commented Jan 15, 2026

You need to run the pre-commit first, then modify the format, and then conduct a new pr.

@mpj1234
Copy link
Collaborator

mpj1234 commented Jan 15, 2026

Please submit one model at a time. If it is TensorRT10 version, it needs to be submitted to trt10 branch, and the master branch is TensorRT8.

@zgjja zgjja force-pushed the master branch 2 times, most recently from 06e9647 to ef01527 Compare January 15, 2026 13:30
@zgjja
Copy link
Contributor Author

zgjja commented Jan 15, 2026

@mpj1234

  1. pre-commit all done, also fix the pre-commit issue trying to fix C++ code with python style.
  2. this PR aiming to add a solution for compatibility among TensorRT SDK 7.2.2+~10.x+, so master branch is reasonable to me
  3. though multiple demos are committed, no interference among the codes in each sub-folder, so i want the commit graph clean

@mpj1234
Copy link
Collaborator

mpj1234 commented Jan 19, 2026

Think you. Excuse me, are you compatible with TRT8 and TRT10 according to TensorRT version?

@zgjja
Copy link
Contributor Author

zgjja commented Jan 19, 2026

@mpj1234
yes, but i only tested on TRT 7.2.2 and TRT 10.9.0. For 7.x and 8.x version, using newest minor version is advised (e.g. 7.2.2, 8.6.1, etc)

@mpj1234
Copy link
Collaborator

mpj1234 commented Jan 19, 2026

Have you tested TRT 8.6.1 and TRT10.9.0?

@zgjja
Copy link
Contributor Author

zgjja commented Jan 20, 2026

10.9 is already tested above, now 8.6.1 added

rtx3090-trt8.6.1.zip

@mpj1234
Copy link
Collaborator

mpj1234 commented Jan 20, 2026

Thank you very much.

@mpj1234 mpj1234 merged commit 3276610 into wang-xinyu:master Jan 20, 2026
1 check 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