You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/10/10 15:30:35 UTC

[GitHub] [tvm] Lunderberg opened a new pull request, #13024: [TIR][Arith] Use TryCompare to narrow inequalities if possible

Lunderberg opened a new pull request, #13024:
URL: https://github.com/apache/tvm/pull/13024

   Prior to this commit, the result of TryCompare would only be used if it could definitively prove a conditional to be either true or false. For example, if it is known that `0 <= i`, a conditional of `i <= 0` would be left as-is.
   
   This commit introduces rewrite rules to preferentially simplify into more restrictive conditions.  Using the same example, if it is known that `0 <= i`, a conditional of `i <= 0` would be simplified into `i == 0`.  Similarly, if it is known that `0 <= i`, a conditional of `i != 0` would be simplified into `0 < i`.
   
   Because this change does not introduce significant overhead, as the results of `RewriteSimplifier::Impl::TryCompare` are already available, this change is enabled for all use cases and does not require a call to `RewriteSimplifier::SetEnabledExtensions`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] Lunderberg commented on pull request #13024: [TIR][Arith] Use TryCompare to narrow inequalities if possible

Posted by GitBox <gi...@apache.org>.
Lunderberg commented on PR #13024:
URL: https://github.com/apache/tvm/pull/13024#issuecomment-1295343705

   Rebased onto main to resolve conflicts.  Because this dev branch includes and depends on the changes made in https://github.com/apache/tvm/pull/13023, that PR should be landed before this one.  Therefore, marking this PR as a draft to avoid a weird git history from incorrect merge order.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] Lunderberg commented on pull request #13024: [TIR][Arith] Use TryCompare to narrow inequalities if possible

Posted by GitBox <gi...@apache.org>.
Lunderberg commented on PR #13024:
URL: https://github.com/apache/tvm/pull/13024#issuecomment-1273493714

   This is part of a series of improved simplifications, as part of https://github.com/apache/tvm/issues/12261.  Currently marked as draft PR, as it depends on https://github.com/apache/tvm/pull/13023.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] Lunderberg commented on pull request #13024: [TIR][Arith] Use TryCompare to narrow inequalities if possible

Posted by GitBox <gi...@apache.org>.
Lunderberg commented on PR #13024:
URL: https://github.com/apache/tvm/pull/13024#issuecomment-1279059342

   Last failing unit test requires #13081 to resolve.  An unrolled loop produced a `T.if_then_else(floormod(-i,2)==0, ...)`, which resulted in an error thrown from ModularSet.  Previously, this was `T.if_then_else(floormod(-i,2) <= 0, ...)`, which was ignored by the ModularSet.  Because `floormod` with a positive denominator is never negative, this could be simplified to `T.if_then_else(floormod(-i,2) == 0, ...)`, triggering that bug.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] tvm-bot commented on pull request #13024: [TIR][Arith] Use TryCompare to narrow inequalities if possible

Posted by GitBox <gi...@apache.org>.
tvm-bot commented on PR #13024:
URL: https://github.com/apache/tvm/pull/13024#issuecomment-1295500854

   <!---bot-comment-->
   
   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](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
   
   <!--bot-comment-docs-start-->
    * Built docs for commit 6087e6e236a46cdfe795972031f30f5ec59129e3 can be found [here](https://pr-docs.tlcpack.ai/PR-13024/7/docs/index.html).<!--bot-comment-docs-end-->
   
   <sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] Lunderberg commented on pull request #13024: [TIR][Arith] Use TryCompare to narrow inequalities if possible

Posted by GitBox <gi...@apache.org>.
Lunderberg commented on PR #13024:
URL: https://github.com/apache/tvm/pull/13024#issuecomment-1297586329

   @tvm-bot rerun


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] Lunderberg commented on pull request #13024: [TIR][Arith] Use TryCompare to narrow inequalities if possible

Posted by GitBox <gi...@apache.org>.
Lunderberg commented on PR #13024:
URL: https://github.com/apache/tvm/pull/13024#issuecomment-1297085629

   Rebased onto main, which now includes #13023 to resolve the last failing unit test, and this PR is now ready for review.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] Lunderberg commented on pull request #13024: [TIR][Arith] Use TryCompare to narrow inequalities if possible

Posted by GitBox <gi...@apache.org>.
Lunderberg commented on PR #13024:
URL: https://github.com/apache/tvm/pull/13024#issuecomment-1297917435

   @tvm-bot rerun


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] Lunderberg commented on pull request #13024: [TIR][Arith] Use TryCompare to narrow inequalities if possible

Posted by GitBox <gi...@apache.org>.
Lunderberg commented on PR #13024:
URL: https://github.com/apache/tvm/pull/13024#issuecomment-1297231535

   @tvm-bot rerun


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] tmoreau89 merged pull request #13024: [TIR][Arith] Use TryCompare to narrow inequalities if possible

Posted by GitBox <gi...@apache.org>.
tmoreau89 merged PR #13024:
URL: https://github.com/apache/tvm/pull/13024


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org