Profiler¶
-
class
tensorrt.
Profiler
(self: tensorrt.tensorrt.Profiler) → None¶ When this class is added to an
IExecutionContext
, the profiler will be called once per layer for each invocation ofIExecutionContext.execute()
. Note thatIExecutionContext.execute_async()
does not currently support profiling.The profiler will only be called after execution is complete. It has a small impact on execution time.
-
report_layer_time
(self: tensorrt.tensorrt.Profiler, layer_name: str, ms: float) → None¶ Reports time in milliseconds for each layer. This function should be overloaded by classes derived from IProfiler.
Parameters: - layer_name – The name of the layer, set when constructing the
INetworkDefinition
. - ms – The time in milliseconds to execute the layer.
- layer_name – The name of the layer, set when constructing the
-