| 50 | void CopyTaskNode::InferProducedDataRegstTimeShape() { NaiveInferProducedDataRegstTimeShape(); } |
| 51 | |
| 52 | void 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 | |
| 68 | void CopyHdTaskNode::InitProducedRegstMemCase(MemoryCase* mem_case) { |
| 69 | if (copy_type_ == CopyHdType::H2D) { |
nothing calls this directly
no test coverage detected