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

Method SelectTaskNodeByRank

oneflow/core/graph/task_graph.cpp:1175–1182  ·  view source on GitHub ↗

static*/

Source from the content-addressed store, hash-verified

1173} // namespace
1174
1175/*static*/ bool BoxingTaskGraph::SelectTaskNodeByRank(TaskNode* task_node, int64_t rank) {
1176 return TaskNodeVisitor<bool>(
1177 task_node, [&](TransportTaskNode* task_node) { return task_node->machine_id() == rank; },
1178 [&](CompTaskNode* task_node) {
1179 const auto& machine_id = task_node->machine_id();
1180 return IsComputTaskNodeDutyRank(rank, task_node->op_node()->parallel_desc(), machine_id);
1181 });
1182}
1183
1184void BoxingTaskGraph::ToProto(const std::function<bool(TaskNode*)>& Pick,
1185 BoxingTaskGraphProto* proto) const {

Callers

nothing calls this directly

Calls 4

IsComputTaskNodeDutyRankFunction · 0.85
op_nodeMethod · 0.80
machine_idMethod · 0.45
parallel_descMethod · 0.45

Tested by

no test coverage detected