diff --git a/tensorflow/compiler/mlir/tensorflow/tests/tpu_bridge_v1/end_to_end.mlir b/tensorflow/compiler/mlir/tensorflow/tests/tpu_bridge_v1/end_to_end.mlir index fe33624c1d7..b9bc0e17f2a 100644 --- a/tensorflow/compiler/mlir/tensorflow/tests/tpu_bridge_v1/end_to_end.mlir +++ b/tensorflow/compiler/mlir/tensorflow/tests/tpu_bridge_v1/end_to_end.mlir @@ -5,6 +5,7 @@ module attributes {tf.devices = ["/job:localhost/replica:0/task:0/device:CPU:0", // CHECK: std.constant // CHECK: TPUCompile // CHECK: TPUExecute +// CHECK-NOT: func @_func tf_executor.graph { %outputs, %control = tf_executor.island wraps "std.constant"() {value = dense<2.000000e+00> : tensor} : () -> tensor %outputs_0, %control_1 = tf_executor.island wraps "std.constant"() {value = dense<3.000000e+00> : tensor} : () -> tensor diff --git a/tensorflow/compiler/mlir/tensorflow/transforms/bridge.cc b/tensorflow/compiler/mlir/tensorflow/transforms/bridge.cc index 2e1201c10c5..73130640d1b 100644 --- a/tensorflow/compiler/mlir/tensorflow/transforms/bridge.cc +++ b/tensorflow/compiler/mlir/tensorflow/transforms/bridge.cc @@ -97,6 +97,7 @@ void CreateTPUBridgePipeline(OpPassManager &pm) { pm.addPass(CreateTPUShardingIdentificationPass()); pm.addPass(TFDevice::CreateAnnotateParameterReplicationPass()); pm.addPass(CreateTPURewritePass()); + pm.addPass(createSymbolDCEPass()); pm.addNestedPass(TFDevice::CreateReplicateInvariantOpHoistingPass()); pm.addNestedPass(CreateTPUDynamicLayoutPass()); pm.addNestedPass(CreateTPUMergeVariablesWithExecutePass());