TRTEXEC with Grounding DINO#

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 Grounding DINO Model#

To generate an .onnx file for Grounding DINO, refer to the Grounding DINO documentation.

trtexec --onnx=/path/to/model.onnx \
        --minShapes=inputs:1x3x544x960,input_ids:1x256,attention_mask:1x256,position_ids:1x256,token_type_ids:1x256,text_token_mask:1x256x256 \
        --optShapes=inputs:8x3x544x960,input_ids:8x256,attention_mask:8x256,position_ids:8x256,token_type_ids:8x256,text_token_mask:8x256x256 \
        --maxShapes=inputs:16x3x544x960,input_ids:16x256,attention_mask:16x256,position_ids:16x256,token_type_ids:16x256,text_token_mask:16x256x256 \
        --fp16 \
        --saveEngine=/path/to/save/trt/model.engine