How to use TensorRT C++ API for High Performance GPU Inference
A VCV Presentation by Cyrus Behroozi
Code: https://github.com/cyrusbehr/tensorrt-cpp-api
Hi, I’m Cyrus!
What we will go over today
What we will not go over today
Why use TensorRT?
Motivation for making this presentation
TensorRT docs are not user friendly
18 lines of code
5 compiler errors
Installing TensorRT
Set up the CMakeLists.txt to link TensorRT
Note: the above is not a complete CMakeLists.txt file
TensorRT workflow
Implementation overview
Avoid regenerating the engine file when not necessary
Build phase
Build phase 2
Loading the engine from disk
Running inference
NHWC to NCHW conversion
NHWC to NCHW conversion cont.
Running inference cont.
Fin.
Any questions?
Code: https://github.com/cyrusbehr/tensorrt-cpp-api