Migrating trtexec Usage from TensorRT 8.x to 10.x#

This page describes how to update trtexec usage when migrating from TensorRT 8.x to 10.x: before/after command examples and lists of removed or deprecated options.

See also

Migration Guide Overview

Landing page with links to all migration surfaces.

trtexec Reference

Full trtexec command-line reference.

Migrating --workspace and --minTiming Options#

The examples below show TensorRT 8.x first, then TensorRT 10.x, for the same trtexec invocation pattern.

Before (TensorRT 8.x)#

1trtexec \
2    --onnx=/path/to/model.onnx \
3    --saveEngine=/path/to/engine.trt \
4    --optShapes=input:$INPUT_SHAPE \
5
6    --workspace=1024 \
7    --minTiming=1

After (TensorRT 10.x)#

1trtexec \
2    --onnx=/path/to/model.onnx \
3    --saveEngine=/path/to/engine.trt \
4    --optShapes=input:$INPUT_SHAPE \
5
6    --memPoolSize=workspace:1024

Summary of Changes#

  • --workspace flag replaced with --memPoolSize=workspace:<size>

  • --minTiming flag removed (use --avgTiming instead)

Removed trtexec Flags and Replacements#

Warning

The following trtexec flags have been removed in TensorRT 10.x and will cause errors if used. Update your scripts to use the replacements listed below.

--deploy

TensorRT 10.x does not support Caffe input, UFF input, and implicit batch dimension mode.

--output

TensorRT 10.x does not support Caffe input, UFF input, and implicit batch dimension mode.

--model

TensorRT 10.x does not support Caffe input, UFF input, and implicit batch dimension mode.

--uff

TensorRT 10.x does not support Caffe input, UFF input, and implicit batch dimension mode.

--uffInput

TensorRT 10.x does not support Caffe input, UFF input, and implicit batch dimension mode.

--uffNHWC

TensorRT 10.x does not support Caffe input, UFF input, and implicit batch dimension mode.

--batch

TensorRT 10.x does not support Caffe input, UFF input, and implicit batch dimension mode.

--maxBatch

TensorRT 10.x does not support Caffe input, UFF input, and implicit batch dimension mode.

--minTiming

--avgTiming

--preview=features

disableExternalTacticSourcesForCore0805 or fasterDynamicShapes0805

--workspace=N

--memPoolSize=poolspec

--explicitPrecision

Removed

--nativeInstanceNorm

Removed

--heuristic

--builderOptimizationLevel=<N> (where <N> can be 0, 1, or 2)

--buildOnly

--skipInference

--nvtxMode

--profilingVerbosity

Deprecated trtexec Flags and Replacements#

Note

The following trtexec flags are deprecated and will be removed in a future release. Migrate to the replacements listed below.

--sparsity=force

Use polygraphy surgeon prune to rewrite the weights to a sparsity pattern and then run --sparsity=enable.

--plugins

--staticPlugins

--preview=profileSharing0806

Enabled by default and has no effect.

--profilingVerbosity=default

--profilingVerbosity=layer_names_only

--profilingVerbosity=verbose

--profilingVerbosity=detailed

--streams

--infStreams

--weightless

--stripWeights