Skip to content

Commit d15c612

Browse files
andylytensorflower-gardener
authored andcommitted
[Grappler] Migrate FrameView to use utils::GraphView/utils::MutableGraphView.
PiperOrigin-RevId: 251659253
1 parent cd09510 commit d15c612

File tree

9 files changed

+385
-187
lines changed

9 files changed

+385
-187
lines changed

tensorflow/core/grappler/optimizers/BUILD

+4
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ cc_library(
498498
"//tensorflow/core/grappler:devices",
499499
"//tensorflow/core/grappler:grappler_item",
500500
"//tensorflow/core/grappler:op_types",
501+
"//tensorflow/core/grappler:utils",
501502
"//tensorflow/core/grappler/clusters:cluster",
502503
"//tensorflow/core/grappler/costs:graph_properties",
503504
"//tensorflow/core/grappler/costs:virtual_placer",
@@ -703,6 +704,7 @@ cc_library(
703704
"//tensorflow/core/grappler:grappler_item",
704705
"//tensorflow/core/grappler:mutable_graph_view",
705706
"//tensorflow/core/grappler:op_types",
707+
"//tensorflow/core/grappler:utils",
706708
"//tensorflow/core/grappler/costs:graph_properties",
707709
"//tensorflow/core/grappler/utils:frame",
708710
"//tensorflow/core/grappler/utils:traversal",
@@ -724,6 +726,7 @@ tf_cuda_cc_test(
724726
"//tensorflow/core/grappler:grappler_item",
725727
"//tensorflow/core/grappler:utils",
726728
"//tensorflow/core/grappler/inputs:trivial_test_graph_input_yielder",
729+
"//tensorflow/core/grappler/utils:graph_view",
727730
"//tensorflow/core/grappler/utils:grappler_test",
728731
],
729732
)
@@ -883,6 +886,7 @@ cc_library(
883886
"//tensorflow/core:protos_all_cc",
884887
"//tensorflow/core/grappler:grappler_item",
885888
"//tensorflow/core/grappler:op_types",
889+
"//tensorflow/core/grappler:utils",
886890
"//tensorflow/core/grappler/costs:graph_properties",
887891
"//tensorflow/core/grappler/utils:frame",
888892
],

tensorflow/core/grappler/optimizers/layout_optimizer.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ See the License for the specific language governing permissions and
1313
limitations under the License.
1414
==============================================================================*/
1515

16+
#include "tensorflow/core/grappler/optimizers/layout_optimizer.h"
17+
1618
#include <deque>
1719
#include <unordered_set>
1820

@@ -28,7 +30,7 @@ limitations under the License.
2830
#include "tensorflow/core/grappler/devices.h"
2931
#include "tensorflow/core/grappler/grappler_item.h"
3032
#include "tensorflow/core/grappler/op_types.h"
31-
#include "tensorflow/core/grappler/optimizers/layout_optimizer.h"
33+
#include "tensorflow/core/grappler/utils.h"
3234
#include "tensorflow/core/grappler/utils/frame.h"
3335
#include "tensorflow/core/lib/strings/numbers.h"
3436
#include "tensorflow/core/lib/strings/str_util.h"

tensorflow/core/grappler/optimizers/loop_optimizer.h

+2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ limitations under the License.
1717
#define TENSORFLOW_CORE_GRAPPLER_OPTIMIZERS_LOOP_OPTIMIZER_H_
1818

1919
#include <unordered_set>
20+
2021
#include "tensorflow/core/grappler/costs/graph_properties.h"
2122
#include "tensorflow/core/grappler/optimizers/graph_optimizer.h"
23+
#include "tensorflow/core/grappler/utils.h"
2224
#include "tensorflow/core/grappler/utils/frame.h"
2325
#include "tensorflow/core/protobuf/rewriter_config.pb.h"
2426

0 commit comments

Comments
 (0)