-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add onnx option for trt_export API #6258
Copy link
Copy link
Closed
Description
Is your feature request related to a problem? Please describe.
Currently in the MONAI bundle, the trt_export API only supports exporting models through TorchScript directly. Although this is a better way to convert, a few models couldn't be converted this way. Fortunately, there is a workaround for this conversion, which is convert the torch model to an onnx model, convert the onnx model to a TensorRT engine and wrap the engine back to TorchScript. It's a little bit tedious but works for now.
Describe the solution you'd like
Add a use_onnx parameter to trt_export.
Update the convert_to_trt function to leverage the onnx.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels