MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / GetRoot

Function GetRoot

oneflow/core/graph/inplace_lbi_graph.cpp:63–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63const InplaceLbiNode* GetRoot(const HashSet<const InplaceLbiNode*>& nodes,
64 const std::function<bool(const InplaceLbiEdge*)>& IsValidEdge) {
65 const InplaceLbiNode* root = nullptr;
66 for (const InplaceLbiNode* node : nodes) {
67 if (node->GetValidInEdge(IsValidEdge) == nullptr) {
68 CHECK_ISNULL(root);
69 root = node;
70 }
71 }
72 return root;
73}
74
75const InplaceLbiNode* FindSoleIsMutableIbnConsumer(const SourceOpInplaceLbiNode* node) {
76 const InplaceLbiNode* ret = nullptr;

Calls 1

GetValidInEdgeMethod · 0.80

Tested by

no test coverage detected