Migrating IEngineInspector Usage from TensorRT 10.x to 11.x#
If your application parses the JSON output of
IEngineInspector::getLayerInformation() or
IEngineInspector::getEngineInformation(), the output schema has
changed in TensorRT 11.x. Update your parsing logic as described
below.
For general Engine Inspector usage and API details, refer to the Engine Inspector documentation.
Bindings Field Replaced by I/O Tensors#
The Bindings field, which was a flat list of I/O tensor names as
strings, has been removed. It is replaced by the new I/O Tensors
field, which is a list of JSON objects. Each object contains
structured information about the tensor, including its name, I/O
mode, data type, dimensions, memory location, and whether it is a
shape inference I/O.
Bindings Field Replaced by I/O Tensors (Before / After / Summary)
Before (TensorRT 10.x)
{
"Bindings": [
"input_0",
"output_0"
]
}
After (TensorRT 11.x)
{
"I/O Tensors": [
{
"Name": "input_0",
"IOMode": "Input",
"DataType": "Float",
"Dimensions": [1, 3, 224, 224],
"Location": "Device",
"IsShapeInferenceIO": false,
"ProfileInfo": [
{
"MinShape": [1,3,224,224],
"OptShape": [1,3,224,224],
"MaxShape": [1,3,224,224],
"Format": "Row major linear FP32 format (kLINEAR)"
}]
},
{
"Name": "output_0",
"IOMode": "Output",
"DataType": "Float",
"Dimensions": [1, 1000],
"Location": "Device",
"IsShapeInferenceIO": false,
"ProfileInfo": [
{
"Format": "Row major linear FP32 format (kLINEAR)"
}]
}
]
}
Summary of Changes
Removed the flat
Bindingsstring listAdded structured
I/O Tensorsobjects with name, I/O mode, data type, dimensions, location, shape-inference flag, and profile info
Format / DataType Field Split#
In layer-level information, the combined Format/DataType field has
been removed and replaced with two separate fields: Format and
DataType. This allows you to read the data type directly without
parsing the format string.
Format / DataType Field Split (Before / After / Summary)
Before (TensorRT 10.x)
{
"Name": "Conv_0",
"Inputs": [
{
"Name": "input_0",
"Format/DataType": "Row major linear FP32"
}
]
}
After (TensorRT 11.x)
{
"Name": "Conv_0",
"Inputs": [
{
"Name": "input_0",
"Datatype": "Float",
"Format": "(Linear) Row major linear format"
}
]
}
Summary of Changes
Split combined
Format/DataTypeinto separateDatatypeandFormatfieldsRead the data type directly without parsing the format string