[Arith][Bugfix] Simplify "x - 1 < y" into "x <= y"#14528
Merged
areusch merged 1 commit intoapache:mainfrom Apr 7, 2023
Merged
Conversation
This simplification was introduced in apache#13217, and was erroneously removed in apache#13933. This commit re-enables this simplification, and adds unit tests to prevent any future regression.
Collaborator
|
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 |
Lunderberg
added a commit
to Lunderberg/tvm
that referenced
this pull request
Apr 7, 2023
Previously, so long as `RewriteSimplifier` produces the same output, unit tests of its behavior would pass. This could have severe performance regressions, such as the one resolved in apache#14528, which caused the runtime of two test to increase from ~1.5 seconds to ~10 minutes each. This commit implements statistics counts in RewriteSimplifier, which are exposed through both the C++ and Python APIs, and uses these to guard against the known performance regression from apache#14528.
areusch
approved these changes
Apr 7, 2023
Lunderberg
added a commit
to Lunderberg/tvm
that referenced
this pull request
Apr 7, 2023
Previously, so long as `RewriteSimplifier` produces the same output, unit tests of its behavior would pass. This could have severe performance regressions, such as the one resolved in apache#14528, which caused the runtime of two test to increase from ~1.5 seconds to ~10 minutes each. This commit implements statistics counts in RewriteSimplifier, which are exposed through both the C++ and Python APIs, and uses these to guard against the known performance regression from apache#14528.
tqchen
pushed a commit
that referenced
this pull request
May 5, 2023
* [Arith] Implement statistics counters for RewriteSimplifier Previously, so long as `RewriteSimplifier` produces the same output, unit tests of its behavior would pass. This could have severe performance regressions, such as the one resolved in #14528, which caused the runtime of two test to increase from ~1.5 seconds to ~10 minutes each. This commit implements statistics counts in RewriteSimplifier, which are exposed through both the C++ and Python APIs, and uses these to guard against the known performance regression from #14528. * lint fixes * Updates based on review comments * Consistent int64_t with kMaxRecurDepth * Removed unused is_currently_visiting_ * Add missing \brief for RewriteSimplifierStatsNode * Use int64_t in ControlFlowGraph for max simplification steps
This file contains hidden or 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
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.
This simplification was introduced in #13217, and was erroneously removed in #13933. This commit re-enables this simplification, and adds unit tests to prevent any future regression.