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

Method BuildTaskPath

oneflow/core/graph/task_graph.cpp:1037–1049  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1035}
1036
1037void TaskGraph::BuildTaskPath(TaskNode* src_node, TaskNode* dst_node, const LogicalBlobId& lbi,
1038 bool is_host_mem_input) {
1039 const MemZoneId dst_mem_zone_id = [&]() {
1040 if (is_host_mem_input) {
1041 MemZoneId mem_zone_id = dst_node->MemZoneId121();
1042 return MemZoneId(mem_zone_id.rank(), DeviceType::kCPU, 0);
1043 } else {
1044 return dst_node->MemZoneId121();
1045 }
1046 }();
1047 TaskNode* proxy_node = GetProxyNode(src_node, lbi, dst_mem_zone_id);
1048 ConnectWithLbi(proxy_node, dst_node, lbi);
1049}
1050
1051Maybe<void> GlobalTaskGraph::Init() {
1052 OpGraph* op_graph = Singleton<OpGraph>::Get();

Callers

nothing calls this directly

Calls 2

MemZoneId121Method · 0.45
rankMethod · 0.45

Tested by

no test coverage detected