diff --git a/cinn/ir/ir_schedule.cc b/cinn/ir/ir_schedule.cc index 4e4cc2bfd3..9ffa9590ad 100644 --- a/cinn/ir/ir_schedule.cc +++ b/cinn/ir/ir_schedule.cc @@ -1420,7 +1420,6 @@ Expr ReverseComputeInliner::ReplaceInlinedTensor(Expr* load) { void ScheduleImpl::ReverseComputeInline(const Expr& schedule_block) { Expr root = this->GetRootBlock(schedule_block); Expr inlined_store = CheckReverseComputeInlineValidationAndGetStore(schedule_block, root); - CHECK(schedule_block.As()); auto compute_body = schedule_block.As()->schedule_block.As()->body; @@ -1434,7 +1433,7 @@ void ScheduleImpl::ReverseComputeInline(const Expr& schedule_block) { // Create a plan that removes the block to be inlined LeafBlockRemovalPlan remove_plan(schedule_block, &inliner.src_stmt, &inliner.tgt_stmt); remove_plan(&root); - inliner(&root); + inliner(&inliner.src_stmt); inliner(&root); }