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

revert-24314-dev/fix_err_msg
wangchaochaohu 5 years ago committed by GitHub
parent ecfddebbef
commit fa43d74a3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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;
}

Loading…
Cancel
Save