| 20 | |
| 21 | namespace MNN { |
| 22 | static 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 | } |
| 35 | static 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); |
no test coverage detected