MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Account

Method Account

tensorflow/core/profiler/internal/tfprof_code.cc:607–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

605}
606
607std::vector<CodeNode*> TFCode::Account(const std::vector<CodeNode*>& roots,
608 const Options& opts) {
609 std::vector<CodeNode*> act_nodes;
610
611 for (CodeNode* node : roots) {
612 node->ResetTotalStats();
613 std::vector<CodeNode*> act_cnodes = Account(node->children, opts);
614 node->account = ReAccount(node, opts);
615 if (node->account || !act_cnodes.empty()) {
616 node->show_children.clear();
617 node->ResetTotalStats();
618 node->AddSelfToTotalStats();
619 for (CodeNode* c : act_cnodes) {
620 node->AggregateTotalStats(c);
621 node->show_children.push_back(c);
622 }
623 act_nodes.push_back(node);
624 }
625 }
626 return act_nodes;
627}
628
629string TFCode::FormatNodeMemory(CodeNode* node, int64 bytes,
630 int64 total_bytes) const {

Callers

nothing calls this directly

Calls 6

ResetTotalStatsMethod · 0.80
AddSelfToTotalStatsMethod · 0.80
AggregateTotalStatsMethod · 0.80
emptyMethod · 0.45
clearMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected