mmdeploy/backend/tensorrt/utils.py
def save_trt_engine(engine: trt.ICudaEngine, path: str) -> None:
    """Serialize TensorRT engine to disk.

    Args:
        engine (tensorrt.ICudaEngine): TensorRT engine to be serialized.
        path (str): The absolute disk path to write the engine.
    """
    with open(path, mode='wb') as f:
        f.write(bytearray(engine.serialize()))
Serialize TensorRT engine to disk.

    Args:
        engine (tensorrt.ICudaEngine): TensorRT engine to be serialized.
        path (str): The absolute disk path to write the engine.
    
Serialize TensorRT engine to disk.
Serialize TensorRT engine to disk .
def save_trt_engine(engine: trt.ICudaEngine, path: str) -> None:
    with open(path, mode='wb') as f:
        f.write(bytearray(engine.serialize()))
def save_trt_engine ( engine : trt . ICudaEngine , path : str ) -> None : with open ( path , mode = 'wb' ) as f : f . write ( bytearray ( engine . serialize ( ) ) )
Serialize TensorRT engine to disk.
Serialize TensorRT engine to disk .
"""Serialize TensorRT engine to disk.

    Args:
        engine (tensorrt.ICudaEngine): TensorRT engine to be serialized.
        path (str): The absolute disk path to write the engine.
    """
engine
trt.ICudaEngine
TensorRT engine to be serialized.
TensorRT engine to be serialized .
path
str
The absolute disk path to write the engine.
The absolute disk path to write the engine .