| 131 | } |
| 132 | |
| 133 | void SliceBoxingTaskNode::ToTransportTaskProto(TransportTaskProto* transport_task_proto) const { |
| 134 | ToProto(transport_task_proto->mutable_task_proto(), /*check=*/false); |
| 135 | auto* proto = transport_task_proto->mutable_slice_boxing_task(); |
| 136 | for (const auto& pair : in_data_edge2slice_) { |
| 137 | int64_t edge_uid = reinterpret_cast<int64_t>(pair.first); |
| 138 | pair.second.ToProto(&(*proto->mutable_in_data_edge_uid2slice())[edge_uid]); |
| 139 | } |
| 140 | for (const auto* edge : ordered_in_data_edges_) { |
| 141 | proto->add_ordered_in_data_edge_uid(reinterpret_cast<int64_t>(edge)); |
| 142 | } |
| 143 | out_slice_.ToProto(proto->mutable_out_slice()); |
| 144 | out_shape_.ToProto(proto->mutable_out_shape()); |
| 145 | proto->set_mode(mode_); |
| 146 | } |
| 147 | |
| 148 | } // namespace oneflow |