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

Function opStr

codegen/SourceModule.cpp:70–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68};
69
70static std::string opStr(const Op* op) {
71 std::stringstream ss;
72 ss << EnumNameOpType(op->type()) << "[";
73 switch (op->type())
74 {
75 case OpType_BinaryOp:
76 ss << EnumNameBinaryOpOperation(static_cast<MNN::BinaryOpOperation>(op->main_as_BinaryOp()->opType()));
77 break;
78 case OpType_UnaryOp:
79 ss << EnumNameUnaryOpOperation(static_cast<MNN::UnaryOpOperation>(op->main_as_UnaryOp()->opType()));
80 break;
81 case OpType_Eltwise:
82 ss << EnumNameEltwiseType(static_cast<MNN::EltwiseType>(op->main_as_Eltwise()->type()));
83 break;
84 default:
85 break;
86 }
87 ss << "]_";
88 return ss.str();
89}
90
91InOutTensors SourceModule::buildKernel(std::vector<Node*> nodes, int idx) {
92 VarScope scope;

Callers 1

buildKernelMethod · 0.85

Calls 7

EnumNameOpTypeFunction · 0.85
EnumNameUnaryOpOperationFunction · 0.85
EnumNameEltwiseTypeFunction · 0.85
typeMethod · 0.45
opTypeMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected