BackendRep¶
- class
dragon.vm.tensorrt.onnx.
BackendRep
(
model,
device,
max_batch_size=32,
max_workspace_size=None,
optimization_profiles=None,
serialize_engine=False
)[source]¶ ONNX-TensorRT backend to execute repeatedly.
__init__¶
BackendRep.
__init__
(
model,
device,
max_batch_size=32,
max_workspace_size=None,
optimization_profiles=None,
serialize_engine=False
)[source]¶Create a
BackendRep
.- Parameters:
- model (onnx.ModelProto) – The onnx model.
- device (onnx.Device) – The executing device.
- max_batch_size (int, optional, default=32) – The max batch size.
- max_workspace_size (int, optional) – The max workspace size in bytes.
- optimization_profiles (List[Dict], optional) – The optimization profiles.
- serialize_engine (bool, optional, default=False) – Whether to serialize engine into a file.