| 164 | virtual ~GraphConstructor() {} |
| 165 | |
| 166 | Status TryImport() { |
| 167 | TF_RETURN_IF_ERROR(EnsureNoNameCollisions()); |
| 168 | TF_RETURN_IF_ERROR(ValidateInputMapAndControlDependencies()); |
| 169 | TF_RETURN_IF_ERROR(BuildNodeIndex()); |
| 170 | TF_RETURN_IF_ERROR(InitFromEdges()); |
| 171 | |
| 172 | // NOTE: Convert() invokes `consume_node_def()` on each node in the input |
| 173 | // graph, so `get_node_def()` is no longer usable once it is called. |
| 174 | TF_RETURN_IF_ERROR(Convert()); |
| 175 | |
| 176 | TF_RETURN_IF_ERROR(AddBackEdges()); |
| 177 | TF_RETURN_IF_ERROR(UpdateVersionDef()); |
| 178 | TF_RETURN_IF_ERROR(PopulateReturnTensors()); |
| 179 | TF_RETURN_IF_ERROR(PopulateReturnNodes()); |
| 180 | TF_RETURN_IF_ERROR(PopulateMissingUnusedInputMapKeys()); |
| 181 | UpdateUniquifiedColocationNames(); |
| 182 | FixupSourceAndSinkEdges(g_); |
| 183 | return Status::OK(); |
| 184 | } |
| 185 | |
| 186 | private: |
| 187 | Status EnsureNoNameCollisions(); |
no test coverage detected