| 101 | } |
| 102 | |
| 103 | static bool isBreakOp(const Op* op) { |
| 104 | bool isWhileControlflow = false; |
| 105 | if (op->type() == OpType_While && op->main_as_WhileParam() != nullptr) { |
| 106 | isWhileControlflow = true; |
| 107 | } |
| 108 | if (op->type() == OpType_If || isWhileControlflow || op->type() == OpType_Where || op->type() == OpType_Segment || op->type() == OpType_Unique || op->type() == OpType_NonMaxSuppressionV2) { |
| 109 | return true; |
| 110 | } |
| 111 | if (!_npuSupportOp(op)) { |
| 112 | return true; |
| 113 | } |
| 114 | return false; |
| 115 | } |
| 116 | |
| 117 | static std::vector<int> _collectNeededOps(const MNN::Net* net, const std::set<int>& inputIndexes, const std::set<int>& outputIndexes) { |
| 118 | // 0: not set, 1: output, 2:input |
no test coverage detected