| 87 | void SliceBoxingTaskNode::SetOutShape(const Shape& shape) { out_shape_ = shape; } |
| 88 | |
| 89 | OperatorConf SliceBoxingTaskNode::GetBoxingOpConf() { |
| 90 | OperatorConf op_conf{}; |
| 91 | op_conf.set_device_tag(*CHECK_JUST(DeviceTag4DeviceType(device_type()))); |
| 92 | SliceBoxingConf boxing_conf{}; |
| 93 | *boxing_conf.mutable_lbi() = lbi(); |
| 94 | out_slice_.ToProto(boxing_conf.mutable_out_slice()); |
| 95 | out_shape_.ToProto(boxing_conf.mutable_out_shape()); |
| 96 | for (const TaskEdge* edge : ordered_in_data_edges_) { |
| 97 | in_data_edge2slice_.at(edge).ToProto(boxing_conf.mutable_in_slice()->Add()); |
| 98 | } |
| 99 | if (mode_ == kSliceBoxingTaskModeCopy) { |
| 100 | op_conf.set_name("System-Boxing-BoxingCopy-" + NewUniqueId()); |
| 101 | SliceBoxingCopyOpConf* conf = op_conf.mutable_slice_boxing_copy_conf(); |
| 102 | *conf->mutable_slice_boxing_conf() = boxing_conf; |
| 103 | } else if (mode_ == kSliceBoxingTaskModeAdd) { |
| 104 | op_conf.set_name("System-Boxing-BoxingAdd-" + NewUniqueId()); |
| 105 | SliceBoxingAddOpConf* conf = op_conf.mutable_slice_boxing_add_conf(); |
| 106 | *conf->mutable_slice_boxing_conf() = boxing_conf; |
| 107 | } else { |
| 108 | UNIMPLEMENTED(); |
| 109 | } |
| 110 | return op_conf; |
| 111 | } |
| 112 | |
| 113 | Maybe<void> SliceBoxingTaskNode::InitTransportTaskFromProto( |
| 114 | const TransportTaskProto& transport_task_proto, const TaskGraphRebuildCtx& ctx) { |
nothing calls this directly
no test coverage detected