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

Method Init

oneflow/core/graph/copy_task_node.cpp:52–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50void CopyTaskNode::InferProducedDataRegstTimeShape() { NaiveInferProducedDataRegstTimeShape(); }
51
52void CopyHdTaskNode::Init(CopyHdType copy_type, const DeviceId& device_id,
53 const LogicalBlobId& lbi) {
54 copy_type_ = copy_type;
55 set_machine_id(device_id.rank());
56 int64_t thrd_id = -1;
57 if (copy_type == CopyHdType::H2D) {
58 thrd_id = EncodeStreamIdToInt64(GenerateNamedTaskStreamId(device_id, "H2D"));
59 } else if (copy_type == CopyHdType::D2H) {
60 thrd_id = EncodeStreamIdToInt64(GenerateNamedTaskStreamId(device_id, "D2H"));
61 } else {
62 UNIMPLEMENTED();
63 }
64 set_thrd_id(thrd_id);
65 set_lbi(lbi);
66}
67
68void CopyHdTaskNode::InitProducedRegstMemCase(MemoryCase* mem_case) {
69 if (copy_type_ == CopyHdType::H2D) {

Callers

nothing calls this directly

Calls 3

EncodeStreamIdToInt64Function · 0.85
rankMethod · 0.45

Tested by

no test coverage detected