-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Unity] Avoid trivial var2 = var1
bindings in pattern matcher
#15578
Merged
Hzfengsy
merged 2 commits into
apache:unity
from
Lunderberg:unity_avoid_trivial_bindings_when_pattern_matching
Aug 20, 2023
Merged
[Unity] Avoid trivial var2 = var1
bindings in pattern matcher
#15578
Hzfengsy
merged 2 commits into
apache:unity
from
Lunderberg:unity_avoid_trivial_bindings_when_pattern_matching
Aug 20, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prior to this commit, pattern matches that returned a variable (e.g. rewriting `R.add(x, R.const(0.0))` into `x`) would result in rewriting `y = R.add(x, R.const(0.0))` to the trivial binding `y = x`. This commit updates the pattern matcher to instead remove the `y` variable entirely in this case.
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
csullivan
approved these changes
Aug 16, 2023
Lunderberg
deleted the
unity_avoid_trivial_bindings_when_pattern_matching
branch
August 20, 2023 13:51
masahi
added a commit
to masahi/tvm
that referenced
this pull request
Aug 31, 2023
…er (apache#15578)" This reverts commit 567848e.
masahi
added a commit
to masahi/tvm
that referenced
this pull request
Sep 26, 2023
…er (apache#15578)" This reverts commit 567848e.
masahi
added a commit
to masahi/tvm
that referenced
this pull request
Sep 27, 2023
…rn matcher (apache#15578)"" This reverts commit 0a6a617.
masahi
added a commit
to masahi/tvm
that referenced
this pull request
Sep 27, 2023
commit 99c2a59 Author: Masahiro Masuda <[email protected]> Date: Wed Sep 27 09:57:21 2023 +0900 Revert "Revert "[Unity] Avoid trivial `var2 = var1` bindings in pattern matcher (apache#15578)"" This reverts commit 0a6a617. commit 9a3ca64 Author: Masahiro Masuda <[email protected]> Date: Wed Sep 27 09:55:02 2023 +0900 wip commit be01900 Author: Masahiro Masuda <[email protected]> Date: Tue Sep 26 19:55:29 2023 +0900 fix test commit a026b65 Author: Masahiro Masuda <[email protected]> Date: Thu Aug 31 22:24:38 2023 +0000 wip commit 233d2d0 Author: Masahiro Masuda <[email protected]> Date: Tue Aug 29 17:42:11 2023 +0000 wip commit 0a6a617 Author: Masahiro Masuda <[email protected]> Date: Tue Aug 29 17:28:25 2023 +0000 Revert "[Unity] Avoid trivial `var2 = var1` bindings in pattern matcher (apache#15578)" This reverts commit 567848e. commit 6c5a435 Author: Masahiro Masuda <[email protected]> Date: Tue Aug 29 17:28:16 2023 +0000 wip commit 7926cbc Author: Masahiro Masuda <[email protected]> Date: Mon Aug 28 06:17:01 2023 +0000 wip commit 9828698 Author: Masahiro Masuda <[email protected]> Date: Mon Aug 28 15:11:47 2023 +0900 wip commit 5d01fd1 Author: Masahiro Masuda <[email protected]> Date: Mon Aug 28 06:05:56 2023 +0000 wip commit ae657b7 Author: Masahiro Masuda <[email protected]> Date: Mon Aug 28 14:49:21 2023 +0900 wip commit ddcab38 Author: Masahiro Masuda <[email protected]> Date: Mon Aug 28 05:42:41 2023 +0000 wip commit ab3572d Author: Masahiro Masuda <[email protected]> Date: Mon Aug 28 10:40:34 2023 +0900 wip commit 690b88e Author: Masahiro Masuda <[email protected]> Date: Mon Aug 28 10:25:33 2023 +0900 update rev
vinx13
pushed a commit
that referenced
this pull request
Sep 27, 2023
…tion (#15831) * Squashed commit of the following: commit 99c2a59 Author: Masahiro Masuda <[email protected]> Date: Wed Sep 27 09:57:21 2023 +0900 Revert "Revert "[Unity] Avoid trivial `var2 = var1` bindings in pattern matcher (#15578)"" This reverts commit 0a6a617. commit 9a3ca64 Author: Masahiro Masuda <[email protected]> Date: Wed Sep 27 09:55:02 2023 +0900 wip commit be01900 Author: Masahiro Masuda <[email protected]> Date: Tue Sep 26 19:55:29 2023 +0900 fix test commit a026b65 Author: Masahiro Masuda <[email protected]> Date: Thu Aug 31 22:24:38 2023 +0000 wip commit 233d2d0 Author: Masahiro Masuda <[email protected]> Date: Tue Aug 29 17:42:11 2023 +0000 wip commit 0a6a617 Author: Masahiro Masuda <[email protected]> Date: Tue Aug 29 17:28:25 2023 +0000 Revert "[Unity] Avoid trivial `var2 = var1` bindings in pattern matcher (#15578)" This reverts commit 567848e. commit 6c5a435 Author: Masahiro Masuda <[email protected]> Date: Tue Aug 29 17:28:16 2023 +0000 wip commit 7926cbc Author: Masahiro Masuda <[email protected]> Date: Mon Aug 28 06:17:01 2023 +0000 wip commit 9828698 Author: Masahiro Masuda <[email protected]> Date: Mon Aug 28 15:11:47 2023 +0900 wip commit 5d01fd1 Author: Masahiro Masuda <[email protected]> Date: Mon Aug 28 06:05:56 2023 +0000 wip commit ae657b7 Author: Masahiro Masuda <[email protected]> Date: Mon Aug 28 14:49:21 2023 +0900 wip commit ddcab38 Author: Masahiro Masuda <[email protected]> Date: Mon Aug 28 05:42:41 2023 +0000 wip commit ab3572d Author: Masahiro Masuda <[email protected]> Date: Mon Aug 28 10:40:34 2023 +0900 wip commit 690b88e Author: Masahiro Masuda <[email protected]> Date: Mon Aug 28 10:25:33 2023 +0900 update rev * black * clean * add doc * update rev * update test * fix --------- Co-authored-by: Masahiro Masuda <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to this commit, pattern matches that returned a variable (e.g. rewriting
R.add(x, R.const(0.0))
intox
) would result in rewritingy = R.add(x, R.const(0.0))
to the trivial bindingy = x
. This commit updates the pattern matcher to instead remove they
variable entirely in this case.