From 47f7619c8dfa8a26c1e4c1277d61454e656fc757 Mon Sep 17 00:00:00 2001 From: Sandeep Dasgupta Date: Wed, 22 Jan 2025 14:43:30 -0800 Subject: [PATCH] [HLO Componentization] Populate hlo/testlib sub-component (Phase II). This CL takes care of 1. Migrating external projects dependencies from ``` tensorflow/compiler/xla:test tensorflow/compiler/xla:test_helpers tensorflow/compiler/xla/service:pattern_matcher_gmock ``` to `tensorflow/compiler/xla/hlo/testlib:*` PiperOrigin-RevId: 718535002 --- .../xla/xla/hlo/transforms/simplifiers/BUILD | 70 +++++++------------ .../simplifiers/algebraic_simplifier_test.cc | 4 +- .../simplifiers/all_reduce_folder_test.cc | 2 +- .../batch_dot_simplification_test.cc | 2 +- .../bfloat16_conversion_folding_test.cc | 3 +- .../broadcast_canonicalizer_test.cc | 2 - .../simplifiers/convert_mover_test.cc | 2 +- .../convolution_group_converter_test.cc | 2 +- .../transforms/simplifiers/dot_merger_test.cc | 2 +- .../dynamic_dimension_simplifier_test.cc | 4 +- .../simplifiers/flatten_call_graph_test.cc | 1 - .../simplifiers/float_normalization_test.cc | 6 +- .../fusion_constant_sinking_test.cc | 4 +- .../hlo_computation_deduplicator_test.cc | 1 - .../hlo_constant_folding_peak_heap_test.cc | 4 +- .../simplifiers/hlo_constant_folding_test.cc | 4 +- .../simplifiers/hlo_constant_splitter_test.cc | 1 - .../transforms/simplifiers/hlo_dce_test.cc | 2 +- .../host_memory_transfer_asyncifier_test.cc | 2 +- ...optimize_input_output_buffer_alias_test.cc | 2 - .../reduce_window_rewriter_test.cc | 1 - .../simplifiers/reshape_mover_test.cc | 2 +- .../simplifiers/slice_sinker_test.cc | 2 +- .../simplifiers/sort_simplifier_test.cc | 4 +- .../simplifiers/tuple_simplifier_test.cc | 2 +- .../zero_sized_hlo_elimination_test.cc | 1 - 26 files changed, 51 insertions(+), 81 deletions(-) diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/BUILD b/third_party/xla/xla/hlo/transforms/simplifiers/BUILD index 5d2b9b94e65b4c..f616f35c93378d 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/BUILD +++ b/third_party/xla/xla/hlo/transforms/simplifiers/BUILD @@ -48,7 +48,6 @@ xla_cc_test( deps = [ ":hlo_constant_splitter", ":hlo_dce", - "//xla:test", "//xla:util", "//xla/hlo/ir:hlo", "//xla/hlo/parser:hlo_parser", @@ -85,9 +84,9 @@ xla_cc_test( srcs = ["all_reduce_folder_test.cc"], deps = [ ":all_reduce_folder", - "//xla:test", "//xla/hlo/ir:hlo", "//xla/hlo/testlib:hlo_hardware_independent_test_base", + "//xla/hlo/testlib:test", "//xla/hlo/utils:hlo_matchers", "//xla/tsl/lib/core:status_test_util", "@com_google_absl//absl/algorithm:container", @@ -119,8 +118,6 @@ xla_cc_test( srcs = ["broadcast_canonicalizer_test.cc"], deps = [ ":broadcast_canonicalizer", - "//xla:test", - "//xla:test_helpers", "//xla/hlo/testlib:hlo_hardware_independent_test_base", "@com_google_googletest//:gtest_main", # fixdeps: keep ], @@ -155,11 +152,10 @@ xla_cc_test( deps = [ ":bfloat16_conversion_folding", "//xla:shape_util", - "//xla:test", - "//xla:test_helpers", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", "//xla/hlo/testlib:hlo_hardware_independent_test_base", + "//xla/hlo/testlib:test_helpers", "//xla/service:float_support", "@com_google_absl//absl/status:statusor", "@com_google_googletest//:gtest_main", @@ -198,16 +194,16 @@ xla_cc_test( deps = [ ":float_normalization", "//xla:shape_util", - "//xla:test", - "//xla:test_helpers", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", "//xla/hlo/testlib:hlo_hardware_independent_test_base", + "//xla/hlo/testlib:pattern_matcher_gmock", + "//xla/hlo/testlib:test", + "//xla/hlo/testlib:test_helpers", "//xla/service:float_support", "//xla/service:hlo_creation_utils", "//xla/service:hlo_verifier", "//xla/service:pattern_matcher", - "//xla/service:pattern_matcher_gmock", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", @@ -243,7 +239,6 @@ xla_cc_test( ":hlo_computation_deduplicator", "//xla:literal_util", "//xla:shape_util", - "//xla:test", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", "//xla/hlo/testlib:hlo_hardware_independent_test_base", @@ -279,7 +274,6 @@ xla_cc_test( "//xla:comparison_util", "//xla:literal_util", "//xla:shape_util", - "//xla:test", "//xla:util", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", @@ -404,12 +398,10 @@ xla_cc_test( srcs = ["algebraic_simplifier_test.cc"], deps = [ ":algebraic_simplifier", - ":hlo_constant_folding", "//xla:comparison_util", "//xla:literal", "//xla:literal_util", "//xla:shape_util", - "//xla:test", "//xla:util", "//xla:window_util", "//xla:xla_data_proto_cc", @@ -417,11 +409,12 @@ xla_cc_test( "//xla/hlo/parser:hlo_parser", "//xla/hlo/pass:hlo_pass", "//xla/hlo/testlib:hlo_hardware_independent_test_base", + "//xla/hlo/testlib:pattern_matcher_gmock", + "//xla/hlo/testlib:test", "//xla/service:hlo_creation_utils", "//xla/service:host_memory_offload_annotations_hdr", "//xla/service:layout_assignment", "//xla/service:pattern_matcher", - "//xla/service:pattern_matcher_gmock", "//xla/service:shape_inference", "//xla/tsl/lib/core:status_test_util", "@com_google_absl//absl/algorithm:container", @@ -495,9 +488,9 @@ xla_cc_test( srcs = ["batch_dot_simplification_test.cc"], deps = [ ":batch_dot_simplification", - "//xla:test", "//xla/hlo/ir:hlo", "//xla/hlo/testlib:hlo_hardware_independent_test_base", + "//xla/hlo/testlib:test", "//xla/hlo/utils:hlo_matchers", "@com_google_googletest//:gtest_main", # fixdeps: keep "@local_tsl//tsl/platform:statusor", @@ -535,10 +528,10 @@ xla_cc_test( srcs = ["convolution_group_converter_test.cc"], deps = [ ":convolution_group_converter", - "//xla:test", "//xla:types", "//xla/hlo/ir:hlo", "//xla/hlo/testlib:hlo_hardware_independent_test_base", + "//xla/hlo/testlib:test", "//xla/hlo/utils:hlo_matchers", "@com_google_googletest//:gtest_main", # fixdeps: keep ], @@ -614,8 +607,8 @@ xla_cc_test( "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", "//xla/hlo/testlib:hlo_hardware_independent_test_base", + "//xla/hlo/testlib:pattern_matcher_gmock", "//xla/service:pattern_matcher", - "//xla/service:pattern_matcher_gmock", "//xla/tsl/lib/core:status_test_util", "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest", @@ -654,8 +647,8 @@ xla_cc_test( "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", "//xla/hlo/testlib:hlo_hardware_independent_test_base", + "//xla/hlo/testlib:pattern_matcher_gmock", "//xla/service:pattern_matcher", - "//xla/service:pattern_matcher_gmock", "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest_main", "@local_tsl//tsl/platform:statusor", @@ -684,9 +677,9 @@ xla_cc_test( deps = [ ":tuple_simplifier", "//xla:shape_util", - "//xla:test", "//xla/hlo/ir:hlo", "//xla/hlo/testlib:hlo_hardware_independent_test_base", + "//xla/hlo/testlib:test", "//xla/hlo/utils:hlo_matchers", "//xla/tsl/lib/core:status_test_util", "@com_google_absl//absl/strings", @@ -716,7 +709,6 @@ xla_cc_test( ":dynamic_dimension_simplifier", "//xla:literal", "//xla:shape_util", - "//xla:test", "//xla:types", "//xla:window_util", "//xla:xla_data_proto_cc", @@ -724,12 +716,12 @@ xla_cc_test( "//xla/hlo/parser:hlo_parser", "//xla/hlo/pass:hlo_pass_pipeline", "//xla/hlo/testlib:hlo_hardware_independent_test_base", + "//xla/hlo/testlib:pattern_matcher_gmock", + "//xla/hlo/testlib:test", "//xla/service:hlo_creation_utils", "//xla/service:pattern_matcher", - "//xla/service:pattern_matcher_gmock", "//xla/service:shape_inference", "//xla/tsl/lib/core:status_test_util", - "@com_google_absl//absl/strings", "@com_google_googletest//:gtest_main", # fixdeps: keep ], ) @@ -767,9 +759,9 @@ xla_cc_test( "//xla/hlo/ir:hlo", "//xla/hlo/pass:hlo_pass", "//xla/hlo/testlib:hlo_hardware_independent_test_base", + "//xla/hlo/testlib:pattern_matcher_gmock", "//xla/service:hlo_verifier", "//xla/service:pattern_matcher", - "//xla/service:pattern_matcher_gmock", "//xla/tsl/lib/core:status_test_util", "@com_google_absl//absl/status", "@com_google_googletest//:gtest", @@ -807,8 +799,8 @@ xla_cc_test( "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", "//xla/hlo/testlib:hlo_hardware_independent_test_base", + "//xla/hlo/testlib:pattern_matcher_gmock", "//xla/service:pattern_matcher", - "//xla/service:pattern_matcher_gmock", "//xla/tests:literal_test_util", "//xla/tsl/lib/core:status_test_util", "@com_google_absl//absl/algorithm:container", @@ -935,14 +927,14 @@ xla_cc_test( "//xla:literal_util", "//xla:permutation_util", "//xla:shape_util", - "//xla:test", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", "//xla/hlo/parser:hlo_parser", "//xla/hlo/testlib:hlo_hardware_independent_test_base", + "//xla/hlo/testlib:pattern_matcher_gmock", + "//xla/hlo/testlib:test", "//xla/hlo/utils:hlo_matchers", "//xla/service:pattern_matcher", - "//xla/service:pattern_matcher_gmock", "@com_google_absl//absl/strings:string_view", "@com_google_absl//absl/types:span", "@com_google_googletest//:gtest_main", @@ -959,9 +951,8 @@ xla_cc_test( # "@com_google_googletest//:gtest", # "@com_google_googletest//:gtest_main", # "@com_google_absl//absl/strings:str_format", -# "//xla:test", # "//xla/hlo/testlib:hlo_hardware_independent_test_base", -# "@local_tsl//tsl/platform:statusor", +# "//xla/tsl/platform:statusor", # ], # ) # copybara:uncomment_end @@ -1063,7 +1054,6 @@ xla_cc_test( ":zero_sized_hlo_elimination", "//xla:literal_util", "//xla:shape_util", - "//xla:test", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", "//xla/hlo/testlib:hlo_hardware_independent_test_base", @@ -1100,13 +1090,11 @@ xla_cc_test( srcs = ["sort_simplifier_test.cc"], deps = [ ":sort_simplifier", - "//xla:test", "//xla/hlo/parser:hlo_parser", "//xla/hlo/testlib:hlo_hardware_independent_test_base", - "//xla/hlo/utils:hlo_matchers", + "//xla/hlo/testlib:pattern_matcher_gmock", + "//xla/hlo/testlib:test", "//xla/service:pattern_matcher", - "//xla/service:pattern_matcher_gmock", - "//xla/tsl/lib/core:status_test_util", "@com_google_googletest//:gtest_main", "@local_tsl//tsl/platform:statusor", ], @@ -1169,8 +1157,8 @@ xla_cc_test( "//xla:util", "//xla/hlo/ir:hlo", "//xla/hlo/testlib:hlo_hardware_independent_test_base", + "//xla/hlo/testlib:pattern_matcher_gmock", "//xla/service:pattern_matcher", - "//xla/service:pattern_matcher_gmock", "//xla/tsl/lib/core:status_test_util", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", @@ -1205,11 +1193,11 @@ xla_cc_test( srcs = ["fusion_constant_sinking_test.cc"], deps = [ ":fusion_constant_sinking", - "//xla:test", "//xla/hlo/ir:hlo", "//xla/hlo/testlib:hlo_hardware_independent_test_base", + "//xla/hlo/testlib:pattern_matcher_gmock", + "//xla/hlo/testlib:test", "//xla/service:pattern_matcher", - "//xla/service:pattern_matcher_gmock", "@com_google_googletest//:gtest_main", "@local_tsl//tsl/platform:statusor", ], @@ -1241,8 +1229,6 @@ xla_cc_test( deps = [ ":optimize_input_output_buffer_alias", "//xla:shape_util", - "//xla:test", - "//xla:test_helpers", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", "//xla/hlo/testlib:hlo_hardware_independent_test_base", @@ -1323,17 +1309,12 @@ xla_cc_test( name = "slice_sinker_test", srcs = ["slice_sinker_test.cc"], deps = [ - ":hlo_dce", ":slice_sinker", - "//xla:literal_util", - "//xla:shape_util", - "//xla:types", "//xla/hlo/ir:hlo", "//xla/hlo/parser:hlo_parser", "//xla/hlo/testlib:hlo_hardware_independent_test_base", + "//xla/hlo/testlib:pattern_matcher_gmock", "//xla/service:pattern_matcher", - "//xla/service:pattern_matcher_gmock", - "//xla/tsl/lib/core:status_test_util", "@com_google_googletest//:gtest_main", "@local_tsl//tsl/platform:statusor", ], @@ -1431,7 +1412,6 @@ xla_cc_test( srcs = ["reduce_window_rewriter_test.cc"], deps = [ ":reduce_window_rewriter", - "//xla:test", "//xla:xla_data_proto_cc", "//xla/hlo/testlib:hlo_hardware_independent_test_base", "@com_google_absl//absl/strings", diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/algebraic_simplifier_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/algebraic_simplifier_test.cc index de2da6f5b3d331..0b4b588b2cbdac 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/algebraic_simplifier_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/algebraic_simplifier_test.cc @@ -45,6 +45,8 @@ limitations under the License. #include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/pass/hlo_pass_fix.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" +#include "xla/hlo/testlib/pattern_matcher_gmock.h" +#include "xla/hlo/testlib/test.h" #include "xla/layout_util.h" #include "xla/literal.h" #include "xla/literal_util.h" @@ -53,11 +55,9 @@ limitations under the License. #include "xla/service/host_memory_offload_annotations.h" #include "xla/service/layout_assignment.h" #include "xla/service/pattern_matcher.h" -#include "xla/service/pattern_matcher_gmock.h" #include "xla/service/shape_inference.h" #include "xla/shape.h" #include "xla/shape_util.h" -#include "xla/test.h" #include "xla/tsl/lib/core/status_test_util.h" #include "xla/util.h" #include "xla/window_util.h" diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/all_reduce_folder_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/all_reduce_folder_test.cc index 808b6e20f77704..e4d7a8e716a10f 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/all_reduce_folder_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/all_reduce_folder_test.cc @@ -25,8 +25,8 @@ limitations under the License. #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" +#include "xla/hlo/testlib/test.h" #include "xla/hlo/utils/hlo_matchers.h" -#include "xla/test.h" #include "xla/tsl/lib/core/status_test_util.h" #include "tsl/platform/statusor.h" diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/batch_dot_simplification_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/batch_dot_simplification_test.cc index 0cc0fca1e703cc..84aa42691e50a6 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/batch_dot_simplification_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/batch_dot_simplification_test.cc @@ -21,8 +21,8 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" +#include "xla/hlo/testlib/test.h" #include "xla/hlo/utils/hlo_matchers.h" -#include "xla/test.h" #include "tsl/platform/statusor.h" namespace xla { diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/bfloat16_conversion_folding_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/bfloat16_conversion_folding_test.cc index 39754b1d0b7f22..d115dea765e83b 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/bfloat16_conversion_folding_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/bfloat16_conversion_folding_test.cc @@ -25,11 +25,10 @@ limitations under the License. #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" +#include "xla/hlo/testlib/test_helpers.h" #include "xla/service/float_support.h" #include "xla/shape.h" #include "xla/shape_util.h" -#include "xla/test.h" -#include "xla/test_helpers.h" #include "xla/xla_data.pb.h" namespace xla { diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/broadcast_canonicalizer_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/broadcast_canonicalizer_test.cc index 10e83a21695406..c67014fd12dd55 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/broadcast_canonicalizer_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/broadcast_canonicalizer_test.cc @@ -18,8 +18,6 @@ limitations under the License. #include #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" -#include "xla/test.h" -#include "xla/test_helpers.h" namespace xla { namespace { diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/convert_mover_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/convert_mover_test.cc index 3afca6c27985a8..bc366e0e737f4c 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/convert_mover_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/convert_mover_test.cc @@ -22,8 +22,8 @@ limitations under the License. #include "absl/strings/string_view.h" #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" +#include "xla/hlo/testlib/pattern_matcher_gmock.h" #include "xla/service/pattern_matcher.h" -#include "xla/service/pattern_matcher_gmock.h" #include "xla/xla_data.pb.h" #include "tsl/platform/statusor.h" diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/convolution_group_converter_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/convolution_group_converter_test.cc index 53be45e88f1201..0f2ab3e2431dc3 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/convolution_group_converter_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/convolution_group_converter_test.cc @@ -22,8 +22,8 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_opcode.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" +#include "xla/hlo/testlib/test.h" #include "xla/hlo/utils/hlo_matchers.h" -#include "xla/test.h" #include "xla/types.h" namespace xla { diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/dot_merger_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/dot_merger_test.cc index e8e90e57bf5759..fa55067491a6a1 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/dot_merger_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/dot_merger_test.cc @@ -27,9 +27,9 @@ limitations under the License. #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" +#include "xla/hlo/testlib/pattern_matcher_gmock.h" #include "xla/hlo/transforms/simplifiers/algebraic_simplifier.h" #include "xla/service/pattern_matcher.h" -#include "xla/service/pattern_matcher_gmock.h" #include "xla/shape.h" #include "xla/shape_util.h" #include "xla/tsl/lib/core/status_test_util.h" diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/dynamic_dimension_simplifier_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/dynamic_dimension_simplifier_test.cc index aecfaf483cc5c2..f1ddd4211104a2 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/dynamic_dimension_simplifier_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/dynamic_dimension_simplifier_test.cc @@ -25,14 +25,14 @@ limitations under the License. #include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/pass/hlo_pass_pipeline.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" +#include "xla/hlo/testlib/pattern_matcher_gmock.h" +#include "xla/hlo/testlib/test.h" #include "xla/layout_util.h" #include "xla/literal.h" #include "xla/service/hlo_creation_utils.h" #include "xla/service/pattern_matcher.h" -#include "xla/service/pattern_matcher_gmock.h" #include "xla/service/shape_inference.h" #include "xla/shape_util.h" -#include "xla/test.h" #include "xla/tsl/lib/core/status_test_util.h" #include "xla/types.h" #include "xla/window_util.h" diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/flatten_call_graph_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/flatten_call_graph_test.cc index a5653857fe3ff4..25994e76284dec 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/flatten_call_graph_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/flatten_call_graph_test.cc @@ -28,7 +28,6 @@ limitations under the License. #include "xla/service/call_graph.h" #include "xla/shape.h" #include "xla/shape_util.h" -#include "xla/test.h" #include "xla/util.h" #include "xla/xla_data.pb.h" #include "tsl/platform/statusor.h" diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/float_normalization_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/float_normalization_test.cc index b614f74229c0e5..f61d7f0c1d3865 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/float_normalization_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/float_normalization_test.cc @@ -30,15 +30,15 @@ limitations under the License. #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" +#include "xla/hlo/testlib/pattern_matcher_gmock.h" +#include "xla/hlo/testlib/test.h" +#include "xla/hlo/testlib/test_helpers.h" #include "xla/service/float_support.h" #include "xla/service/hlo_creation_utils.h" #include "xla/service/hlo_verifier.h" #include "xla/service/pattern_matcher.h" -#include "xla/service/pattern_matcher_gmock.h" #include "xla/shape.h" #include "xla/shape_util.h" -#include "xla/test.h" -#include "xla/test_helpers.h" #include "xla/xla_data.pb.h" #include "tsl/platform/statusor.h" diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/fusion_constant_sinking_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/fusion_constant_sinking_test.cc index 4fca970c832950..f9df24b6cf4f37 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/fusion_constant_sinking_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/fusion_constant_sinking_test.cc @@ -21,9 +21,9 @@ limitations under the License. #include "xla/hlo/ir/hlo_computation.h" #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" +#include "xla/hlo/testlib/pattern_matcher_gmock.h" +#include "xla/hlo/testlib/test.h" #include "xla/service/pattern_matcher.h" -#include "xla/service/pattern_matcher_gmock.h" -#include "xla/test.h" #include "tsl/platform/statusor.h" namespace xla { diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/hlo_computation_deduplicator_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/hlo_computation_deduplicator_test.cc index 07565f5f26eff9..17a074406e1bf0 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/hlo_computation_deduplicator_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/hlo_computation_deduplicator_test.cc @@ -30,7 +30,6 @@ limitations under the License. #include "xla/literal_util.h" #include "xla/shape.h" #include "xla/shape_util.h" -#include "xla/test.h" #include "xla/xla_data.pb.h" namespace xla { diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/hlo_constant_folding_peak_heap_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/hlo_constant_folding_peak_heap_test.cc index b6f26b67b8029f..d9d875656cd3e4 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/hlo_constant_folding_peak_heap_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/hlo_constant_folding_peak_heap_test.cc @@ -16,12 +16,12 @@ limitations under the License. #include #include +#include #include "testing/base/public/malloc_counter.h" #include "absl/strings/str_format.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" #include "xla/hlo/transforms/simplifiers/hlo_constant_folding.h" -#include "xla/test.h" -#include "tsl/platform/statusor.h" +#include "xla/tsl/platform/statusor.h" namespace xla { namespace { diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/hlo_constant_folding_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/hlo_constant_folding_test.cc index a1cdb3e7e79019..945d58d286e294 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/hlo_constant_folding_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/hlo_constant_folding_test.cc @@ -26,6 +26,8 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" +#include "xla/hlo/testlib/pattern_matcher_gmock.h" +#include "xla/hlo/testlib/test.h" #include "xla/hlo/utils/hlo_matchers.h" #include "xla/layout_util.h" #include "xla/literal.h" @@ -33,10 +35,8 @@ limitations under the License. #include "xla/permutation_util.h" #include "xla/primitive_util.h" #include "xla/service/pattern_matcher.h" -#include "xla/service/pattern_matcher_gmock.h" #include "xla/shape.h" #include "xla/shape_util.h" -#include "xla/test.h" #include "xla/xla_data.pb.h" #include "tsl/platform/statusor.h" diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/hlo_constant_splitter_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/hlo_constant_splitter_test.cc index b1e76bf7a90fbf..3ffc6c64197f90 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/hlo_constant_splitter_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/hlo_constant_splitter_test.cc @@ -22,7 +22,6 @@ limitations under the License. #include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" #include "xla/hlo/transforms/simplifiers/hlo_dce.h" -#include "xla/test.h" #include "xla/tsl/lib/core/status_test_util.h" #include "xla/util.h" #include "tsl/platform/statusor.h" diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/hlo_dce_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/hlo_dce_test.cc index cd73bb80904bd0..36c86c76fa4228 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/hlo_dce_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/hlo_dce_test.cc @@ -29,10 +29,10 @@ limitations under the License. #include "xla/hlo/ir/hlo_opcode.h" #include "xla/hlo/ir/hlo_sharding.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" +#include "xla/hlo/testlib/pattern_matcher_gmock.h" #include "xla/layout_util.h" #include "xla/literal_util.h" #include "xla/service/pattern_matcher.h" -#include "xla/service/pattern_matcher_gmock.h" #include "xla/shape_util.h" #include "xla/tests/literal_test_util.h" #include "xla/tsl/lib/core/status_test_util.h" diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/host_memory_transfer_asyncifier_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/host_memory_transfer_asyncifier_test.cc index 0b7c96c090ee74..882561b2672d95 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/host_memory_transfer_asyncifier_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/host_memory_transfer_asyncifier_test.cc @@ -27,8 +27,8 @@ limitations under the License. #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" +#include "xla/hlo/testlib/pattern_matcher_gmock.h" #include "xla/service/pattern_matcher.h" -#include "xla/service/pattern_matcher_gmock.h" #include "xla/tsl/lib/core/status_test_util.h" #include "xla/util.h" #include "tsl/platform/statusor.h" diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/optimize_input_output_buffer_alias_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/optimize_input_output_buffer_alias_test.cc index 04d546073ce9c9..ea348d312eaaa6 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/optimize_input_output_buffer_alias_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/optimize_input_output_buffer_alias_test.cc @@ -25,8 +25,6 @@ limitations under the License. #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" #include "xla/shape.h" #include "xla/shape_util.h" -#include "xla/test.h" -#include "xla/test_helpers.h" #include "xla/xla_data.pb.h" #include "tsl/platform/test.h" diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/reduce_window_rewriter_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/reduce_window_rewriter_test.cc index 5e142bd509c80f..cde7ba997b2a30 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/reduce_window_rewriter_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/reduce_window_rewriter_test.cc @@ -20,7 +20,6 @@ limitations under the License. #include "absl/strings/string_view.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" -#include "xla/test.h" #include "xla/xla_data.pb.h" namespace xla { diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/reshape_mover_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/reshape_mover_test.cc index db95b48535b326..6db253c14fcd99 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/reshape_mover_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/reshape_mover_test.cc @@ -26,10 +26,10 @@ limitations under the License. #include "xla/hlo/ir/hlo_opcode.h" #include "xla/hlo/pass/hlo_pass_fix.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" +#include "xla/hlo/testlib/pattern_matcher_gmock.h" #include "xla/hlo/transforms/simplifiers/algebraic_simplifier.h" #include "xla/service/hlo_verifier.h" #include "xla/service/pattern_matcher.h" -#include "xla/service/pattern_matcher_gmock.h" #include "xla/tsl/lib/core/status_test_util.h" namespace xla { diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/slice_sinker_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/slice_sinker_test.cc index a2b3e8273145e8..d7dbffbc573b3f 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/slice_sinker_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/slice_sinker_test.cc @@ -23,8 +23,8 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" +#include "xla/hlo/testlib/pattern_matcher_gmock.h" #include "xla/service/pattern_matcher.h" -#include "xla/service/pattern_matcher_gmock.h" #include "tsl/platform/statusor.h" namespace xla { diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/sort_simplifier_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/sort_simplifier_test.cc index adc2c735c3ad36..436c6643f4d9b1 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/sort_simplifier_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/sort_simplifier_test.cc @@ -19,9 +19,9 @@ limitations under the License. #include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" +#include "xla/hlo/testlib/pattern_matcher_gmock.h" +#include "xla/hlo/testlib/test.h" #include "xla/service/pattern_matcher.h" -#include "xla/service/pattern_matcher_gmock.h" -#include "xla/test.h" #include "tsl/platform/statusor.h" namespace xla { diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/tuple_simplifier_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/tuple_simplifier_test.cc index 17da39d7472699..1755e5f34e72ff 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/tuple_simplifier_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/tuple_simplifier_test.cc @@ -22,10 +22,10 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_opcode.h" #include "xla/hlo/testlib/hlo_hardware_independent_test_base.h" +#include "xla/hlo/testlib/test.h" #include "xla/hlo/utils/hlo_matchers.h" #include "xla/shape.h" #include "xla/shape_util.h" -#include "xla/test.h" #include "xla/tsl/lib/core/status_test_util.h" #include "tsl/platform/statusor.h" diff --git a/third_party/xla/xla/hlo/transforms/simplifiers/zero_sized_hlo_elimination_test.cc b/third_party/xla/xla/hlo/transforms/simplifiers/zero_sized_hlo_elimination_test.cc index e747eac3355e41..05f23a3d216dae 100644 --- a/third_party/xla/xla/hlo/transforms/simplifiers/zero_sized_hlo_elimination_test.cc +++ b/third_party/xla/xla/hlo/transforms/simplifiers/zero_sized_hlo_elimination_test.cc @@ -25,7 +25,6 @@ limitations under the License. #include "xla/literal_util.h" #include "xla/shape.h" #include "xla/shape_util.h" -#include "xla/test.h" #include "xla/xla_data.pb.h" #include "tsl/platform/logging.h" #include "tsl/platform/statusor.h"