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

Method Account

tensorflow/core/profiler/internal/tfprof_scope.cc:196–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196std::vector<ScopeNode*> TFScope::Account(const std::vector<ScopeNode*>& roots,
197 const Options& opts) {
198 std::vector<ScopeNode*> act_nodes;
199
200 for (ScopeNode* node : roots) {
201 node->ResetTotalStats();
202 std::vector<ScopeNode*> act_cnodes = Account(node->children, opts);
203
204 node->account = ReAccount(node, opts);
205 if (node->account || !act_cnodes.empty()) {
206 node->show_children.clear();
207 node->ResetTotalStats();
208 node->AddSelfToTotalStats();
209 for (ScopeNode* c : act_cnodes) {
210 node->AggregateTotalStats(c);
211 node->show_children.push_back(c);
212 }
213 act_nodes.push_back(node);
214 }
215 }
216 return act_nodes;
217}
218} // namespace tfprof
219} // namespace tensorflow

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