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 2020/07/17 14:50:58 UTC

[GitHub] [incubator-tvm] tqchen commented on a change in pull request #6069: [TIR][BugFix] Avoid simplifying substituted tir.Any expressions for layout transformations

tqchen commented on a change in pull request #6069:
URL: https://github.com/apache/incubator-tvm/pull/6069#discussion_r456491809



##########
File path: src/tir/ir/data_layout.cc
##########
@@ -323,7 +323,12 @@ inline Array<PrimExpr> TransformShape(const Array<PrimExpr>& src_shape,
       if (symbolic_var_set.count(i)) {
         result.push_back(tir::Any());
       } else {
-        result.push_back(ana.Simplify(tir::Substitute(rule, bind_map)));
+        auto sub = tir::Substitute(rule, bind_map);
+        if (sub.as<tir::AnyNode>()) {
+          result.push_back(tir::Any());
+        } else {
+          result.push_back(ana.Simplify(sub));
+        }

Review comment:
       Perhaps in this case we should go and fix Simplify for Any in the arith module and also add a testcase there




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

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