Skip to main content
TensorRT provides the fastest GR00T inference by compiling the DiT action head to GPU-specific optimized kernels. This guide covers the complete workflow from ONNX export to TensorRT inference.

Performance gains

TensorRT delivers significant speedups across all GPU platforms:

Prerequisites

Installation

Install TensorRT dependencies:
This installs:
  • ONNX export tools
  • TensorRT Python bindings
  • Additional optimization libraries

Hardware requirements

  • CUDA-enabled GPU with 8GB+ VRAM (recommended)
  • Compatible CUDA version (12.4 recommended, 11.8 also supported)
  • Sufficient disk space (~2GB for engine cache)

Complete workflow

ONNX export options

The export_onnx_n1d6.py script supports these arguments:

Example: Export for custom embodiment

TensorRT engine build options

The build_tensorrt_engine.py script provides fine-grained control:

Precision modes

Best balance of speed and accuracy:

FP16

Higher numerical precision:

FP32

Full precision (slowest):

FP8

Maximum speed (requires Ada Lovelace or newer):
FP8 requires RTX 40-series or newer GPUs. Verify your GPU supports FP8 before using this mode.

Workspace size

Increase workspace for complex models or reduce for memory-constrained environments:

Inference script arguments

Key arguments for standalone_inference_script.py:

Performance tuning

Denoising steps

Fewer denoising steps = faster inference, but may reduce action quality:

Benchmark engine performance

Measure TensorRT speedup on your hardware:
Output includes component-wise timing:

Platform-specific notes

Jetson platforms (Thor, Orin)

Experiments on Thor used CUDA 13, PyTorch 2.9 from Jetson AI Lab cu130 index. Orin used CUDA 12.6, PyTorch 2.8 from Jetson AI Lab cu126 index.
Optimize workspace for embedded GPUs:

RTX 5090

RTX 5090 tested with CUDA 12.8, flash-attn==2.8.0.post2, pytorch-cu128. Requires uv v0.8.4+.
Leverage large VRAM for maximum workspace:

Troubleshooting

Engine build fails

Symptoms: Build crashes or fails during optimization Solutions:
  1. Reduce workspace size:
  2. Verify GPU memory:
  3. Check TensorRT version matches CUDA:

ONNX export issues

Symptoms: Export fails with shape mismatch errors Solutions:
  1. Verify model loads in PyTorch:
  2. Check dataset path contains valid trajectories:

Engine not portable between GPUs

TensorRT engines are GPU-specific. An engine built on RTX 4090 will not work on H100. Rebuild the engine on each target platform.
Solution: Build separate engines for each GPU architecture:

Slow first inference

Symptoms: First inference takes much longer than subsequent ones Expected behavior: TensorRT engines have warmup overhead Solution: Add warmup iterations:

Out of memory during build

Symptoms: CUDA out of memory error during engine compilation Solutions:
  1. Reduce workspace:
  2. Close other GPU processes:
  3. Use FP32 instead of FP16/BF16 (uses less memory during build):

Architecture details

TensorRT optimizes only the DiT action head:
The backbone (vision encoder + language model) remains in PyTorch, while the action head runs in TensorRT for maximum performance.

Advanced configuration

Custom layer precision

Override precision for specific layers (requires editing build script):

DLA acceleration (Jetson)

Offload layers to Deep Learning Accelerator on Jetson:

Dynamic shapes

For variable batch sizes or action horizons, configure dynamic shapes during export (requires code modification).