diff --git a/csrc/scheduler/transpose.cpp b/csrc/scheduler/transpose.cpp index 1db2a3cc85b..450513bd28c 100644 --- a/csrc/scheduler/transpose.cpp +++ b/csrc/scheduler/transpose.cpp @@ -68,12 +68,6 @@ bool TransposeScheduler::canScheduleCompileTime(Fusion* fusion) { } } - if (!hasAtLeastTwoValidGroups(fusion)) { - scheduler_debug_utils::canScheduleRejectReason( - schedulerType(), "cannot find two mismatching inner most dimensions"); - return false; - } - if (ir_utils::hasAnyReductionOps(fusion)) { scheduler_debug_utils::canScheduleRejectReason( schedulerType(), "no support for reduction ops"); @@ -87,6 +81,12 @@ bool TransposeScheduler::canScheduleCompileTime(Fusion* fusion) { return false; } + if (!hasAtLeastTwoValidGroups(fusion)) { + scheduler_debug_utils::canScheduleRejectReason( + schedulerType(), "cannot find two mismatching inner most dimensions"); + return false; + } + return true; }