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

Method ForEachDataAndCtrlInNode

oneflow/core/graph/op_graph.cpp:464–473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462}
463
464void OpGraph::ForEachDataAndCtrlInNode(OpNode* node,
465 const std::function<void(OpNode*)>& Handler) const {
466 node->ForEachNodeOnInEdge(Handler);
467 for (const auto& ctrl_in_op_name : node->op().op_conf().ctrl_in_op_name()) {
468 CHECK(op_name2op_node_.find(ctrl_in_op_name) != op_name2op_node_.end())
469 << " cannot find ctrl_in_op_name: [" << ctrl_in_op_name << "] of op: ["
470 << node->op().op_name() << "] in OpGraph. ";
471 Handler(op_name2op_node_.at(ctrl_in_op_name));
472 }
473}
474
475void OpGraph::ForEachDataAndCtrlOutNode(OpNode* node,
476 const std::function<void(OpNode*)>& Handler) const {

Callers 1

CheckOpGraphFunction · 0.80

Calls 5

ForEachNodeOnInEdgeMethod · 0.80
findMethod · 0.80
opMethod · 0.45
endMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected