Appendix: 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.

Migrating --workspace and --minTiming Options#

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

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
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 flags listed below have been removed in TensorRT 10.x. Using them will cause trtexec to exit with an error. Review each entry for its replacement before upgrading.

Removed Flag

Replacement

--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 (no replacement).

--nativeInstanceNorm

Removed (no replacement).

--heuristic

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

--buildOnly

--skipInference

--nvtxMode

--profilingVerbosity

Deprecated trtexec Flags and Replacements#

The following trtexec flags have been deprecated. Each entry shows the deprecated flag and its replacement.

Deprecated Flag

Replacement

--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