EngineInspector
- class tensorrt.EngineInspector
An engine inspector which prints out the layer information of an engine or an execution context. The engine or the context must be set before get_layer_information() or get_engine_information() can be called.
The amount of printed information depends on the profiling verbosity setting of the builder config when the engine is built. By default, the profiling verbosity is set to ProfilingVerbosity.LAYER_NAMES_ONLY, and only layer names will be printed. If the profiling verbosity is set to ProfilingVerbosity.DETAILED, layer names and layer parameters will be printed. If the profiling verbosity is set to ProfilingVerbosity.NONE, no layer information will be printed.
- Variables
engine –
ICudaEngine
Set or get the engine currently being inspected.context –
IExecutionContext
Set or get context currently being inspected.error_recorder –
IErrorRecorder
Application-implemented error reporting interface for TensorRT objects.
- __init__(*args, **kwargs)
- get_engine_information(self: tensorrt.tensorrt.EngineInspector, format: tensorrt.tensorrt.LayerInformationFormat) str
Get a string describing the information about all the layers in the current engine or the execution context.
- Parameters
format –
LayerInformationFormat
The format the layer information should be printed in.- Returns
A string describing the information about all the layers in the current engine or the execution context.
- get_layer_information(self: tensorrt.tensorrt.EngineInspector, layer_index: int, format: tensorrt.tensorrt.LayerInformationFormat) str
Get a string describing the information about a specific layer in the current engine or the execution context.
- Parameters
layer_index – The index of the layer. It must lie in [0, engine.num_layers].
format –
LayerInformationFormat
The format the layer information should be printed in.
- Returns
A string describing the information about a specific layer in the current engine or the execution context.