Skip to content

Commit d62325a

Browse files
committed
[CINN] ComputeAtReductionTactic supports elementwise-to-reduce fusion
1 parent a7f46ff commit d62325a

File tree

3 files changed

+273
-362
lines changed

3 files changed

+273
-362
lines changed

paddle/cinn/ir/group_schedule/dy_shape_group_scheduler.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#include "paddle/cinn/ir/op/ir_operators.h"
2525
#include "paddle/common/enforce.h"
2626

27+
PD_DECLARE_bool(cinn_enable_compute_at);
28+
2729
namespace cinn {
2830
namespace ir {
2931

@@ -36,7 +38,9 @@ void DynamicShapeGroupScheduler::Init() {
3638
tactics_.emplace_back(CreateTileBroadcastTactic());
3739
tactics_.emplace_back(CreateTileFirstGeneralTactic());
3840
tactics_.emplace_back(CreateComputeInlineTactic());
39-
tactics_.emplace_back(CreateComputeAtReductionTactic());
41+
if (FLAGS_cinn_enable_compute_at) {
42+
tactics_.emplace_back(CreateComputeAtReductionTactic());
43+
}
4044
}
4145

4246
void DynamicShapeGroupScheduler::InitBuckets() {

0 commit comments

Comments
 (0)