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

Method ColocateNodes

tensorflow/core/common_runtime/colocation_graph.cc:892–896  ·  view source on GitHub ↗

Merge the (possibly disjoint) sets containing nodes "x" and "y". Returns OK if the all nodes in the union of these sets can be placed on the same device type. NOTE: If this method returns an error, *this is left in an undefined state.

Source from the content-addressed store, hash-verified

890// NOTE: If this method returns an error, *this is left in an undefined
891// state.
892Status ColocationGraph::ColocateNodes(const Node& x, const Node& y) {
893 int x_root = FindAndUpdateRoot(x.id());
894 int y_root = FindAndUpdateRoot(y.id());
895 return ColocateNodes(x, x_root, y, y_root);
896}
897
898// This overload of ColocateNodes() allows a caller to provide the root node
899// ids for the two nodes. For large graphs, this noticeably reduces the

Callers

nothing calls this directly

Calls 10

InvalidArgumentFunction · 0.85
DebugInfoClass · 0.85
MergeDeviceNamesMethod · 0.80
MergeSupportedDevicesMethod · 0.80
MergeGpuStreamIdxMethod · 0.80
nameMethod · 0.65
MergeFunction · 0.50
idMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected