Skip to content

Commit

Permalink
[HLO Componentization] Populate hlo/testlib sub-component (Phase II).
Browse files Browse the repository at this point in the history
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: 714495584
  • Loading branch information
sdasgup3 authored and Google-ML-Automation committed Jan 11, 2025
1 parent 53af204 commit 27c7aa8
Show file tree
Hide file tree
Showing 29 changed files with 65 additions and 65 deletions.
64 changes: 32 additions & 32 deletions xla/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
],
)
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
],
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
],
)
Expand All @@ -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",
],
)
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
],
Expand All @@ -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",
Expand All @@ -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",
],
)
Expand All @@ -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",
],
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -833,8 +833,8 @@ xla_cc_test(
srcs = ["array3d_test.cc"],
deps = [
":array3d",
":test",
":types",
"//xla/hlo/testlib:test",
"@tsl//tsl/platform:test_main",
],
)
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
],
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
],
Expand Down
2 changes: 1 addition & 1 deletion xla/array2d_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.
#include <string>

#include "Eigen/Core"
#include "xla/test.h"
#include "xla/hlo/testlib/test.h"
#include "tsl/platform/ml_dtypes.h"

namespace xla {
Expand Down
2 changes: 1 addition & 1 deletion xla/array3d_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
#include <cstdint>
#include <initializer_list>

#include "xla/test.h"
#include "xla/hlo/testlib/test.h"
#include "xla/types.h"

namespace xla {
Expand Down
2 changes: 1 addition & 1 deletion xla/array4d_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion xla/array_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions xla/autotune_result_wrapper_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion xla/bit_cast_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
#include <cstdint>

#include "Eigen/Core"
#include "xla/test.h"
#include "xla/hlo/testlib/test.h"
#include "tsl/platform/bfloat16.h"

namespace xla {
Expand Down
2 changes: 1 addition & 1 deletion xla/comparison_util_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ limitations under the License.
#include <cstdint>
#include <limits>

#include "xla/test.h"
#include "xla/hlo/testlib/test.h"
#include "xla/types.h"
#include "xla/xla_data.pb.h"

Expand Down
2 changes: 1 addition & 1 deletion xla/ef57_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion xla/fp_util_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion xla/index_util_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ limitations under the License.
#include <vector>

#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 {
Expand Down
2 changes: 1 addition & 1 deletion xla/iterator_util_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ limitations under the License.
#include <memory>
#include <vector>

#include "xla/test.h"
#include "xla/hlo/testlib/test.h"

namespace xla {
namespace {
Expand Down
2 changes: 1 addition & 1 deletion xla/layout_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ limitations under the License.
#include <sstream>
#include <vector>

#include "xla/hlo/testlib/test.h"
#include "xla/shape_util.h"
#include "xla/test.h"
#include "xla/xla_data.pb.h"

namespace xla {
Expand Down
Loading

0 comments on commit 27c7aa8

Please sign in to comment.