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

Method exec_micros

tensorflow/core/profiler/internal/tfprof_node.h:507–525  ·  view source on GitHub ↗

This is overall computation time, including both cpu and accelerator. Note, cpu and accelerator might or might not run in parallel.

Source from the content-addressed store, hash-verified

505 // This is overall computation time, including both cpu and accelerator.
506 // Note, cpu and accelerator might or might not run in parallel.
507 int64 exec_micros(int64 step) const {
508 // Empty when no RunMetadata is provided.
509 if (execs_.empty()) {
510 return 0;
511 }
512 if (step >= 0) {
513 auto exec = execs_.find(step);
514 if (exec == execs_.end()) {
515 return 0;
516 }
517 return exec->second.exec_micros();
518 }
519
520 int64 total_micros = 0;
521 for (const auto& exec : execs_) {
522 total_micros += exec.second.exec_micros();
523 }
524 return total_micros / execs_.size();
525 }
526
527 // This is accelerator computation time of a step, or average of
528 // multiple step, when step < 0.

Callers 1

SnapshotNodesMethod · 0.45

Calls 4

emptyMethod · 0.45
findMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected