diff --git a/tf_adapter/optimizers/om_partition_subgraphs_pass.cc b/tf_adapter/optimizers/om_partition_subgraphs_pass.cc index 3eced9e721fa508258f9bf8fa9f5e69a9887588c..36d61679683193b53da42aa17d09257073cb8f8f 100644 --- a/tf_adapter/optimizers/om_partition_subgraphs_pass.cc +++ b/tf_adapter/optimizers/om_partition_subgraphs_pass.cc @@ -151,9 +151,11 @@ Status OMSubGraphToFunctionDef(const Graph &graph, const string &name, FunctionD // Edges, indexed by dst_input. std::vector inEdges; std::vector ctrlEdges; + ADP_LOG(WARNING) << "GPA: node: " << node->name() << " start check in edges."; for (Edge const *edge : node->in_edges()) { REQUIRES_NOT_NULL(edge); REQUIRES_NOT_NULL(edge->src()); + ADP_LOG(WARNING) << "GPA: src node: " << edge->src()->name(); if (edge->src()->IsSource()) { continue; } if (edge->IsControlEdge()) { @@ -171,7 +173,15 @@ Status OMSubGraphToFunctionDef(const Graph &graph, const string &name, FunctionD inEdges[dst_input] = edge; } } - + ADP_LOG(WARNING) << "GPA: inEdges size: " << inEdges.size(); + for (size_t i = 0; i < inEdges.size(); i++) { + if (inEdges[i] == nullptr) { + ADP_LOG(WARNING) << "GPA: inEdges[" << i << "] is nullptr"; + continue; + } + ADP_LOG(WARNING) << "GPA: inEdges[" << i << "] dst: " + << inEdges[i]->dst()->name() << ", src: " << inEdges[i]->src()->name(); + } // Add regular inputs for (auto edge : inEdges) { REQUIRES_NOT_NULL(edge);