-
Notifications
You must be signed in to change notification settings - Fork 72
Updates to the rewriter tutorial #2397
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
Conversation
Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>
Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>
Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>
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.
Pull Request Overview
This PR updates the rewriter tutorial documentation by improving explanations and demonstrating an alternative class-based approach to defining rewrite rules.
- Introduces a class-based rewrite rule example in the tutorial.
- Enhances documentation on conditional rewrite rules and commutativity handling.
- Updates the index order and adjusts descriptive text in several markdown files.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
docs/tutorial/rewriter/simple_example.md | Refactored the tutorial to demonstrate an alternative class-based definition for rewrite rules. |
docs/tutorial/rewriter/rewrite_patterns.md | Updated text to indicate that rewrite rules are conditional. |
docs/tutorial/rewriter/examples/erfgelu.py | Added a new class-based rewrite rule implementation example. |
docs/tutorial/rewriter/conditional_rewrite.md | Revised explanation for condition checking with additional IR details. |
docs/tutorial/rewriter/commute.md | Expanded discussion on commutativity handling and introduced a warning regarding rule explosion. |
docs/tutorial/index.md | Adjusted the ordering for the toctree entries. |
Comments suppressed due to low confidence (1)
docs/tutorial/rewriter/simple_example.md:65
- Consider revising the sentence to include a verb, for example: 'This parameter is either a
Sequence[PatternRewriteRule]
or aRewriteRuleSet
.'
2. `pattern_rewrite_rules` : This parameter either a `Sequence[PatternRewriteRule]` or a `RewriteRuleSet`.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>
❌ 26 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.
Looks like there's lint errors
Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>
Maybe we can disable the # pylint: disable=arguments-differ rule universally in onnxscript/pyproject_pylint.toml Line 4 in f62f3bc
|
I think that would be good. It shows up as a "warning", so it wasn't clear to me if it had to be fixed. Anyway: there is no good fix, since the alternatives are to drop the method from the abstract class completely or add an override everywhere. So, this must be a new pylint requirement? |
I think we disabled some pylint rules in the rewriter folder but not in the examples folder. That's why it's showing up. Anyways any lintrunner issue (no matter level) will need to be fixed or silenced. |
Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>
Updates to the rewriter tutorial