fix out of memory question

pull/1144/head
wxl 4 years ago
parent 6eb421f890
commit d66ef5f2d0

@ -458,7 +458,7 @@ Status NetOutputPass::Run(ge::ComputeGraphPtr graph) {
GELOGE(GE_GRAPH_PARAM_NULLPTR, "Compute graph is null."); GELOGE(GE_GRAPH_PARAM_NULLPTR, "Compute graph is null.");
return GE_GRAPH_PARAM_NULLPTR; return GE_GRAPH_PARAM_NULLPTR;
} }
GELOGI("NetOutputPass Run."); GELOGI("NetOutputPass Run.graph is [%s]", graph->GetName().c_str());
NodePtr output_node = graph->FindFirstNodeMatchType(NETOUTPUT); NodePtr output_node = graph->FindFirstNodeMatchType(NETOUTPUT);
// save user targets node // save user targets node
SaveAndRemoveTargets(graph); SaveAndRemoveTargets(graph);

@ -27,12 +27,11 @@
namespace ge { namespace ge {
Status PrunePass::Run(ge::ComputeGraphPtr graph) { Status PrunePass::Run(ge::ComputeGraphPtr graph) {
GELOGD("PrunePass Start"); GELOGD("PrunePass Start, graph is [%s]", graph->GetName().c_str());
if (graph == nullptr) { if (graph == nullptr) {
GELOGE(GE_GRAPH_ISNULL, "input compute graph is NULL."); GELOGE(GE_GRAPH_ISNULL, "input compute graph is NULL.");
return GE_GRAPH_ISNULL; return GE_GRAPH_ISNULL;
} }
std::vector<NodePtr> out_nodes; std::vector<NodePtr> out_nodes;
std::unordered_set<NodePtr> nodes; std::unordered_set<NodePtr> nodes;
for (NodePtr &node_ptr : graph->GetDirectNode()) { for (NodePtr &node_ptr : graph->GetDirectNode()) {
@ -42,7 +41,6 @@ Status PrunePass::Run(ge::ComputeGraphPtr graph) {
out_nodes.push_back(node_ptr); out_nodes.push_back(node_ptr);
} }
} }
if (out_nodes.empty()) { if (out_nodes.empty()) {
GELOGW("graph [%s] does not contain NETOUTPUT type node,no return value. Do nothing!", graph->GetName().c_str()); GELOGW("graph [%s] does not contain NETOUTPUT type node,no return value. Do nothing!", graph->GetName().c_str());
return ge::SUCCESS; return ge::SUCCESS;

Loading…
Cancel
Save