-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable extraction of rewritten subgraph as model-local function #2065
Conversation
❌ 24 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
onnxscript/rewriter/pattern_test.py:583
- [nitpick] The variable name 'sum' shadows the built-in function 'sum'. Consider renaming it (e.g., to 'result' or 'total') to avoid confusion.
sum = op.Add(x, y)
onnxscript/rewriter/pattern.py:1541
- [nitpick] Using 'input' as a loop variable shadows the built-in function 'input'. Renaming it (for example, to 'inp') would improve code clarity.
for input in inputs:
Co-authored-by: Justin Chu <[email protected]>
Enable extraction of rewritten subgraph as model-local function.
This will enable multi-step rewrite optimizations: eg., map subgraph G1 to new-op1, and then map subgraph G2 containing new-op1 to new-op2, and then inlining can replace any remaining new-op1 (that was not rewritten) by original G1.