aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/util/stat_summarizer.cc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-04-20 06:06:39 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-04-20 07:30:06 -0700
commited108f7d27a0df53d8ca97dd49660f8d71c47236 (patch)
tree75fe7d3d76ebcf5ef3268c62f0a1e5712e0a277f /tensorflow/core/util/stat_summarizer.cc
parent173a4104edfc5a2e81aff0684607f29c00f417c8 (diff)
Properly aggregate memcpyH2DAsync in the "per node type" summaries in StatSummarizer.
Change: 153705191
Diffstat (limited to 'tensorflow/core/util/stat_summarizer.cc')
-rw-r--r--tensorflow/core/util/stat_summarizer.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/tensorflow/core/util/stat_summarizer.cc b/tensorflow/core/util/stat_summarizer.cc
index f8f071e0fa..8300ba370e 100644
--- a/tensorflow/core/util/stat_summarizer.cc
+++ b/tensorflow/core/util/stat_summarizer.cc
@@ -271,11 +271,14 @@ void StatSummarizer::ComputeStatsByType(
std::map<string, int64>* node_type_map_time,
std::map<string, int64>* node_type_map_memory,
int64* accumulated_us) const {
+ int64 run_count = run_total_us_.count();
+
for (const auto& det : details_) {
const string node_name = det.first;
const Detail& detail = det.second;
- int64 curr_time_val = detail.rel_end_us.avg();
+ int64 curr_time_val =
+ static_cast<int64>(detail.rel_end_us.sum() / run_count);
*accumulated_us += curr_time_val;
int64 curr_memory_val = detail.mem_used.newest();