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

Function DumpStaticNode

core/lib/static_graph.cpp:506–552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

504/* the dump family */
505
506void DumpStaticNode(StaticGraph* graph, StaticNode* node, std::ostream& os)
507{
508 os << " " << node->name << " idx: " << node->index;
509 os << " input: " << node->input_tensor_list.size() << " output: " << node->output_tensor_list.size();
510 os << "\top: " << node->op->name << "\n";
511
512 for(unsigned int i = 0; i < node->input_tensor_list.size(); i++)
513 {
514 int index = node->input_tensor_list[i];
515 StaticTensorPtr tensor_ptr = graph->tensor_list[index];
516
517 os << "\tI" << i << ": " << tensor_ptr->name << " type: " << tensor_ptr->type;
518 os << " data_type: " << tensor_ptr->data_type << " ";
519
520 if(tensor_ptr->dims.size())
521 {
522 os << "\tshape: [";
523
524 for(unsigned int k = 0; k < tensor_ptr->dims.size(); k++)
525 os << " " << tensor_ptr->dims[k];
526
527 os << "]";
528 }
529
530 os << "\n";
531 }
532
533 for(unsigned int i = 0; i < node->output_tensor_list.size(); i++)
534 {
535 int index = node->output_tensor_list[i];
536 StaticTensorPtr tensor_ptr = graph->tensor_list[index];
537
538 os << "\tO" << i << ": " << tensor_ptr->name << " type: " << tensor_ptr->type;
539 os << " data_type: " << tensor_ptr->data_type << " ";
540
541 if(tensor_ptr->dims.size())
542 {
543 os << "\tshape: [";
544
545 for(unsigned int k = 0; k < tensor_ptr->dims.size(); k++)
546 os << " " << tensor_ptr->dims[k];
547
548 os << "]";
549 }
550 os << "\n";
551 }
552}
553
554void DumpStaticGraph(StaticGraph* graph)
555{

Callers 1

DumpStaticGraphFunction · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected