diff options
author | Andrew Harp <andrewharp@google.com> | 2016-12-12 21:15:49 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-12-12 21:25:00 -0800 |
commit | b714503af6beb11a3f370c21e8a830b00d0b130e (patch) | |
tree | 26238f0d27e6b76222902b8530c67d15e310fe75 /tensorflow/core/util/stat_summarizer.h | |
parent | f6585e1210eb5f48554d2de38e4e5ca09f734096 (diff) |
Refactor StatSummarizer and make it print a summary by node type.
Change: 141848201
Diffstat (limited to 'tensorflow/core/util/stat_summarizer.h')
-rw-r--r-- | tensorflow/core/util/stat_summarizer.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tensorflow/core/util/stat_summarizer.h b/tensorflow/core/util/stat_summarizer.h index 7fc43d449b..57b17bd208 100644 --- a/tensorflow/core/util/stat_summarizer.h +++ b/tensorflow/core/util/stat_summarizer.h @@ -16,14 +16,14 @@ limitations under the License. #ifndef TENSORFLOW_UTIL_STAT_SUMMARIZER_H_ #define TENSORFLOW_UTIL_STAT_SUMMARIZER_H_ +#include <stdlib.h> + #include <cmath> #include <limits> #include <map> #include <sstream> #include <string> -#include <stdlib.h> - #include "tensorflow/core/framework/tensor.h" #include "tensorflow/core/framework/types.pb.h" #include "tensorflow/core/platform/types.h" @@ -158,6 +158,8 @@ class StatSummarizer { double cdf_cutoff_ratio = 1.0, int num_max_nodes_to_print = std::numeric_limits<int>::max()) const; + std::string GetStatsByNodeType() const; + void Reset() { run_total_micros_.Reset(); memory_.Reset(); @@ -184,6 +186,8 @@ class StatSummarizer { BY_RUN_ORDER, }; + void Validate(const Detail* detail, const NodeExecStats& ns) const; + // Summarizes all nodes' stat in the order of node names defined in the graph. std::string GetStatsByOrderOfNodeDefinitions(bool use_memory) const; |