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/01/18 22:58:29 UTC

[GitHub] [tvm] tkonolige commented on a change in pull request #9873: [TOPI] Add support for groupped conv3d

tkonolige commented on a change in pull request #9873:
URL: https://github.com/apache/tvm/pull/9873#discussion_r787217426



##########
File path: src/arith/rewrite_simplify.cc
##########
@@ -820,6 +820,10 @@ PrimExpr RewriteSimplifier::Impl::VisitExpr_(const FloorDivNode* op) {
     TVM_TRY_REWRITE_IF(floordiv(x * y, y), x, CanProveGreaterEqual(y.Eval(), 0));
     TVM_TRY_REWRITE_IF(floordiv(y * x, y), x, CanProveGreaterEqual(y.Eval(), 0));
 
+    if ((floordiv(x, y)).Match(ret) && analyzer_->CanProve(x.Eval() < y.Eval())) {
+      return 0;
+    }
+

Review comment:
       This is needed so that the simplifier here: https://github.com/apache/tvm/pull/9873/files#diff-04a1aab966320b6f63c390cc8b79f79b543a1a7a3f560ea3a97d18c2bb041a0aR837-R839 will remove the division by groups. Without this, simplification get stuck simplifying `ff // (num_filter // groups) * (in_channel // groups) + rc` to `ff // num_filter * in_channel + rc`. It can't prove that `ff // num_filter = 0`.




-- 
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