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
This commit is contained in:
parent
cd377811d1
commit
2ad85aa4db
@ -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",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -2011,7 +2011,3 @@ TEST_F(AlgebraicSimplifierTest, ConstantTupleBecomesTupleOfConstants) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -116,7 +116,3 @@ TEST_F(BatchNormRewriterTest, BatchNormGrad) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -1766,7 +1766,3 @@ TEST_F(WhileBufferAssignmentTest, DISABLED_TwoWhiles) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -784,7 +784,3 @@ TEST_F(DynamicUpdateSliceLivenessTest, WithInterference) {
|
||||
} // namespace
|
||||
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -497,7 +497,3 @@ TEST_F(CallGraphTest, VisitWithError) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -117,7 +117,3 @@ TEST_F(CallInlinerTest, CallsWithinWhileBodiesAreInlined) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -1121,7 +1121,3 @@ TEST_F(WhileCopyInsertionTest, InitPointsToNonDistinctUsedByTwoWhileLoops) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -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",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -144,7 +144,3 @@ TEST_F(ConvCanonicalizationTest, CanonicalStaysTheSame) {
|
||||
|
||||
} // namespace cpu
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -225,7 +225,3 @@ TEST_F(FlattenCallGraphTest, FlattenCalls) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -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",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -550,7 +550,3 @@ TEST_F(ConvolutionFoldingTest,
|
||||
|
||||
} // namespace gpu
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -462,7 +462,3 @@ TEST_F(FusionMergerTest, BytesTransferredThresholdNotExeceeded) {
|
||||
} // namespace
|
||||
} // namespace gpu
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -393,7 +393,3 @@ TEST_F(HloScheduleTest, LatticeMatMul) {
|
||||
|
||||
} // namespace gpu
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -123,7 +123,3 @@ TEST_F(InstructionFusionTest, GetTupleElementFused) {
|
||||
|
||||
} // namespace gpu
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -83,7 +83,3 @@ TEST_F(LayoutAssignmentTest, Elementwise) {
|
||||
} // namespace
|
||||
} // namespace gpu
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -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",
|
||||
],
|
||||
|
@ -131,7 +131,3 @@ TEST_F(StreamAssignmentTest, LatticeMatMul) {
|
||||
|
||||
} // namespace gpu
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -194,7 +194,3 @@ TEST_F(WhileTransformerTest, InvalidLoopIncrement) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -847,7 +847,3 @@ TEST_F(LazyBestFitHeapTest, Alignment) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -820,7 +820,3 @@ TEST_F(HloAliasAnalysisTest, Bitcast) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -553,7 +553,3 @@ TEST_F(HloComputationTest, Reachability) {
|
||||
} // namespace
|
||||
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -204,7 +204,3 @@ TEST_F(HloConstantFoldingTest, TransposeConstantFold) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -442,7 +442,3 @@ TEST_F(HloCostAnalysisTest, TupleCost) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -435,7 +435,3 @@ TEST_F(HloCseTest, DISABLED_DoNotCombineCallsToImpureFunctions) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -1490,7 +1490,3 @@ INSTANTIATE_TEST_CASE_P(HloDataflowAnalysisInstantiation,
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -304,7 +304,3 @@ TEST_F(HloDceTest, CalledComputationWithNestedSideEffect) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -1598,7 +1598,3 @@ TEST_F(HloEvaluatorTest, Reverse) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -1194,7 +1194,3 @@ TEST_F(HloInstructionTest, Stringification) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -128,7 +128,3 @@ TEST_F(HloModuleTest, DiamondComputationsPostOrder) {
|
||||
} // namespace
|
||||
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -309,7 +309,3 @@ TEST_F(HloOrderingTest, ValuesInWhileComputations) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -525,7 +525,3 @@ INSTANTIATE_TEST_CASE_P(IndirectUseTestInstantiation, IndirectUseTest,
|
||||
} // namespace
|
||||
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -91,7 +91,3 @@ TEST_F(MinimumMemoryForSequenceTest, MultiComputation) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -206,7 +206,3 @@ TEST_F(HloSubcomputationUnificationTest, TwoIdenticalComputations) {
|
||||
}
|
||||
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -110,7 +110,3 @@ TEST_F(InlinerTest, MapConstant) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -220,7 +220,3 @@ TEST_F(InstructionFusionTest, AllowEffectiveUnaryDuplication) {
|
||||
}
|
||||
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -589,7 +589,3 @@ TEST_F(LayoutAssignmentTest, TransposeToBitcastToUser) {
|
||||
}
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -366,7 +366,3 @@ TEST_F(CanShareOperandBufferWithUserTest, WhileCanShare) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -549,7 +549,3 @@ TEST_F(ReducePrecisionInsertionTest, MakeFilterFunctionWithSubstrings) {
|
||||
}
|
||||
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -534,7 +534,3 @@ TEST_F(ReshapeMoverTest, MultiplePasses) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -369,7 +369,3 @@ TEST_F(TransposeFoldingTest, FoldConvTransposeLhs) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -763,7 +763,3 @@ TEST_F(FusionPointsToAnalysisTest, FusionParam0TwoUsers) {
|
||||
|
||||
} // namespace
|
||||
} // namespace xla
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
return xla::ParseDebugOptionsFlagsAndRunTests(argc, argv);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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_
|
||||
|
Loading…
Reference in New Issue
Block a user