class tensorrt.Runtime(self: tensorrt.tensorrt.Runtime, logger: tensorrt.tensorrt.ILogger) → None

Allows a serialized ICudaEngine to be deserialized.

Parameters:logger – The logger to use.
__del__(self: tensorrt.tensorrt.Runtime) → None
__exit__(exc_type, exc_value, traceback)

Destroy this object, freeing all memory associated with it. This should be called to ensure that the object is cleaned up properly. Equivalent to invoking __del__()

__init__(self: tensorrt.tensorrt.Runtime, logger: tensorrt.tensorrt.ILogger) → None
Parameters:logger – The logger to use.
deserialize_cuda_engine(self: tensorrt.tensorrt.Runtime, serialized_engine: buffer, plugin_factory: tensorrt.tensorrt.IPluginFactory = None) → tensorrt.tensorrt.ICudaEngine

Deserialize an ICudaEngine from a stream.

  • serialized_engine – The buffer that holds the serialized ICudaEngine .
  • plugin_factory – The IPluginFactory , if any plugins are used by the network, otherwise None.

The ICudaEngine, or None if it could not be deserialized.