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

Function dumpOp

codegen/OpFuse.cpp:22–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20
21namespace MNN {
22static void dumpOp(const Op* op) {
23 if (op->name()) MNN_PRINT("name: %s, ", op->name()->c_str());
24 MNN_PRINT("Type: %s,\n", MNN::EnumNameOpType(op->type()));
25 if (op->type() == OpType_BinaryOp) {
26 auto binary = op->main_as_BinaryOp();
27 auto type = binary->opType();
28 MNN_PRINT("Op: %s\n", MNN::EnumNamesBinaryOpOperation()[type]);
29 } else if (op->type() == OpType_UnaryOp){
30 auto unary = op->main_as_UnaryOp();
31 auto type = unary->opType();
32 MNN_PRINT("Op: %s\n", MNN::EnumNamesUnaryOpOperation()[type]);
33 }
34}
35static void dumpRegion(Tensor::InsideDescribe::Region& reg) {
36 MNN_PRINT("\n{\nsize: [%d, %d, %d], origin: %p\n", reg.size[0], reg.size[1], reg.size[2], reg.origin);
37 MNN_PRINT("src: { stride: [%d, %d, %d], offset: %d }\n", reg.src.stride[0],reg.src.stride[1],reg.src.stride[2],reg.src.offset);

Callers 1

dumpCmdFunction · 0.85

Calls 7

EnumNameOpTypeFunction · 0.85
nameMethod · 0.45
c_strMethod · 0.45
typeMethod · 0.45
opTypeMethod · 0.45

Tested by

no test coverage detected