TRTEXEC with Multitask Classification#
The trtexec tool is a command-line wrapper included as part of the TensorRT samples.
Refer to the official TensorRT documentation for instructions on installing or building
trtexec on your target platform (including x86 with discrete GPU and Jetson devices).
This section describes how to generate a TensorRT engine using trtexec, which allows you to deploy TAO-trained
models on TensorRT, Triton, and Deepstream.
Sample Command for a Multitask Classification Model#
To generate an .onnx file for Multitask Classification, refer to the
Multitask Classification documentation.
# Running using INT8
trtexec --onnx=/path/to/model.onnx \
--maxShapes=input_1:16x3x80x60 \
--minShapes=input_1:1x3x80x60 \
--optShapes=input_1:8x3x80x60 \
--calib=/path/to/cal.bin \
--fp16 \
--int8 \
--saveEngine=/path/to/model.plan
# Running using FP16
trtexec --onnx=/path/to/model.onnx \
--maxShapes=input_1:16x3x80x60 \
--minShapes=input_1:1x3x80x60 \
--optShapes=input_1:8x3x80x60 \
--fp16 \
--saveEngine=/path/to/model.plan