| 202 | } |
| 203 | |
| 204 | void AutoParallel::AddSharedNodes(GraphDef* graph) { |
| 205 | string prefix = strings::StrCat(kAutoParallelPrefix, "-Replica-", 0); |
| 206 | for (const auto& node : shared_nodes_) { |
| 207 | auto new_node = graph->add_node(); |
| 208 | *new_node = *all_nodes_[node]; |
| 209 | for (int i = 0; i < new_node->input_size(); i++) { |
| 210 | if (NotSharedNode(NodeName(new_node->input(i)))) { |
| 211 | string new_name = AddPrefixToNodeName(new_node->input(i), prefix); |
| 212 | *new_node->mutable_input(i) = new_name; |
| 213 | } |
| 214 | } |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | void AutoParallel::AddOneReplica(GraphDef* graph, int number) { |
| 219 | string prefix = strings::StrCat(kAutoParallelPrefix, "-Replica-", number); |
nothing calls this directly
no test coverage detected