| 335 | } |
| 336 | |
| 337 | static bool isBreakOp(const Op* op) { |
| 338 | bool isWhileControlflow = false; |
| 339 | if (op->type() == OpType_While && op->main_as_WhileParam() != nullptr) { |
| 340 | isWhileControlflow = true; |
| 341 | } |
| 342 | if (op->type() == OpType_If || isWhileControlflow || op->type() == OpType_Where || op->type() == OpType_Segment || |
| 343 | op->type() == OpType_Unique || op->type() == OpType_NonMaxSuppressionV2 || op->type() == OpType_MoE) { |
| 344 | return true; |
| 345 | } |
| 346 | return false; |
| 347 | } |
| 348 | |
| 349 | static std::vector<int> _collectNeededOps(const MNN::Net* net, const std::set<int>& inputIndexes, const std::set<int>& outputIndexes) { |
| 350 | // 0: not set, 1: output, 2:input |
no test coverage detected