Skip to content

Commit

Permalink
Revert "Skip applying sch_rule when both ann and sch_rule are defined"
Browse files Browse the repository at this point in the history
This reverts commit 4915c6a.
  • Loading branch information
masahi committed Apr 13, 2022
1 parent daea033 commit 8a48fb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/meta_schedule/space_generator/post_order_apply.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class PostOrderApplyNode : public SpaceGeneratorNode {
<< ann.value();
}

if ((ann.defined() && sch_rule.defined()) || (!has_schedule_rule && !sch_rule.defined()) ||
if ((!sch_rule.defined() && !has_schedule_rule) ||
(ann.defined() && ann.value() == "None")) {
stack.emplace_back(sch, blocks);
continue;
Expand Down
5 changes: 4 additions & 1 deletion src/tir/schedule/analysis/analysis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2085,7 +2085,10 @@ Optional<TensorizeInfo> GetTensorizeLoopMapping(const tir::ScheduleState& self,

if (i_desc != n_desc_vars - 1 && iter_types[i] == IterVarType::kCommReduce) continue;

if (int_block_extent->value == int_desc_extent->value) {
// if (int_block_extent->value == int_desc_extent->value) {
if (!tir::UsesVar(r, [&block_loop_vars](const tir::VarNode* var) {
return block_loop_vars.count(var);
})) {
block_loop = block_loops[i];
LOG(INFO) << "Selected " << i << " th block loop " << block_loops[i]->loop_var << ", "
<< block_loop->extent;
Expand Down

0 comments on commit 8a48fb5

Please sign in to comment.