MCPcopy Create free account
hub / github.com/alibaba/MNN / isBreakOp

Function isBreakOp

tools/cpp/compilefornpu.cpp:103–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103static 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
117static 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

Callers 3

_findMaskToAttentionOpsFunction · 0.70
_needSplitNetFunction · 0.70
_createSubModuleInfoFunction · 0.70

Calls 2

_npuSupportOpFunction · 0.85
typeMethod · 0.45

Tested by

no test coverage detected