| 126 | } |
| 127 | |
| 128 | std::shared_ptr<Shape> TaskNode::GetFastestInputOutputTimeShape() const { |
| 129 | std::shared_ptr<Shape> shape; |
| 130 | auto UpdateRetShape = [&](TaskEdge* edge) { |
| 131 | for (const auto& regst : edge->GetRegsts()) { |
| 132 | if (!shape || shape->elem_cnt() < regst->data_regst_time_shape()->elem_cnt()) { |
| 133 | shape = regst->data_regst_time_shape(); |
| 134 | } |
| 135 | } |
| 136 | }; |
| 137 | ForEachOutDataEdge(UpdateRetShape); |
| 138 | if (shape) { return shape; } |
| 139 | ForEachInDataEdge(UpdateRetShape); |
| 140 | return shape; |
| 141 | } |
| 142 | |
| 143 | void TaskNode::ForEachConsumedDataRegst( |
| 144 | const std::function<void(const std::string&, const RegstDesc*)>& Handler) const { |
no test coverage detected