Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jinhongyii committed Jul 19, 2021
1 parent 252315d commit 20cf9bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/tir/schedule/concrete_schedule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ Array<LoopRV> ConcreteScheduleNode::Split(const LoopRV& loop_rv,
Array<PrimExpr> factors;
factors.reserve(factor_rvs.size());
for (const Optional<ExprRV>& factor_rv : factor_rvs) {
if (factor_rv.defined()) {
if (!factor_rv.defined()) {
factors.push_back(Integer(-1));
} else {
factors.push_back(this->Get(factor_rv.value()));
Expand Down
4 changes: 2 additions & 2 deletions src/tir/schedule/primitive/loop_transformation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class IterMapSimplifyBlockBinding : public StmtExprMutator {
Block block = op->block;
BlockRealize realize = Downcast<BlockRealize>(StmtMutator::VisitStmt_(op));
for (const std::pair<ObjectRef, ObjectRef>& entry : *opaque_blocks_) {
if (entry.second.same_as(op->block)) {
if (entry.second.same_as(block)) {
opaque_blocks_->at(entry.first) = realize->block;
break;
}
Expand Down Expand Up @@ -303,7 +303,7 @@ Array<StmtSRef> Split(ScheduleState self, const StmtSRef& loop_sref,
PrimExpr substitute_value = 0;
std::vector<Var> new_loop_vars;
new_loop_vars.reserve(n);
for (size_t i = 0; i < n; i++) {
for (int i = 0; i < n; i++) {
const PrimExpr& factor = inferred_factors[i];
Var var = loop->loop_var.copy_with_suffix("_" + std::to_string(i));
substitute_value = substitute_value * factor + var;
Expand Down

0 comments on commit 20cf9bc

Please sign in to comment.