diff options
author | Shivani Agrawal <shivaniagrawal@google.com> | 2018-08-02 16:55:29 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-02 16:59:30 -0700 |
commit | bb3ed5ee461988f1020b9768a42ce27966ec08dc (patch) | |
tree | 0b2fdb35eda6c64dfc9a365587eee46b28c1d758 /tensorflow/core/grappler/mutable_graph_view.h | |
parent | 4bc5c6c77daea8d5e60c22732b56495a0cd6c681 (diff) |
Experimental Cl which adds `LatencyStatsDataset` op after each `Dataset` op to record latency on each edge of dataset input pipeline.
PiperOrigin-RevId: 207190025
Diffstat (limited to 'tensorflow/core/grappler/mutable_graph_view.h')
-rw-r--r-- | tensorflow/core/grappler/mutable_graph_view.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tensorflow/core/grappler/mutable_graph_view.h b/tensorflow/core/grappler/mutable_graph_view.h index 105eb972e8..971e5503d4 100644 --- a/tensorflow/core/grappler/mutable_graph_view.h +++ b/tensorflow/core/grappler/mutable_graph_view.h @@ -29,9 +29,16 @@ class MutableGraphView : public GraphView { using GraphView::GraphView; GraphDef* GetGraph() { return MutableGraph(); } + // Adds a new node to graph and updates the view. NodeDef* AddNode(NodeDef&& node); + // Inserts a new node to the graph after `input` node and updates the view. + // This adds `node` to the graph and replaces the input for the output + // nodes of `input` with a port `output_port_id` with the new node. + NodeDef* InsertNode(const NodeDef& input, NodeDef&& node, + int output_port_id = 0); + // Replaces the input for the output nodes of 'old_input' with a port // `output_port_id` with 'new_input'. // |