Partition fix with rfactor, simplify and likely predicates. (#3444)
authorChristian Sarofeen <csarofeen@nvidia.com>
Sat, 29 Jun 2019 09:25:03 +0000 (05:25 -0400)
committerLianmin Zheng <lianminzheng@gmail.com>
Sat, 29 Jun 2019 09:25:03 +0000 (17:25 +0800)
src/schedule/schedule_dataflow_rewrite.cc

index 976e880..2c77192 100644 (file)
@@ -735,7 +735,7 @@ Array<Tensor> Schedule::rfactor(const Tensor& tensor,
   const Reduce* reduce = compute_op->body[idx].as<Reduce>();
   CHECK(reduce) << "Can only rfactor non-inline reductions";
   predicates.push_back(reduce->condition);
-  Expr predicate = arith::ComputeReduce<ir::And>(predicates, Expr());
+  Expr predicate = likely(simplify(arith::ComputeReduce<ir::And>(predicates, Expr())));
 
   std::unordered_map<const Variable*, Expr> vsub;