[OnnxModelLoader] Getting list of unsupported glow ops
As of today , during loading an onnx model with OnnxModelLoader, if any of the operators is not supported by Glow it returns immediately with error. Instead it would be useful if the model loader can return the list of unsupported operators in the given model. With this information one can break the model into multiple subgraphs consisting of the supported ops – and then compile / run these only with glow.
This will help to integrate glow with frameworks like onnxruntime - which supports running subgraphs of an onnx model on a specific backend. https://github.com/microsoft/onnxruntime/blob/master/docs/InferenceHighLevelDesign.md
PytorchModelLoader already supports a static function isNodeSupported() which returns if an operator is supported based on the aten op name. For OnnxModelLoader, we can pass an optional parameter which if provided, will not exit on loadOperator() failure – but continue for all the nodes and populates this info along with returning Error. We may need to overload the loadNetwork and loadModel functions to return the list of ops which are not currently supported.
Let me know if any other suggestions.