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 18:04:06 UTC

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

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



##########
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:
       Good point, let me get my head around the semantics and first order simplifications. 




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