Practical overview
When it fits
Use it when an ONNX model needs to be parsed for NVIDIA TensorRT, when a Python workflow needs to prepare and run a TensorRT engine, or when you want to check a model's engine-build path with the documented command-line tools.
Who it is for
- Developers integrating ONNX model parsing into C++ applications.
- Python developers preparing TensorRT engines and running model inference.
- Teams checking ONNX model parsing and engine-build compatibility in a TensorRT environment.
Documented uses
- Parse an ONNX model for execution with TensorRT.
- Prepare a TensorRT engine from an ONNX model and run input data through the Python backend.
- Use trtexec or Polygraphy to check whether a model can be parsed and built into an engine.
- Build the C++ parser libraries and executables from source.
Requirements & limits
The public repository is licensed under Apache-2.0.
- The main branch targets TensorRT 11.4; earlier TensorRT versions have separate branches.
- The documented dependencies include TensorRT 11.4 and CUDA; Protobuf 3.20.3 or later is optional.
- TensorRT 11.4 supports ONNX 1.21.0 according to the README.
- Check the operator support matrix for the ONNX operators used by a model.
- The InstanceNormalization plugin implementation cannot be used to build version-compatible or hardware-compatible engines.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Check whether an ONNX model builds with TensorRT
Use a documented command-line tool to check whether an ONNX file can be parsed and built into a TensorRT engine.
Before you start
- A local ONNX model file.
- A TensorRT environment with either the trtexec binary or the Polygraphy tool available.
Steps
For the C++ tool, run
trtexec --onnx=model.onnx.For the Python tool, run
polygraphy run model.onnx --trt.
Expected outcome
The selected tool attempts to parse the ONNX file and build a TensorRT engine.
Guide limitations
- The README directs users to each tool's help for additional command-line options.
- Supported ONNX operators are listed in the project's operator support matrix.
Build the parser libraries on Linux
Build the ONNX-TensorRT parser libraries and executables from the repository.
Before you start
- A cloned ONNX-TensorRT repository.
- TensorRT 11.4 and its open-source libraries.
- CUDA toolkit; the default lookup path is
/usr/local/cuda. - CMake and Make.
Steps
From the repository, create and enter a build directory with
mkdir build && cd build.Run
cmake .. -DTENSORRT_ROOT= && make -j.Add the built library location to
LD_LIBRARY_PATHusingexport LD_LIBRARY_PATH=$PWD:$LD_LIBRARY_PATH.
Expected outcome
The documented build process produces parser libraries and executables.
Guide limitations
- If CUDA is installed somewhere other than
/usr/local/cuda, the CMake command needs-DCUDA_TOOLKIT_ROOT_DIR=. - The project recommends separate TensorRT repository build instructions for Windows and Docker.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 13 October 2026
- Original website title
- onnx/onnx-tensorrt · Official homepage title · retained in its source language

