未验证 提交 e8c6c7df 编写于 作者: W wuhuanzhou 提交者: GitHub

cinn_compiler add RemoveIdentity pass after Decomposer, test=develop (#37738)

上级 85e5ab2e
......@@ -193,6 +193,8 @@ std::unique_ptr<CinnCompiledObject> CinnCompiler::CompileGraph(
CinnGraphSymbolization symbol{compiled_num, graph, target, input_tensors};
auto frontend_program = symbol();
ProgramPass::Apply(&frontend_program, target, {"Decomposer"});
auto fetch_ids = symbol.GetFetchIds();
::cinn::frontend::ApplyPass(&frontend_program, fetch_ids, "RemoveIdentity");
auto cinn_graph = std::make_shared<::cinn::hlir::framework::Graph>(
frontend_program, target);
VLOG(1) << "-- The " << compiled_num << "-th compilation ("
......@@ -201,7 +203,6 @@ std::unique_ptr<CinnCompiledObject> CinnCompiler::CompileGraph(
ApplyPass(cinn_graph.get(), "OpFusion");
auto scope = BuildScope(target, cinn_graph);
auto fetch_ids = symbol.GetFetchIds();
VLOG(4) << "All fetch var ids in CINN: "
<< string::join_strings(fetch_ids, ',');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册