Skip to content

Commit 8a48fb5

Browse files
committed
Revert "Skip applying sch_rule when both ann and sch_rule are defined"
This reverts commit 4915c6a.
1 parent daea033 commit 8a48fb5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/meta_schedule/space_generator/post_order_apply.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class PostOrderApplyNode : public SpaceGeneratorNode {
145145
<< ann.value();
146146
}
147147

148-
if ((ann.defined() && sch_rule.defined()) || (!has_schedule_rule && !sch_rule.defined()) ||
148+
if ((!sch_rule.defined() && !has_schedule_rule) ||
149149
(ann.defined() && ann.value() == "None")) {
150150
stack.emplace_back(sch, blocks);
151151
continue;

src/tir/schedule/analysis/analysis.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2085,7 +2085,10 @@ Optional<TensorizeInfo> GetTensorizeLoopMapping(const tir::ScheduleState& self,
20852085

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

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

0 commit comments

Comments
 (0)