未验证 提交 fa43d74a 编写于 作者: W wangchaochaohu 提交者: GitHub

fix the intermediate node of graph for fusion group test=develop (#24184)

上级 ecfddebb
......@@ -263,12 +263,17 @@ std::string CodeGenerator::EmitParameters(
}
size_t index = 0;
std::vector<std::string> output_args;
for (auto id : output_ids) {
if (intermediate_ids.find(id) == intermediate_ids.end()) {
ret << dtypes.at(id) << "* " << ArgName(id);
if (index != output_ids.size() - 1) {
ret << ", ";
}
std::string args_str = dtypes.at(id) + "* " + ArgName(id);
output_args.push_back(args_str);
}
}
for (auto args : output_args) {
ret << args;
if (index != output_args.size() - 1) {
ret << ", ";
}
index++;
}
......
......@@ -155,7 +155,7 @@ class SubGraph {
if (node->IsOp()) {
auto inputs = node->inputs;
for (auto* in : inputs) {
if (in == n) {
if (in && in->Name() == n->Name()) {
if (!Has(node)) enable_remove = false;
leaf_graph = false;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册