MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / AddControlMerge

Function AddControlMerge

tensorflow/core/graph/graph_partition.cc:625–635  ·  view source on GitHub ↗

A merge node for control flow.

Source from the content-addressed store, hash-verified

623
624// A merge node for control flow.
625Node* AddControlMerge(const string& in_name1, const string& in_name2, Graph* g,
626 const string& node_name, const string& device_name,
627 Status* status) {
628 NodeBuilder node_builder(node_name, "Merge", g->op_registry());
629 node_builder.Input({{in_name1, 0, DT_FLOAT}, {in_name2, 0, DT_FLOAT}});
630 Node* res_node;
631 *status = node_builder.Finalize(g, &res_node, /*consume=*/true);
632 if (!status->ok()) return nullptr;
633 res_node->set_assigned_device_name(device_name);
634 return res_node;
635}
636
637// A switch node for control flow.
638Node* AddControlSwitch(NodeBuilder::NodeOut input1, NodeBuilder::NodeOut input2,

Callers 1

AddControlLoopFunction · 0.85

Calls 5

op_registryMethod · 0.45
InputMethod · 0.45
FinalizeMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected