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

Function FormatCPUExecTime

tensorflow/core/profiler/internal/tfprof_op.cc:47–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45 .c_str());
46}
47string FormatCPUExecTime(const ShowMultiNode* node, const ShowMultiNode* root) {
48 double accu_pct = 0.0;
49 double pct = 0.0;
50 if (node->proto().total_cpu_exec_micros() > 0) {
51 accu_pct = 100.0 * node->proto().total_cpu_exec_micros() /
52 root->proto().total_cpu_exec_micros();
53 pct = 100.0 * node->proto().cpu_exec_micros() /
54 root->proto().total_cpu_exec_micros();
55 }
56
57 return strings::Printf(
58 "%30s",
59 strings::Printf("%s (%.2f%%, %.2f%%)",
60 FormatTime(node->proto().cpu_exec_micros()).c_str(),
61 accu_pct, pct)
62 .c_str());
63}
64string FormatAcceleratorExecTime(const ShowMultiNode* node,
65 const ShowMultiNode* root) {
66 double accu_pct = 0.0;

Callers 3

FormatNodeMethod · 0.70
FormatNodeMethod · 0.70
FormatTimesMethod · 0.70

Calls 5

PrintfFunction · 0.85
FormatTimeFunction · 0.85
protoMethod · 0.80
c_strMethod · 0.80
cpu_exec_microsMethod · 0.45

Tested by

no test coverage detected