MCPcopy Create free account
hub / github.com/OAID/Tengine / DumpNode

Method DumpNode

core/lib/node.cpp:38–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36namespace TEngine {
37
38void Node::DumpNode(void)
39{
40 LOG_INFO() << "\nidx: " << GetNodeIndex() << " Node: " << name_ << " OP: " << GetOp()->GetName();
41
42 if(dynamic_shape_)
43 LOG_INFO() << " Dynamic";
44
45 LOG_INFO() << "\n";
46
47 LOG_INFO() << "\tInput: " << inputs_.size() << " Output: " << outputs_.size() << std::endl;
48
49 LOG_INFO() << "\tInput Tensors:" << std::endl;
50 for(unsigned int i = 0; i < inputs_.size(); i++)
51 {
52 Tensor* p = inputs_[i]->tensor;
53 LOG_INFO() << "\t\t" << inputs_[i]->port_index << ": ";
54
55 if(p->producer)
56 {
57 Node* parent;
58 parent = p->producer->owner;
59
60 LOG_INFO() << " from node: " << parent->GetName() << " \ttensor: ";
61 }
62
63 p->DumpTensor(LOG_INFO());
64
65 LOG_INFO() << "\n";
66 }
67
68 LOG_INFO() << "\tOutput Tensors:" << std::endl;
69 for(unsigned int i = 0; i < outputs_.size(); i++)
70 {
71 Tensor* p = outputs_[i]->tensor;
72 LOG_INFO() << "\t\t" << outputs_[i]->port_index << ": ";
73 p->DumpTensor(LOG_INFO());
74 LOG_INFO() << " connects to: " << p->consumer.size() << " nodes \n";
75
76 for(unsigned k = 0; k < p->consumer.size(); k++)
77 {
78 Node* child;
79 child = p->consumer[k]->owner;
80 LOG_INFO() << "\t\tC" << k << ": " << child->GetName() << "\n";
81 }
82
83 LOG_INFO() << "\n";
84 }
85}
86
87int Node::GetParentNum(void)
88{

Callers 2

DumpGraphMethod · 0.80
RunMethod · 0.80

Calls 3

GetNameMethod · 0.80
DumpTensorMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected