aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Mark Heffernan <meheff@google.com>2017-09-12 12:50:25 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-09-12 12:54:36 -0700
commit2ad85aa4db2d0d6ea71e53c0fed3c7081847c55c (patch)
tree8baaef7df7ff84edc063371c27034996b5c0b5ef
parentcd377811d118f408945c97c9aead6f7dbc8322cb (diff)
Use xla/tests:xla_internal_test_main for all tests under tf/compiler/xla
and remove any main() definitions in tests. This enables use of flags in all tests. PiperOrigin-RevId: 168424796
-rw-r--r--tensorflow/compiler/xla/service/BUILD46
-rw-r--r--tensorflow/compiler/xla/service/algebraic_simplifier_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/batchnorm_rewriter_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/buffer_assignment_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/buffer_liveness_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/call_graph_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/call_inliner_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/copy_insertion_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/cpu/BUILD8
-rw-r--r--tensorflow/compiler/xla/service/cpu/conv_canonicalization_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/cpu/cpu_instruction_fusion_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/flatten_call_graph_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/gpu/BUILD7
-rw-r--r--tensorflow/compiler/xla/service/gpu/convolution_folding_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/gpu/fusion_merger_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/gpu/hlo_schedule_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/gpu/instruction_fusion_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/gpu/layout_assignment_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/gpu/llvm_gpu_backend/BUILD2
-rw-r--r--tensorflow/compiler/xla/service/gpu/stream_assignment_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/gpu/while_transformer_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/heap_simulator_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/hlo_alias_analysis_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/hlo_computation_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/hlo_constant_folding_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/hlo_cost_analysis_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/hlo_cse_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/hlo_dataflow_analysis_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/hlo_dce_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/hlo_evaluator_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/hlo_instruction_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/hlo_module_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/hlo_ordering_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/hlo_rematerialization_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/hlo_scheduling_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/hlo_subcomputation_unification_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/hlo_tfgraph_builder_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/inliner_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/instruction_fusion_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/layout_assignment_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/liveness_util_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/reduce_precision_insertion_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/reshape_mover_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/transpose_folding_test.cc4
-rw-r--r--tensorflow/compiler/xla/service/tuple_points_to_analysis_test.cc4
-rw-r--r--tensorflow/compiler/xla/tests/hlo_test_base.cc17
-rw-r--r--tensorflow/compiler/xla/tests/hlo_test_base.h5
47 files changed, 53 insertions, 196 deletions
diff --git a/tensorflow/compiler/xla/service/BUILD b/tensorflow/compiler/xla/service/BUILD
index 2773f8ec5e..d68883169a 100644
--- a/tensorflow/compiler/xla/service/BUILD
+++ b/tensorflow/compiler/xla/service/BUILD
@@ -64,7 +64,7 @@ cc_test(
"//tensorflow/compiler/xla:test_helpers",
"//tensorflow/compiler/xla:types",
"//tensorflow/compiler/xla:xla_data_proto",
- "//tensorflow/core:test_main",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -76,7 +76,7 @@ cc_test(
":hlo",
"//tensorflow/compiler/xla:test",
"//tensorflow/compiler/xla:types",
- "//tensorflow/core:test_main",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -120,6 +120,7 @@ cc_test(
"//tensorflow/compiler/xla/client:computation_builder",
"//tensorflow/compiler/xla/tests:hlo_test_base",
"//tensorflow/compiler/xla/tests:literal_test_util",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
],
)
@@ -184,7 +185,7 @@ cc_test(
"//tensorflow/compiler/xla:test",
"//tensorflow/compiler/xla:test_helpers",
"//tensorflow/compiler/xla/tests:hlo_test_base",
- "//tensorflow/core:test_main",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -196,7 +197,7 @@ cc_library(
deps = [
":hlo",
"//tensorflow/compiler/xla:test",
- "//tensorflow/core:test_main",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -207,6 +208,7 @@ cc_test(
deps = [
":hlo_matchers",
"//tensorflow/compiler/xla:shape_util",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -234,6 +236,7 @@ cc_test(
"//tensorflow/compiler/xla:test_helpers",
"//tensorflow/compiler/xla:util",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -264,6 +267,7 @@ cc_test(
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/service:hlo",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:test",
],
)
@@ -310,6 +314,7 @@ cc_test(
"//tensorflow/compiler/xla:util",
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
"//tensorflow/core:test",
],
@@ -331,6 +336,7 @@ cc_test(
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/service:hlo",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:test",
],
)
@@ -370,6 +376,7 @@ cc_test(
"//tensorflow/compiler/xla:test_helpers",
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/service:hlo",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:test",
],
)
@@ -730,6 +737,7 @@ cc_test(
":liveness_util",
":tuple_points_to_analysis",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -768,6 +776,7 @@ cc_test(
"//tensorflow/compiler/xla:util",
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -819,6 +828,7 @@ cc_test(
"//tensorflow/compiler/xla:util",
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
],
)
@@ -855,6 +865,7 @@ cc_test(
"//tensorflow/compiler/xla:types",
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -888,6 +899,7 @@ cc_test(
"//tensorflow/compiler/xla:literal_util",
"//tensorflow/compiler/xla:status_macros",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
],
)
@@ -923,6 +935,7 @@ cc_test(
"//tensorflow/compiler/xla:types",
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -957,6 +970,7 @@ cc_test(
":hlo_matchers",
":instruction_fusion",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -996,6 +1010,7 @@ cc_test(
"//tensorflow/compiler/xla:util",
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
],
)
@@ -1036,6 +1051,7 @@ cc_test(
"//tensorflow/compiler/xla:util",
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
],
)
@@ -1070,6 +1086,7 @@ cc_test(
"//tensorflow/compiler/xla:util",
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
],
)
@@ -1103,6 +1120,7 @@ cc_test(
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/tests:hlo_test_base",
"//tensorflow/compiler/xla/tests:literal_test_util",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -1212,9 +1230,9 @@ cc_test(
"//tensorflow/compiler/xla:types",
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/tests:literal_test_util",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
"//tensorflow/core:stream_executor_no_cuda",
- "//tensorflow/core:test_main",
],
)
@@ -1255,6 +1273,7 @@ cc_test(
"//tensorflow/compiler/xla/client:local_client",
"//tensorflow/compiler/xla/client:padding",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
],
)
@@ -1286,6 +1305,7 @@ cc_test(
"//tensorflow/compiler/xla:test",
"//tensorflow/compiler/xla:test_helpers",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -1316,6 +1336,7 @@ cc_test(
"//tensorflow/compiler/xla:util",
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
],
)
@@ -1388,6 +1409,7 @@ cc_test(
"//tensorflow/compiler/xla:test_helpers",
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
"//tensorflow/core:test",
],
@@ -1444,6 +1466,7 @@ cc_test(
"//tensorflow/compiler/xla:test_helpers",
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
"//tensorflow/core:test",
],
@@ -1496,6 +1519,7 @@ cc_test(
"//tensorflow/compiler/xla:test_helpers",
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
"//tensorflow/core:test",
],
@@ -1575,6 +1599,7 @@ cc_test(
"//tensorflow/compiler/xla:test_helpers",
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -1643,6 +1668,7 @@ cc_test(
"//tensorflow/compiler/xla:types",
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -1661,6 +1687,7 @@ cc_test(
"//tensorflow/compiler/xla/tests:hlo_test_base",
"//tensorflow/compiler/xla/tests:literal_test_util",
"//tensorflow/compiler/xla/tests:test_utils",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
"//tensorflow/core:test",
],
@@ -1685,6 +1712,7 @@ cc_test(
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/tests:hlo_test_base",
"//tensorflow/compiler/xla/tests:test_utils",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
],
)
@@ -1755,6 +1783,7 @@ cc_test(
"//tensorflow/compiler/xla/tests:hlo_test_base",
"//tensorflow/compiler/xla/tests:literal_test_util",
"//tensorflow/compiler/xla/tests:test_utils",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
],
)
@@ -1790,6 +1819,7 @@ cc_test(
"//tensorflow/compiler/xla:types",
"//tensorflow/compiler/xla/tests:hlo_test_base",
"//tensorflow/compiler/xla/tests:literal_test_util",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -1878,6 +1908,7 @@ cc_test(
"//tensorflow/compiler/xla:shape_util",
"//tensorflow/compiler/xla/tests:hlo_test_base",
"//tensorflow/compiler/xla/tests:test_utils",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -1904,6 +1935,7 @@ cc_test(
":hlo_tfgraph_builder",
"//tensorflow/compiler/xla/client:computation_builder",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:protos_all_cc",
],
)
@@ -1960,6 +1992,7 @@ cc_test(
"//tensorflow/compiler/xla/client:computation_builder",
"//tensorflow/compiler/xla/service/gpu:ir_emission_utils",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
],
)
@@ -1980,7 +2013,7 @@ cc_test(
deps = [
":pool",
"//tensorflow/compiler/xla:test_helpers",
- "//tensorflow/core:test_main",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -2023,6 +2056,7 @@ cc_test(
"//tensorflow/compiler/xla:test_helpers",
"//tensorflow/compiler/xla:xla_data_proto",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
diff --git a/tensorflow/compiler/xla/service/algebraic_simplifier_test.cc b/tensorflow/compiler/xla/service/algebraic_simplifier_test.cc
index c442e2d0bc..f968ec693f 100644
--- a/tensorflow/compiler/xla/service/algebraic_simplifier_test.cc
+++ b/tensorflow/compiler/xla/service/algebraic_simplifier_test.cc
@@ -2011,7 +2011,3 @@ TEST_F(AlgebraicSimplifierTest, ConstantTupleBecomesTupleOfConstants) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/batchnorm_rewriter_test.cc b/tensorflow/compiler/xla/service/batchnorm_rewriter_test.cc
index 07775623e7..590f79aee5 100644
--- a/tensorflow/compiler/xla/service/batchnorm_rewriter_test.cc
+++ b/tensorflow/compiler/xla/service/batchnorm_rewriter_test.cc
@@ -116,7 +116,3 @@ TEST_F(BatchNormRewriterTest, BatchNormGrad) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/buffer_assignment_test.cc b/tensorflow/compiler/xla/service/buffer_assignment_test.cc
index f2e922672b..952781df12 100644
--- a/tensorflow/compiler/xla/service/buffer_assignment_test.cc
+++ b/tensorflow/compiler/xla/service/buffer_assignment_test.cc
@@ -1766,7 +1766,3 @@ TEST_F(WhileBufferAssignmentTest, DISABLED_TwoWhiles) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/buffer_liveness_test.cc b/tensorflow/compiler/xla/service/buffer_liveness_test.cc
index 7a102d65ce..56600b5838 100644
--- a/tensorflow/compiler/xla/service/buffer_liveness_test.cc
+++ b/tensorflow/compiler/xla/service/buffer_liveness_test.cc
@@ -784,7 +784,3 @@ TEST_F(DynamicUpdateSliceLivenessTest, WithInterference) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/call_graph_test.cc b/tensorflow/compiler/xla/service/call_graph_test.cc
index 4243d37a77..0395ea8c8b 100644
--- a/tensorflow/compiler/xla/service/call_graph_test.cc
+++ b/tensorflow/compiler/xla/service/call_graph_test.cc
@@ -497,7 +497,3 @@ TEST_F(CallGraphTest, VisitWithError) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/call_inliner_test.cc b/tensorflow/compiler/xla/service/call_inliner_test.cc
index 31d3118f95..f3e7407c54 100644
--- a/tensorflow/compiler/xla/service/call_inliner_test.cc
+++ b/tensorflow/compiler/xla/service/call_inliner_test.cc
@@ -117,7 +117,3 @@ TEST_F(CallInlinerTest, CallsWithinWhileBodiesAreInlined) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/copy_insertion_test.cc b/tensorflow/compiler/xla/service/copy_insertion_test.cc
index daaf8d10bb..a2eacc5c7d 100644
--- a/tensorflow/compiler/xla/service/copy_insertion_test.cc
+++ b/tensorflow/compiler/xla/service/copy_insertion_test.cc
@@ -1121,7 +1121,3 @@ TEST_F(WhileCopyInsertionTest, InitPointsToNonDistinctUsedByTwoWhileLoops) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/cpu/BUILD b/tensorflow/compiler/xla/service/cpu/BUILD
index ecbe8fdadf..b24e55980b 100644
--- a/tensorflow/compiler/xla/service/cpu/BUILD
+++ b/tensorflow/compiler/xla/service/cpu/BUILD
@@ -461,10 +461,10 @@ cc_test(
"//tensorflow/compiler/xla:types",
"//tensorflow/compiler/xla:util",
"//tensorflow/compiler/xla/client:local_client",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:core_cpu_internal",
"//tensorflow/core:lib",
"//tensorflow/core:test",
- "//tensorflow/core:test_main",
"//third_party/eigen3",
],
)
@@ -478,6 +478,7 @@ cc_test(
"//tensorflow/compiler/xla/service:hlo_matchers",
"//tensorflow/compiler/xla/service:transpose_folding",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
],
)
@@ -489,9 +490,9 @@ cc_test(
deps = [
":cpu_runtime",
"//tensorflow/compiler/xla:shape_util",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
"//tensorflow/core:test",
- "//tensorflow/core:test_main",
],
)
@@ -590,6 +591,7 @@ cc_test(
"//tensorflow/compiler/xla:util",
"//tensorflow/compiler/xla/service:hlo",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -610,7 +612,7 @@ cc_test(
"//tensorflow/compiler/xla:test_helpers",
"//tensorflow/compiler/xla:util",
"//tensorflow/compiler/xla/tests:hlo_test_base",
- "//tensorflow/core:test_main",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
diff --git a/tensorflow/compiler/xla/service/cpu/conv_canonicalization_test.cc b/tensorflow/compiler/xla/service/cpu/conv_canonicalization_test.cc
index ec992f15e6..9e8b785f30 100644
--- a/tensorflow/compiler/xla/service/cpu/conv_canonicalization_test.cc
+++ b/tensorflow/compiler/xla/service/cpu/conv_canonicalization_test.cc
@@ -144,7 +144,3 @@ TEST_F(ConvCanonicalizationTest, CanonicalStaysTheSame) {
} // namespace cpu
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/cpu/cpu_instruction_fusion_test.cc b/tensorflow/compiler/xla/service/cpu/cpu_instruction_fusion_test.cc
index 75a665c222..0fc62281a0 100644
--- a/tensorflow/compiler/xla/service/cpu/cpu_instruction_fusion_test.cc
+++ b/tensorflow/compiler/xla/service/cpu/cpu_instruction_fusion_test.cc
@@ -405,7 +405,3 @@ TEST_F(OpcodeFusionTest, Exponential_Transpose_Negate) {
} // namespace
} // namespace cpu
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/flatten_call_graph_test.cc b/tensorflow/compiler/xla/service/flatten_call_graph_test.cc
index 12a6794ac1..bae1227659 100644
--- a/tensorflow/compiler/xla/service/flatten_call_graph_test.cc
+++ b/tensorflow/compiler/xla/service/flatten_call_graph_test.cc
@@ -225,7 +225,3 @@ TEST_F(FlattenCallGraphTest, FlattenCalls) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/gpu/BUILD b/tensorflow/compiler/xla/service/gpu/BUILD
index 28cc43bb5a..9e373eaab8 100644
--- a/tensorflow/compiler/xla/service/gpu/BUILD
+++ b/tensorflow/compiler/xla/service/gpu/BUILD
@@ -86,6 +86,7 @@ cc_test(
"//tensorflow/compiler/xla:types",
"//tensorflow/compiler/xla/service:hlo",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
],
)
@@ -312,6 +313,7 @@ cc_test(
"//tensorflow/compiler/xla/service:hlo",
"//tensorflow/compiler/xla/service:shape_inference",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:test",
],
)
@@ -335,6 +337,7 @@ cc_test(
deps = [
":instruction_fusion",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -376,6 +379,7 @@ cc_test(
":instruction_fusion",
"//tensorflow/compiler/xla:test_helpers",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -487,6 +491,7 @@ cc_test(
"//tensorflow/compiler/xla/service:computation_layout",
"//tensorflow/compiler/xla/service:hlo",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -519,6 +524,7 @@ cc_test(
"//tensorflow/compiler/xla:types",
"//tensorflow/compiler/xla/service:hlo",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
@@ -548,6 +554,7 @@ cc_test(
"//tensorflow/compiler/xla:test_helpers",
"//tensorflow/compiler/xla/service:copy_insertion",
"//tensorflow/compiler/xla/tests:hlo_test_base",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
],
)
diff --git a/tensorflow/compiler/xla/service/gpu/convolution_folding_test.cc b/tensorflow/compiler/xla/service/gpu/convolution_folding_test.cc
index ba9c70ded3..6699c8f3c4 100644
--- a/tensorflow/compiler/xla/service/gpu/convolution_folding_test.cc
+++ b/tensorflow/compiler/xla/service/gpu/convolution_folding_test.cc
@@ -550,7 +550,3 @@ TEST_F(ConvolutionFoldingTest,
} // namespace gpu
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/gpu/fusion_merger_test.cc b/tensorflow/compiler/xla/service/gpu/fusion_merger_test.cc
index 242c32936d..e68201417b 100644
--- a/tensorflow/compiler/xla/service/gpu/fusion_merger_test.cc
+++ b/tensorflow/compiler/xla/service/gpu/fusion_merger_test.cc
@@ -462,7 +462,3 @@ TEST_F(FusionMergerTest, BytesTransferredThresholdNotExeceeded) {
} // namespace
} // namespace gpu
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/gpu/hlo_schedule_test.cc b/tensorflow/compiler/xla/service/gpu/hlo_schedule_test.cc
index 118ef18c44..ece9fa04dc 100644
--- a/tensorflow/compiler/xla/service/gpu/hlo_schedule_test.cc
+++ b/tensorflow/compiler/xla/service/gpu/hlo_schedule_test.cc
@@ -393,7 +393,3 @@ TEST_F(HloScheduleTest, LatticeMatMul) {
} // namespace gpu
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/gpu/instruction_fusion_test.cc b/tensorflow/compiler/xla/service/gpu/instruction_fusion_test.cc
index 896f6ea842..bd21549f94 100644
--- a/tensorflow/compiler/xla/service/gpu/instruction_fusion_test.cc
+++ b/tensorflow/compiler/xla/service/gpu/instruction_fusion_test.cc
@@ -123,7 +123,3 @@ TEST_F(InstructionFusionTest, GetTupleElementFused) {
} // namespace gpu
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/gpu/layout_assignment_test.cc b/tensorflow/compiler/xla/service/gpu/layout_assignment_test.cc
index fa258b6e56..ac206b89d3 100644
--- a/tensorflow/compiler/xla/service/gpu/layout_assignment_test.cc
+++ b/tensorflow/compiler/xla/service/gpu/layout_assignment_test.cc
@@ -83,7 +83,3 @@ TEST_F(LayoutAssignmentTest, Elementwise) {
} // namespace
} // namespace gpu
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/gpu/llvm_gpu_backend/BUILD b/tensorflow/compiler/xla/service/gpu/llvm_gpu_backend/BUILD
index 876f14f5c4..34f5ef5445 100644
--- a/tensorflow/compiler/xla/service/gpu/llvm_gpu_backend/BUILD
+++ b/tensorflow/compiler/xla/service/gpu/llvm_gpu_backend/BUILD
@@ -59,9 +59,9 @@ cc_test(
deps = [
":llvm_gpu_backend",
"//tensorflow/compiler/xla:types",
+ "//tensorflow/compiler/xla/tests:xla_internal_test_main",
"//tensorflow/core:lib",
"//tensorflow/core:test",
- "//tensorflow/core:test_main",
"@llvm//:core",
"@llvm//:support",
],
diff --git a/tensorflow/compiler/xla/service/gpu/stream_assignment_test.cc b/tensorflow/compiler/xla/service/gpu/stream_assignment_test.cc
index a5230b3e8e..8c98956f1a 100644
--- a/tensorflow/compiler/xla/service/gpu/stream_assignment_test.cc
+++ b/tensorflow/compiler/xla/service/gpu/stream_assignment_test.cc
@@ -131,7 +131,3 @@ TEST_F(StreamAssignmentTest, LatticeMatMul) {
} // namespace gpu
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/gpu/while_transformer_test.cc b/tensorflow/compiler/xla/service/gpu/while_transformer_test.cc
index 51d38f8421..44188473d3 100644
--- a/tensorflow/compiler/xla/service/gpu/while_transformer_test.cc
+++ b/tensorflow/compiler/xla/service/gpu/while_transformer_test.cc
@@ -194,7 +194,3 @@ TEST_F(WhileTransformerTest, InvalidLoopIncrement) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/heap_simulator_test.cc b/tensorflow/compiler/xla/service/heap_simulator_test.cc
index 52b3994f1f..17b926c874 100644
--- a/tensorflow/compiler/xla/service/heap_simulator_test.cc
+++ b/tensorflow/compiler/xla/service/heap_simulator_test.cc
@@ -847,7 +847,3 @@ TEST_F(LazyBestFitHeapTest, Alignment) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/hlo_alias_analysis_test.cc b/tensorflow/compiler/xla/service/hlo_alias_analysis_test.cc
index d898e75f94..e7ff9e7cf3 100644
--- a/tensorflow/compiler/xla/service/hlo_alias_analysis_test.cc
+++ b/tensorflow/compiler/xla/service/hlo_alias_analysis_test.cc
@@ -820,7 +820,3 @@ TEST_F(HloAliasAnalysisTest, Bitcast) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/hlo_computation_test.cc b/tensorflow/compiler/xla/service/hlo_computation_test.cc
index abd99e64df..ccab7bf348 100644
--- a/tensorflow/compiler/xla/service/hlo_computation_test.cc
+++ b/tensorflow/compiler/xla/service/hlo_computation_test.cc
@@ -553,7 +553,3 @@ TEST_F(HloComputationTest, Reachability) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/hlo_constant_folding_test.cc b/tensorflow/compiler/xla/service/hlo_constant_folding_test.cc
index 3ae499d5e0..7b552ee5b1 100644
--- a/tensorflow/compiler/xla/service/hlo_constant_folding_test.cc
+++ b/tensorflow/compiler/xla/service/hlo_constant_folding_test.cc
@@ -204,7 +204,3 @@ TEST_F(HloConstantFoldingTest, TransposeConstantFold) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/hlo_cost_analysis_test.cc b/tensorflow/compiler/xla/service/hlo_cost_analysis_test.cc
index b7d4cb4cba..0a288a77ad 100644
--- a/tensorflow/compiler/xla/service/hlo_cost_analysis_test.cc
+++ b/tensorflow/compiler/xla/service/hlo_cost_analysis_test.cc
@@ -442,7 +442,3 @@ TEST_F(HloCostAnalysisTest, TupleCost) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/hlo_cse_test.cc b/tensorflow/compiler/xla/service/hlo_cse_test.cc
index 8b0b9c8bbd..bda1f120fd 100644
--- a/tensorflow/compiler/xla/service/hlo_cse_test.cc
+++ b/tensorflow/compiler/xla/service/hlo_cse_test.cc
@@ -435,7 +435,3 @@ TEST_F(HloCseTest, DISABLED_DoNotCombineCallsToImpureFunctions) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/hlo_dataflow_analysis_test.cc b/tensorflow/compiler/xla/service/hlo_dataflow_analysis_test.cc
index da4505f833..4939335e2f 100644
--- a/tensorflow/compiler/xla/service/hlo_dataflow_analysis_test.cc
+++ b/tensorflow/compiler/xla/service/hlo_dataflow_analysis_test.cc
@@ -1490,7 +1490,3 @@ INSTANTIATE_TEST_CASE_P(HloDataflowAnalysisInstantiation,
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/hlo_dce_test.cc b/tensorflow/compiler/xla/service/hlo_dce_test.cc
index 7354ef4043..8fdc2fe2c5 100644
--- a/tensorflow/compiler/xla/service/hlo_dce_test.cc
+++ b/tensorflow/compiler/xla/service/hlo_dce_test.cc
@@ -304,7 +304,3 @@ TEST_F(HloDceTest, CalledComputationWithNestedSideEffect) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/hlo_evaluator_test.cc b/tensorflow/compiler/xla/service/hlo_evaluator_test.cc
index b04bef7652..9205f5dc4e 100644
--- a/tensorflow/compiler/xla/service/hlo_evaluator_test.cc
+++ b/tensorflow/compiler/xla/service/hlo_evaluator_test.cc
@@ -1598,7 +1598,3 @@ TEST_F(HloEvaluatorTest, Reverse) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/hlo_instruction_test.cc b/tensorflow/compiler/xla/service/hlo_instruction_test.cc
index 2e1eeee36b..3601d5cdbe 100644
--- a/tensorflow/compiler/xla/service/hlo_instruction_test.cc
+++ b/tensorflow/compiler/xla/service/hlo_instruction_test.cc
@@ -1194,7 +1194,3 @@ TEST_F(HloInstructionTest, Stringification) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/hlo_module_test.cc b/tensorflow/compiler/xla/service/hlo_module_test.cc
index 56dc563203..20eef2f7d5 100644
--- a/tensorflow/compiler/xla/service/hlo_module_test.cc
+++ b/tensorflow/compiler/xla/service/hlo_module_test.cc
@@ -128,7 +128,3 @@ TEST_F(HloModuleTest, DiamondComputationsPostOrder) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/hlo_ordering_test.cc b/tensorflow/compiler/xla/service/hlo_ordering_test.cc
index c95e44bd5d..dbd63eceed 100644
--- a/tensorflow/compiler/xla/service/hlo_ordering_test.cc
+++ b/tensorflow/compiler/xla/service/hlo_ordering_test.cc
@@ -309,7 +309,3 @@ TEST_F(HloOrderingTest, ValuesInWhileComputations) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/hlo_rematerialization_test.cc b/tensorflow/compiler/xla/service/hlo_rematerialization_test.cc
index 2358969f38..7dc42ae797 100644
--- a/tensorflow/compiler/xla/service/hlo_rematerialization_test.cc
+++ b/tensorflow/compiler/xla/service/hlo_rematerialization_test.cc
@@ -525,7 +525,3 @@ INSTANTIATE_TEST_CASE_P(IndirectUseTestInstantiation, IndirectUseTest,
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/hlo_scheduling_test.cc b/tensorflow/compiler/xla/service/hlo_scheduling_test.cc
index d09d22ee40..7fb338e704 100644
--- a/tensorflow/compiler/xla/service/hlo_scheduling_test.cc
+++ b/tensorflow/compiler/xla/service/hlo_scheduling_test.cc
@@ -91,7 +91,3 @@ TEST_F(MinimumMemoryForSequenceTest, MultiComputation) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/hlo_subcomputation_unification_test.cc b/tensorflow/compiler/xla/service/hlo_subcomputation_unification_test.cc
index e3d287d4c9..33b3634cfc 100644
--- a/tensorflow/compiler/xla/service/hlo_subcomputation_unification_test.cc
+++ b/tensorflow/compiler/xla/service/hlo_subcomputation_unification_test.cc
@@ -206,7 +206,3 @@ TEST_F(HloSubcomputationUnificationTest, TwoIdenticalComputations) {
}
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/hlo_tfgraph_builder_test.cc b/tensorflow/compiler/xla/service/hlo_tfgraph_builder_test.cc
index 8e9d93e367..f8d98f0678 100644
--- a/tensorflow/compiler/xla/service/hlo_tfgraph_builder_test.cc
+++ b/tensorflow/compiler/xla/service/hlo_tfgraph_builder_test.cc
@@ -182,7 +182,3 @@ TEST_F(HloTfGraphBuilderTest, EmbeddedComputationsDiamond) {
} // namespace
} // namespace hlo_graph_dumper
} // namespace xla
-
-int main(int argc, char **argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/inliner_test.cc b/tensorflow/compiler/xla/service/inliner_test.cc
index 84bfbb30c3..9d845c5545 100644
--- a/tensorflow/compiler/xla/service/inliner_test.cc
+++ b/tensorflow/compiler/xla/service/inliner_test.cc
@@ -110,7 +110,3 @@ TEST_F(InlinerTest, MapConstant) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/instruction_fusion_test.cc b/tensorflow/compiler/xla/service/instruction_fusion_test.cc
index b3e0007dcc..c7f45e7ab0 100644
--- a/tensorflow/compiler/xla/service/instruction_fusion_test.cc
+++ b/tensorflow/compiler/xla/service/instruction_fusion_test.cc
@@ -220,7 +220,3 @@ TEST_F(InstructionFusionTest, AllowEffectiveUnaryDuplication) {
}
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/layout_assignment_test.cc b/tensorflow/compiler/xla/service/layout_assignment_test.cc
index f69c043f32..eb240e6eef 100644
--- a/tensorflow/compiler/xla/service/layout_assignment_test.cc
+++ b/tensorflow/compiler/xla/service/layout_assignment_test.cc
@@ -589,7 +589,3 @@ TEST_F(LayoutAssignmentTest, TransposeToBitcastToUser) {
}
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/liveness_util_test.cc b/tensorflow/compiler/xla/service/liveness_util_test.cc
index 6a4fde8761..d89dab4a82 100644
--- a/tensorflow/compiler/xla/service/liveness_util_test.cc
+++ b/tensorflow/compiler/xla/service/liveness_util_test.cc
@@ -366,7 +366,3 @@ TEST_F(CanShareOperandBufferWithUserTest, WhileCanShare) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/reduce_precision_insertion_test.cc b/tensorflow/compiler/xla/service/reduce_precision_insertion_test.cc
index 064020896e..a62560be59 100644
--- a/tensorflow/compiler/xla/service/reduce_precision_insertion_test.cc
+++ b/tensorflow/compiler/xla/service/reduce_precision_insertion_test.cc
@@ -549,7 +549,3 @@ TEST_F(ReducePrecisionInsertionTest, MakeFilterFunctionWithSubstrings) {
}
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/reshape_mover_test.cc b/tensorflow/compiler/xla/service/reshape_mover_test.cc
index 1589d52a25..a81d3f4eb3 100644
--- a/tensorflow/compiler/xla/service/reshape_mover_test.cc
+++ b/tensorflow/compiler/xla/service/reshape_mover_test.cc
@@ -534,7 +534,3 @@ TEST_F(ReshapeMoverTest, MultiplePasses) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/transpose_folding_test.cc b/tensorflow/compiler/xla/service/transpose_folding_test.cc
index 4381590a64..a5be4ab7ed 100644
--- a/tensorflow/compiler/xla/service/transpose_folding_test.cc
+++ b/tensorflow/compiler/xla/service/transpose_folding_test.cc
@@ -369,7 +369,3 @@ TEST_F(TransposeFoldingTest, FoldConvTransposeLhs) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/service/tuple_points_to_analysis_test.cc b/tensorflow/compiler/xla/service/tuple_points_to_analysis_test.cc
index 5a23553d4e..dfa94db5db 100644
--- a/tensorflow/compiler/xla/service/tuple_points_to_analysis_test.cc
+++ b/tensorflow/compiler/xla/service/tuple_points_to_analysis_test.cc
@@ -763,7 +763,3 @@ TEST_F(FusionPointsToAnalysisTest, FusionParam0TwoUsers) {
} // namespace
} // namespace xla
-
-int main(int argc, char** argv) {
- return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
-}
diff --git a/tensorflow/compiler/xla/tests/hlo_test_base.cc b/tensorflow/compiler/xla/tests/hlo_test_base.cc
index 8149e2b7cc..cc32151549 100644
--- a/tensorflow/compiler/xla/tests/hlo_test_base.cc
+++ b/tensorflow/compiler/xla/tests/hlo_test_base.cc
@@ -173,21 +173,4 @@ string HloTestBase::TestName() {
return ::testing::UnitTest::GetInstance()->current_test_info()->name();
}
-int ParseDebugOptionsFlagsAndRunTests(int argc, char** argv) {
- std::vector<tensorflow::Flag> flag_list;
- xla::legacy_flags::AppendDebugOptionsFlags(&flag_list);
- xla::string usage = tensorflow::Flags::Usage(argv[0], flag_list);
- const bool parse_result = tensorflow::Flags::Parse(&argc, argv, flag_list);
- if (!parse_result) {
- LOG(ERROR) << "\n" << usage;
- return 2;
- }
- ::testing::InitGoogleTest(&argc, argv);
- if (argc > 1) {
- LOG(ERROR) << "Unknown argument " << argv[1] << "\n" << usage;
- return 2;
- }
- return RUN_ALL_TESTS();
-}
-
} // namespace xla
diff --git a/tensorflow/compiler/xla/tests/hlo_test_base.h b/tensorflow/compiler/xla/tests/hlo_test_base.h
index 7f3d163290..b3ab4819b3 100644
--- a/tensorflow/compiler/xla/tests/hlo_test_base.h
+++ b/tensorflow/compiler/xla/tests/hlo_test_base.h
@@ -113,11 +113,6 @@ class HloTestBase : public ::testing::Test {
std::unique_ptr<EigenThreadPoolWrapper> thread_pool_wrapper_;
};
-// Convenience function that parses XLA debug options flags from argc/argv,
-// calls InitGoogleTest and then calls and returns RUN_ALL_TESTS. Intended to be
-// invoked from a test main() function.
-int ParseDebugOptionsFlagsAndRunTests(int argc, char** argv);
-
} // namespace xla
#endif // TENSORFLOW_COMPILER_XLA_TESTS_HLO_TEST_BASE_H_