-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TIR][Arith] Prove conditionals by transitively applying knowns (#12863)
This commit adds a new sub-analyzer, `TransitiveComparisonAnalyzer`, which attempts to apply multiple known comparisons to prove an unknown. For example, `a <= b` and `b <= c` imply that `a <= c`. These simplifications are necessary for simplifying conditionals resulting from padded layout transformations (#12261). While some of these conditions may be proven using `ConstIntBoundAnalyzer` or `IntSetAnalyzer`, each has some limitations. `ConstIntBoundAnalyzer` can only compare against a constant, `IntSetAnalyzer` internally calls `RewriteSimplifier` which can result in infinite recursion, and neither can handle not-equal conditions because it would require tracking multiple intervals per expression. Therefore, introducing a new sub-analyzer for these simplifications. * Change mutable reference to mutable pointer * Remove nullptr default on Impl unique_ptr In g++ 7, defining a default constructor attempts to define the destructor, which fails because `Impl` is an incomplete type. As far as I should tell, the destructor should only be defined at the point where `~TransitiveComparisonAnalyzer` is defined, at which point `Impl` has a full definition. This issue does not occur in g++ 10. * Require opt-in for CPU-intensive simplifications * Document the intent of using bitflags * Rename "Feature" to "Extension" * Use TVM_DLL on new public member functions * Remove duplicate BaseBeforeAfter.transform definition * Explicitly enable extension for unit tests that require it * Fix accidentally duplicate test case * Improve TryCompareFromLHS documentation * Update wording to distinguish `knowns_` and `scoped_knowns_` * Better documentation for Key enum * Document the normalization of LT/GT * Removed unused PrimExpr temp * Call out modifications of the `compared_to_x` contents * Pointed to `Comparison::Comparison` for normalization details * Updated to clarify right/RHS. * Rename TryCompareFromLHS to DFSFromLHS
- Loading branch information
1 parent
7804a98
commit fc333f9
Showing
8 changed files
with
1,172 additions
and
28 deletions.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
fc333f9
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.
Hello, I found that I updated the tvm version from 0.10.0 to 0.11.1, and the time of auto_schedule tune became longer. It is located that this commit caused it. Have you encountered this problem?