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
trtexeccommand-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#
--workspaceflag replaced with--memPoolSize=workspace:<size>--minTimingflag removed (use--avgTiminginstead)
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.
--deployTensorRT 10.x does not support Caffe input, UFF input, and implicit batch dimension mode.
--outputTensorRT 10.x does not support Caffe input, UFF input, and implicit batch dimension mode.
--modelTensorRT 10.x does not support Caffe input, UFF input, and implicit batch dimension mode.
--uffTensorRT 10.x does not support Caffe input, UFF input, and implicit batch dimension mode.
--uffInputTensorRT 10.x does not support Caffe input, UFF input, and implicit batch dimension mode.
--uffNHWCTensorRT 10.x does not support Caffe input, UFF input, and implicit batch dimension mode.
--batchTensorRT 10.x does not support Caffe input, UFF input, and implicit batch dimension mode.
--maxBatchTensorRT 10.x does not support Caffe input, UFF input, and implicit batch dimension mode.
--minTiming--avgTiming--preview=featuresdisableExternalTacticSourcesForCore0805orfasterDynamicShapes0805--workspace=N--memPoolSize=poolspec--explicitPrecisionRemoved
--nativeInstanceNormRemoved
--heuristic--builderOptimizationLevel=<N>(where<N>can be0,1, or2)--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=forceUse
polygraphy surgeon pruneto rewrite the weights to a sparsity pattern and then run--sparsity=enable.--plugins--staticPlugins--preview=profileSharing0806Enabled by default and has no effect.
--profilingVerbosity=default--profilingVerbosity=layer_names_only--profilingVerbosity=verbose--profilingVerbosity=detailed--streams--infStreams--weightless--stripWeights