diff --git a/xla/BUILD b/xla/BUILD index 2662ac834c4f2..ec79922965643 100644 --- a/xla/BUILD +++ b/xla/BUILD @@ -90,7 +90,7 @@ xla_cc_test( srcs = ["bit_cast_test.cc"], deps = [ ":bit_cast", - ":test", + "//xla/hlo/testlib:test", "@eigen_archive//:eigen3", "@tsl//tsl/platform:bfloat16", "@tsl//tsl/platform:test_main", @@ -127,9 +127,9 @@ xla_cc_test( srcs = ["comparison_util_test.cc"], deps = [ ":comparison_util", - ":test", ":types", ":xla_data_proto_cc", + "//xla/hlo/testlib:test", "@tsl//tsl/platform:test_main", ], ) @@ -157,7 +157,7 @@ xla_cc_test( srcs = ["ef57_test.cc"], deps = [ ":ef57", - ":test", + "//xla/hlo/testlib:test", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/log:log_streamer", "@com_google_absl//absl/random", @@ -223,8 +223,8 @@ xla_cc_test( srcs = ["types_test.cc"], visibility = ["//visibility:private"], deps = [ - ":test", ":types", + "//xla/hlo/testlib:test", "@com_google_googletest//:gtest", "@tsl//tsl/platform:test_main", ], @@ -257,8 +257,8 @@ xla_cc_test( srcs = ["status_macros_test.cc"], deps = [ ":status_macros", - ":test", - ":test_helpers", + "//xla/hlo/testlib:test", + "//xla/hlo/testlib:test_helpers", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_googletest//:gtest", @@ -285,8 +285,8 @@ xla_cc_test( deps = [ ":bit_cast", ":fp_util", - ":test", ":util", + "//xla/hlo/testlib:test", "@com_google_absl//absl/base", "@com_google_absl//absl/numeric:bits", "@com_google_googletest//:gtest_main", @@ -345,9 +345,9 @@ xla_cc_test( name = "util_test", srcs = ["util_test.cc"], deps = [ - ":test", ":types", ":util", + "//xla/hlo/testlib:test", "@com_google_absl//absl/base:log_severity", "@com_google_absl//absl/container:inlined_vector", "@com_google_absl//absl/log:check", @@ -379,7 +379,7 @@ xla_cc_test( srcs = ["permutation_util_test.cc"], deps = [ ":permutation_util", - ":test", + "//xla/hlo/testlib:test", "@tsl//tsl/platform:test_main", ], ) @@ -406,8 +406,8 @@ xla_cc_test( name = "iterator_util_test", srcs = ["iterator_util_test.cc"], deps = [ - ":test", ":util", + "//xla/hlo/testlib:test", "@tsl//tsl/platform:test_main", ], ) @@ -482,8 +482,8 @@ xla_cc_test( srcs = ["shape_test.cc"], deps = [ ":shape_util", - ":test", ":xla_data_proto_cc", + "//xla/hlo/testlib:test", "@com_google_absl//absl/hash:hash_testing", "@com_google_googletest//:gtest", "@tsl//tsl/platform:test_benchmark", @@ -496,9 +496,9 @@ xla_cc_test( srcs = ["shape_util_test.cc"], deps = [ ":shape_util", - ":test", ":util", ":xla_data_proto_cc", + "//xla/hlo/testlib:test", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", @@ -516,9 +516,9 @@ xla_cc_test( srcs = ["primitive_util_test.cc"], deps = [ ":shape_util", - ":test", - ":test_helpers", ":xla_data_proto_cc", + "//xla/hlo/testlib:test", + "//xla/hlo/testlib:test_helpers", "@tsl//tsl/platform:statusor", "@tsl//tsl/platform:test_main", ], @@ -529,9 +529,9 @@ xla_cc_test( srcs = ["layout_util_test.cc"], deps = [ ":shape_util", - ":test", - ":test_helpers", ":xla_data_proto_cc", + "//xla/hlo/testlib:test", + "//xla/hlo/testlib:test_helpers", "@com_google_absl//absl/log", "@com_google_absl//absl/types:span", "@tsl//tsl/platform:errors", @@ -546,8 +546,8 @@ xla_cc_test( srcs = ["layout_test.cc"], deps = [ ":shape_util", - ":test", ":xla_data_proto_cc", + "//xla/hlo/testlib:test", "@tsl//tsl/platform:test_main", ], ) @@ -557,8 +557,8 @@ xla_cc_test( srcs = ["index_util_test.cc"], deps = [ ":shape_util", - ":test", ":xla_data_proto_cc", + "//xla/hlo/testlib:test", "@com_google_absl//absl/types:span", "@tsl//tsl/platform:test_main", ], @@ -615,10 +615,10 @@ xla_cc_test( ":literal_util", ":shape_tree", ":shape_util", - ":test", ":types", ":util", ":xla_data_proto_cc", + "//xla/hlo/testlib:test", "//xla/tsl/lib/core:status_test_util", "@com_google_absl//absl/base", "@com_google_absl//absl/hash", @@ -706,8 +706,8 @@ xla_cc_test( ":error_spec", ":literal_comparison", ":literal_util", - ":test_helpers", ":xla_data_proto_cc", + "//xla/hlo/testlib:test_helpers", "//xla/tsl/lib/core:status_test_util", "@com_google_googletest//:gtest_main", "@tsl//tsl/platform:ml_dtypes", @@ -784,7 +784,7 @@ xla_cc_test( srcs = ["array_test.cc"], deps = [ ":array", - ":test", + "//xla/hlo/testlib:test", "@com_google_absl//absl/strings:string_view", "@com_google_absl//absl/types:span", "@eigen_archive//:eigen3", @@ -810,7 +810,7 @@ xla_cc_test( srcs = ["array2d_test.cc"], deps = [ ":array2d", - ":test", + "//xla/hlo/testlib:test", "@eigen_archive//:eigen3", "@tsl//tsl/platform:ml_dtypes", "@tsl//tsl/platform:test_main", @@ -833,8 +833,8 @@ xla_cc_test( srcs = ["array3d_test.cc"], deps = [ ":array3d", - ":test", ":types", + "//xla/hlo/testlib:test", "@tsl//tsl/platform:test_main", ], ) @@ -859,7 +859,7 @@ xla_cc_test( deps = [ ":array2d", ":array4d", - ":test", + "//xla/hlo/testlib:test", "@com_google_absl//absl/log", "@com_google_absl//absl/types:span", "@eigen_archive//:eigen3", @@ -942,10 +942,10 @@ xla_cc_test( deps = [ ":literal", ":shape_util", - ":test", ":text_literal_reader", ":types", ":xla_data_proto_cc", + "//xla/hlo/testlib:test", "@com_google_googletest//:gtest", "@tsl//tsl/platform:env", "@tsl//tsl/platform:test_main", @@ -977,10 +977,10 @@ xla_cc_test( deps = [ ":literal", ":literal_util", - ":test", - ":test_helpers", ":text_literal_writer", ":types", + "//xla/hlo/testlib:test", + "//xla/hlo/testlib:test_helpers", "//xla/tsl/lib/core:status_test_util", "@com_google_googletest//:gtest", "@tsl//tsl/platform:env", @@ -1014,8 +1014,8 @@ xla_cc_test( deps = [ ":shape_tree", ":shape_util", - ":test", ":xla_data_proto_cc", + "//xla/hlo/testlib:test", "@com_google_googletest//:gtest", "@tsl//tsl/platform:test_benchmark", "@tsl//tsl/platform:test_main", @@ -1059,9 +1059,9 @@ xla_cc_test( name = "window_util_test", srcs = ["window_util_test.cc"], deps = [ - ":test", ":window_util", ":xla_data_proto_cc", + "//xla/hlo/testlib:test", "@com_google_googletest//:gtest", "@tsl//tsl/platform:test_main", ], @@ -1108,9 +1108,9 @@ xla_cc_test( ":literal", ":literal_util", ":reference_util", - ":test", ":xla_data_proto_cc", "//xla/hlo/builder:padding", + "//xla/hlo/testlib:test", "//xla/tests:literal_test_util", "@com_google_googletest//:gtest", "@tsl//tsl/platform:test_main", @@ -1288,8 +1288,8 @@ xla_cc_test( ":autotune_result_wrapper", ":autotune_results_proto_cc", ":autotuning_proto_cc", - ":test", - ":test_helpers", + "//xla/hlo/testlib:test", + "//xla/hlo/testlib:test_helpers", "@tsl//tsl/platform:statusor", "@tsl//tsl/platform:test_main", ], diff --git a/xla/array2d_test.cc b/xla/array2d_test.cc index 921da30256fa3..055a6e7742081 100644 --- a/xla/array2d_test.cc +++ b/xla/array2d_test.cc @@ -20,7 +20,7 @@ limitations under the License. #include #include "Eigen/Core" -#include "xla/test.h" +#include "xla/hlo/testlib/test.h" #include "tsl/platform/ml_dtypes.h" namespace xla { diff --git a/xla/array3d_test.cc b/xla/array3d_test.cc index 334d733266b41..3ed4d7b2a7532 100644 --- a/xla/array3d_test.cc +++ b/xla/array3d_test.cc @@ -18,7 +18,7 @@ limitations under the License. #include #include -#include "xla/test.h" +#include "xla/hlo/testlib/test.h" #include "xla/types.h" namespace xla { diff --git a/xla/array4d_test.cc b/xla/array4d_test.cc index 1deb1bc81f3c7..7d8bcb7c6930a 100644 --- a/xla/array4d_test.cc +++ b/xla/array4d_test.cc @@ -24,7 +24,7 @@ limitations under the License. #include "absl/types/span.h" #include "Eigen/Core" #include "xla/array2d.h" -#include "xla/test.h" +#include "xla/hlo/testlib/test.h" namespace xla { namespace { diff --git a/xla/array_test.cc b/xla/array_test.cc index bf79aa98f4049..a20223d746c72 100644 --- a/xla/array_test.cc +++ b/xla/array_test.cc @@ -23,7 +23,7 @@ limitations under the License. #include "absl/strings/string_view.h" #include "absl/types/span.h" #include "Eigen/Core" -#include "xla/test.h" +#include "xla/hlo/testlib/test.h" namespace xla { namespace { diff --git a/xla/autotune_result_wrapper_test.cc b/xla/autotune_result_wrapper_test.cc index 848024d7e4343..8259a15c715cb 100644 --- a/xla/autotune_result_wrapper_test.cc +++ b/xla/autotune_result_wrapper_test.cc @@ -21,8 +21,8 @@ limitations under the License. #include "xla/autotune_results.pb.h" #include "xla/autotuning.pb.h" -#include "xla/test.h" -#include "xla/test_helpers.h" +#include "xla/hlo/testlib/test.h" +#include "xla/hlo/testlib/test_helpers.h" #include "tsl/platform/statusor.h" namespace xla { diff --git a/xla/bit_cast_test.cc b/xla/bit_cast_test.cc index 8445b75aaaa5a..c8d264662c72b 100644 --- a/xla/bit_cast_test.cc +++ b/xla/bit_cast_test.cc @@ -18,7 +18,7 @@ limitations under the License. #include #include "Eigen/Core" -#include "xla/test.h" +#include "xla/hlo/testlib/test.h" #include "tsl/platform/bfloat16.h" namespace xla { diff --git a/xla/comparison_util_test.cc b/xla/comparison_util_test.cc index 1581569a5d284..f41db68363d95 100644 --- a/xla/comparison_util_test.cc +++ b/xla/comparison_util_test.cc @@ -18,7 +18,7 @@ limitations under the License. #include #include -#include "xla/test.h" +#include "xla/hlo/testlib/test.h" #include "xla/types.h" #include "xla/xla_data.pb.h" diff --git a/xla/ef57_test.cc b/xla/ef57_test.cc index 1f5d48cfda016..4143b58277e56 100644 --- a/xla/ef57_test.cc +++ b/xla/ef57_test.cc @@ -23,7 +23,7 @@ limitations under the License. #include "absl/log/log_streamer.h" #include "absl/random/random.h" #include "absl/types/span.h" -#include "xla/test.h" +#include "xla/hlo/testlib/test.h" namespace xla { namespace { diff --git a/xla/fp_util_test.cc b/xla/fp_util_test.cc index 3eb7c54f919b0..3eb3561a264d4 100644 --- a/xla/fp_util_test.cc +++ b/xla/fp_util_test.cc @@ -23,7 +23,7 @@ limitations under the License. #include "absl/base/casts.h" #include "absl/numeric/bits.h" #include "xla/bit_cast.h" -#include "xla/test.h" +#include "xla/hlo/testlib/test.h" #include "xla/util.h" #include "tsl/platform/ml_dtypes.h" diff --git a/xla/index_util_test.cc b/xla/index_util_test.cc index 333f772f0b4cf..a312293d32b58 100644 --- a/xla/index_util_test.cc +++ b/xla/index_util_test.cc @@ -19,9 +19,9 @@ limitations under the License. #include #include "absl/types/span.h" +#include "xla/hlo/testlib/test.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/xla/iterator_util_test.cc b/xla/iterator_util_test.cc index ac093c3d1bd68..3a9e9b0555302 100644 --- a/xla/iterator_util_test.cc +++ b/xla/iterator_util_test.cc @@ -21,7 +21,7 @@ limitations under the License. #include #include -#include "xla/test.h" +#include "xla/hlo/testlib/test.h" namespace xla { namespace { diff --git a/xla/layout_test.cc b/xla/layout_test.cc index 46a13cf421b0e..e26b020ea463a 100644 --- a/xla/layout_test.cc +++ b/xla/layout_test.cc @@ -20,8 +20,8 @@ limitations under the License. #include #include +#include "xla/hlo/testlib/test.h" #include "xla/shape_util.h" -#include "xla/test.h" #include "xla/xla_data.pb.h" namespace xla { diff --git a/xla/layout_util_test.cc b/xla/layout_util_test.cc index ed2f6ff479d7e..56f821ce0a090 100644 --- a/xla/layout_util_test.cc +++ b/xla/layout_util_test.cc @@ -19,11 +19,11 @@ limitations under the License. #include #include "absl/types/span.h" +#include "xla/hlo/testlib/test.h" +#include "xla/hlo/testlib/test_helpers.h" #include "xla/layout.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/errors.h" #include "tsl/platform/logging.h" // IWYU pragma: keep diff --git a/xla/literal_comparison_test.cc b/xla/literal_comparison_test.cc index 7713aceaaa3bc..4dcdad85fd5d4 100644 --- a/xla/literal_comparison_test.cc +++ b/xla/literal_comparison_test.cc @@ -17,8 +17,8 @@ limitations under the License. #include #include "xla/error_spec.h" +#include "xla/hlo/testlib/test_helpers.h" #include "xla/literal_util.h" -#include "xla/test_helpers.h" #include "xla/tsl/lib/core/status_test_util.h" #include "xla/xla_data.pb.h" #include "tsl/platform/ml_dtypes.h" diff --git a/xla/literal_test.cc b/xla/literal_test.cc index f109f23c4dec1..5bbddd572c8a6 100644 --- a/xla/literal_test.cc +++ b/xla/literal_test.cc @@ -38,6 +38,7 @@ limitations under the License. #include "xla/array2d.h" #include "xla/array3d.h" #include "xla/array4d.h" +#include "xla/hlo/testlib/test.h" #include "xla/index_util.h" #include "xla/layout.h" #include "xla/layout_util.h" @@ -46,7 +47,6 @@ limitations under the License. #include "xla/shape.h" #include "xla/shape_tree.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/util.h" diff --git a/xla/mlir_hlo/utils/cycle_detector_test.cc b/xla/mlir_hlo/utils/cycle_detector_test.cc index dd0fdacfb3f9d..18bdefb50b5ea 100644 --- a/xla/mlir_hlo/utils/cycle_detector_test.cc +++ b/xla/mlir_hlo/utils/cycle_detector_test.cc @@ -15,7 +15,7 @@ limitations under the License. #include "utils/cycle_detector.h" -#include "xla/test.h" +#include "xla/hlo/testlib/test.h" class GraphCyclesTest : public ::testing::Test { public: diff --git a/xla/permutation_util_test.cc b/xla/permutation_util_test.cc index 9597da742f09d..9926650940476 100644 --- a/xla/permutation_util_test.cc +++ b/xla/permutation_util_test.cc @@ -15,7 +15,7 @@ limitations under the License. #include "xla/permutation_util.h" -#include "xla/test.h" +#include "xla/hlo/testlib/test.h" namespace xla { namespace { diff --git a/xla/primitive_util_test.cc b/xla/primitive_util_test.cc index 190e6442d0326..e4abeb4ff7ac9 100644 --- a/xla/primitive_util_test.cc +++ b/xla/primitive_util_test.cc @@ -17,8 +17,8 @@ limitations under the License. #include -#include "xla/test.h" -#include "xla/test_helpers.h" +#include "xla/hlo/testlib/test.h" +#include "xla/hlo/testlib/test_helpers.h" #include "xla/xla_data.pb.h" #include "tsl/platform/statusor.h" diff --git a/xla/reference_util_test.cc b/xla/reference_util_test.cc index 32bf4925c409a..4ad7c660f8c90 100644 --- a/xla/reference_util_test.cc +++ b/xla/reference_util_test.cc @@ -25,9 +25,9 @@ limitations under the License. #include "xla/array4d.h" #include "xla/error_spec.h" #include "xla/hlo/builder/padding.h" +#include "xla/hlo/testlib/test.h" #include "xla/literal.h" #include "xla/literal_util.h" -#include "xla/test.h" #include "xla/tests/literal_test_util.h" #include "xla/xla_data.pb.h" diff --git a/xla/shape_test.cc b/xla/shape_test.cc index 55f9cb20c8ce5..78f3fda40cb12 100644 --- a/xla/shape_test.cc +++ b/xla/shape_test.cc @@ -17,9 +17,9 @@ limitations under the License. #include #include "absl/hash/hash_testing.h" +#include "xla/hlo/testlib/test.h" #include "xla/layout.h" #include "xla/shape_util.h" -#include "xla/test.h" #include "xla/xla_data.pb.h" #include "tsl/platform/test_benchmark.h" diff --git a/xla/shape_tree_test.cc b/xla/shape_tree_test.cc index ce1b2fab6a3f6..f810c1e895bd5 100644 --- a/xla/shape_tree_test.cc +++ b/xla/shape_tree_test.cc @@ -21,9 +21,9 @@ limitations under the License. #include #include +#include "xla/hlo/testlib/test.h" #include "xla/shape.h" #include "xla/shape_util.h" -#include "xla/test.h" #include "xla/xla_data.pb.h" #include "tsl/platform/test_benchmark.h" diff --git a/xla/shape_util_test.cc b/xla/shape_util_test.cc index 78abfc5cd7e51..9c58b488a3be6 100644 --- a/xla/shape_util_test.cc +++ b/xla/shape_util_test.cc @@ -29,10 +29,10 @@ limitations under the License. #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" #include "absl/types/span.h" +#include "xla/hlo/testlib/test.h" #include "xla/layout.h" #include "xla/layout_util.h" #include "xla/shape.h" -#include "xla/test.h" #include "xla/util.h" #include "xla/xla_data.pb.h" #include "tsl/platform/env.h" diff --git a/xla/status_macros_test.cc b/xla/status_macros_test.cc index 723d754c5c4d3..474d101513791 100644 --- a/xla/status_macros_test.cc +++ b/xla/status_macros_test.cc @@ -21,8 +21,8 @@ limitations under the License. #include #include "absl/status/status.h" #include "absl/status/statusor.h" -#include "xla/test.h" -#include "xla/test_helpers.h" +#include "xla/hlo/testlib/test.h" +#include "xla/hlo/testlib/test_helpers.h" #include "tsl/platform/errors.h" #include "tsl/platform/statusor.h" diff --git a/xla/text_literal_reader_test.cc b/xla/text_literal_reader_test.cc index eec3c8e3a2011..face01dce4a62 100644 --- a/xla/text_literal_reader_test.cc +++ b/xla/text_literal_reader_test.cc @@ -18,9 +18,9 @@ limitations under the License. #include #include +#include "xla/hlo/testlib/test.h" #include "xla/literal.h" #include "xla/shape_util.h" -#include "xla/test.h" #include "xla/xla_data.pb.h" #include "tsl/platform/env.h" diff --git a/xla/text_literal_writer_test.cc b/xla/text_literal_writer_test.cc index 6b0ccdc79dbbb..eea2e0eca0dba 100644 --- a/xla/text_literal_writer_test.cc +++ b/xla/text_literal_writer_test.cc @@ -18,9 +18,9 @@ limitations under the License. #include #include +#include "xla/hlo/testlib/test.h" +#include "xla/hlo/testlib/test_helpers.h" #include "xla/literal_util.h" -#include "xla/test.h" -#include "xla/test_helpers.h" #include "xla/tsl/lib/core/status_test_util.h" #include "tsl/platform/env.h" diff --git a/xla/types_test.cc b/xla/types_test.cc index 40d9abf1f2257..7f16fb8a2056f 100644 --- a/xla/types_test.cc +++ b/xla/types_test.cc @@ -19,7 +19,7 @@ limitations under the License. #include #include -#include "xla/test.h" +#include "xla/hlo/testlib/test.h" namespace xla { namespace { diff --git a/xla/util_test.cc b/xla/util_test.cc index 828278a52afc5..d15329872d911 100644 --- a/xla/util_test.cc +++ b/xla/util_test.cc @@ -33,8 +33,8 @@ limitations under the License. #include "absl/strings/string_view.h" #include "absl/types/span.h" #include "ml_dtypes/include/float8.h" +#include "xla/hlo/testlib/test.h" #include "xla/maybe_owning.h" -#include "xla/test.h" #include "xla/types.h" #include "tsl/platform/logging.h" #include "tsl/platform/ml_dtypes.h" diff --git a/xla/window_util_test.cc b/xla/window_util_test.cc index 9de18acba7263..0fcaa1e297d0f 100644 --- a/xla/window_util_test.cc +++ b/xla/window_util_test.cc @@ -16,7 +16,7 @@ limitations under the License. #include "xla/window_util.h" #include -#include "xla/test.h" +#include "xla/hlo/testlib/test.h" #include "xla/xla_data.pb.h" namespace xla {