aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tools/tfprof/internal/tfprof_stats.h
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/tools/tfprof/internal/tfprof_stats.h')
-rw-r--r--tensorflow/tools/tfprof/internal/tfprof_stats.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/tensorflow/tools/tfprof/internal/tfprof_stats.h b/tensorflow/tools/tfprof/internal/tfprof_stats.h
index b26d274f80..dfb190e703 100644
--- a/tensorflow/tools/tfprof/internal/tfprof_stats.h
+++ b/tensorflow/tools/tfprof/internal/tfprof_stats.h
@@ -59,38 +59,28 @@ class TFStats {
const std::map<string, std::unique_ptr<TFGraphNode>>& nodes() const {
return nodes_map_;
}
- const std::set<int64>& steps() const { return steps_; }
- bool has_code_traces() const { return has_code_traces_; }
- void BuildView(const string& cmd);
- void BuildAllViews();
-
- // Note: Must first BuildView(view_foo) before ShowXXX(view_foo) methods.
- //
// Organize the TensorFlow model as different types of views, and generate
// outputs for profiling.
- // TODO(xpan): Should it return reference here?
- const TFGraphNodeProto& ShowGraphNode(const string& cmd,
- const Options& opts) const;
+ const TFGraphNodeProto& ShowGraphNode(const string& cmd, const Options& opts);
const TFMultiGraphNodeProto& ShowMultiGraphNode(const string& cmd,
- const Options& opts) const;
+ const Options& opts);
// Add a step of run time meta data.
- void AddRunMeta(int64 step, std::unique_ptr<RunMetadata> run_meta);
+ void ParseRunMeta(int64 step, std::unique_ptr<RunMetadata> run_meta);
// Add tfprof operation meta data, such as customized op type, float_ops,
// and code traces.
- void AddOpLog(std::unique_ptr<OpLog> op_log);
+ void ParseOpLog(std::unique_ptr<OpLog> op_log);
// For test purpose only.
- void AddNodeForTest(int64 step, std::unique_ptr<TFGraphNode> node);
+ void AddNodeForTest(const string& name, std::unique_ptr<TFGraphNode> node);
private:
- bool Validate(const Options& opts) const;
+ bool Validate(const Options& opts);
void ParseGraph();
std::set<int64> steps_;
- bool has_code_traces_;
std::unique_ptr<GraphDef> graph_;
std::unique_ptr<TFScope> scope_view_;
std::unique_ptr<TFGraph> graph_view_;