TrojanXu / onnxparser-trt-plugin-sample

A sample for onnxparser working with trt user defined plugins for TRT7.0
Apache License 2.0
166 stars 36 forks source link

Is it possible to import ONNX model without modifying the onnx2trt source code in TensorRT7.0? #7

Closed KinglittleQ closed 3 years ago

KinglittleQ commented 3 years ago

For some reason, I have to use TensorRT 7.0 in my workspace. It seems like it is feasible to use onnxgraphsurgeon to modify the ONNX graph and then TensorRT will automatically recognize the custom plugin in TensorRT 7.1 or higher version. But is it possible to apply the same changes to TensorRT 7.0?

TrojanXu commented 3 years ago

I think so, onnx-gs only modifies the onnx file and it doesn't rely on TRT version. For TRT7, it also support several ways to import a onnx model which contains a plugin via, a) modify onnx parser b) modify onnx graph to replace the unknown node with pluginv2 node c) fallback if possible which is a mechanism in onnxparser

KinglittleQ commented 3 years ago

Thanks for your reply.