Skip to content

Commit

Permalink
Prohibit group schedule on single op
Browse files Browse the repository at this point in the history
  • Loading branch information
BiynXu committed Oct 23, 2023
1 parent bc64b57 commit 13ddff9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions paddle/cinn/hlir/framework/op_lowering_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,14 @@ std::vector<ir::LoweredFunc> OpLowererImpl::LowerGroup(
ir_sch.MergeExprs();
VLOG(3) << "After lower, ir is: \n" << ir_sch.GetModule().GetExprs().at(0);
auto& op_pattern_dict = Operator::GetAttrs<OpPatternKind>("OpPattern");
if (apply_group_schedule &&
bool do_group_schedule =
apply_group_schedule &&
!(nodes.size() == 1 &&
op_pattern_dict[nodes[0]->op()] == OpPatternKind::kNonFusible)) {
op_pattern_dict[nodes[0]->op()] == OpPatternKind::kNonFusible);
if (FLAGS_cinn_new_group_scheduler) {
do_group_schedule = apply_group_schedule && nodes.size() > 1;
}
if (do_group_schedule) {
DoGroupSchedule(ir_sch, group, tensor_map);
VLOG(3) << "After group schedule, ir is: \n"
<< ir_sch.GetModule().GetExprs().at(0);
Expand Down

0 comments on commit 13ddff9

Please sign in to comment.