microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
https://onnxruntime.ai
MIT License
14.6k stars 2.92k forks source link

Rule-based graph transformers don't work on graphs with functions #9296

Open adk9 opened 3 years ago

adk9 commented 3 years ago

Is your feature request related to a problem? Please describe. Rule-based graph transformer provides an API to register rewrite rules and apply all applicable rules to a graph. Currently, rule-based graph transformers cannot work on a graph that has module local functions. For instance, if the specified target op types for a rewrite rule is inside a module local function, the rewrite rule is not applied on the graph. Rule-based graph transformers -- and graph traversals in a few other places through the code base -- are able to recurse into subgraphs but not functions.

System information onnxruntime version 1.9.1 / master

Describe the solution you'd like Application of rewrite rules in rule-based graph transformer recurse through module local functions.

I've opened PR 9274 to address this limitation.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale due to inactivity and will be closed in 7 days if no further activity occurs. If further support is needed, please provide an update and/or more details.