| 28 | void CopyTaskNode::ConsumeAllRegsts() { ConsumeRegst("copy_in", SoleInDataEdge()->GetSoleRegst()); } |
| 29 | |
| 30 | void CopyTaskNode::BuildExecGphAndRegst() { |
| 31 | auto out_regst = GetProducedRegst("copy_out"); |
| 32 | auto in_regst = GetSoleConsumedRegst("copy_in"); |
| 33 | out_regst->CopyBlobDescFrom(in_regst.get()); |
| 34 | ExecNode* node = mut_exec_gph().NewNode(); |
| 35 | auto constructed = CHECK_JUST(ConstructOp(NewCopyOpConf())); |
| 36 | |
| 37 | // prevent filling parallel desc for copy commnet |
| 38 | if (constructed->op_conf().has_user_conf()) { |
| 39 | std::shared_ptr<Shape> hierarchy = std::make_shared<Shape>(Shape({1})); |
| 40 | auto parallel_desc = |
| 41 | ParallelDesc::New(constructed->op_conf().device_tag(), {"0:0-0"}, hierarchy).GetOrThrow(); |
| 42 | CHECK_JUST(constructed->FillOpParallelDesc(parallel_desc)); |
| 43 | } |
| 44 | |
| 45 | node->mut_op() = constructed; |
| 46 | node->BindBnWithRegst(node->op()->SoleIbn(), in_regst); |
| 47 | node->BindBnWithRegst(node->op()->SoleObn(), out_regst); |
| 48 | } |
| 49 | |
| 50 | void CopyTaskNode::InferProducedDataRegstTimeShape() { NaiveInferProducedDataRegstTimeShape(); } |
| 51 |
nothing calls this directly
no test coverage detected