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: 714495819
  • Loading branch information
sdasgup3 authored and Google-ML-Automation committed Jan 11, 2025
1 parent 5d92a44 commit b652962
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 41 deletions.
42 changes: 21 additions & 21 deletions xla/hlo/transforms/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ xla_cc_test(
"//xla:comparison_util",
"//xla:literal_util",
"//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",
"//xla/hlo/testlib:test_helpers",
"//xla/service:float_support",
"//xla/service:hlo_verifier",
"//xla/tests:literal_test_util",
Expand Down Expand Up @@ -202,14 +202,14 @@ xla_cc_test(
":real_imag_expander",
"//xla:literal",
"//xla:shape_util",
"//xla:test",
"//xla:types",
"//xla/hlo/ir:hlo",
"//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:hlo_creation_utils",
"//xla/service:pattern_matcher",
"//xla/service:pattern_matcher_gmock",
"//xla/tsl/lib/core:status_test_util",
"@com_google_googletest//:gtest",
"@tsl//tsl/platform:test_main",
Expand Down Expand Up @@ -268,9 +268,9 @@ xla_cc_test(
srcs = ["expanders/convolution_4d_expander_test.cc"],
deps = [
"convolution_4d_expander",
"//xla:test",
"//xla/hlo/ir:hlo",
"//xla/hlo/testlib:hlo_hardware_independent_test_base",
"//xla/hlo/testlib:test",
"@com_google_googletest//:gtest",
"@tsl//tsl/platform:statusor",
"@tsl//tsl/platform:test_main",
Expand Down Expand Up @@ -304,8 +304,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_googletest//:gtest_main",
"@tsl//tsl/platform:statusor",
"@tsl//tsl/platform:test_main",
Expand Down Expand Up @@ -335,14 +335,14 @@ xla_cc_test(
srcs = ["expanders/logistic_expander_test.cc"],
deps = [
":logistic_expander",
"//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/service:dynamic_padder",
"//xla/service:pattern_matcher",
"//xla/service:pattern_matcher_gmock",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest",
"@tsl//tsl/platform:statusor",
Expand Down Expand Up @@ -417,9 +417,9 @@ xla_cc_test(
srcs = ["while_loop_trip_count_annotator_test.cc"],
deps = [
":while_loop_trip_count_annotator",
"//xla:test",
"//xla:xla_data_proto_cc",
"//xla/hlo/testlib:hlo_hardware_independent_test_base",
"//xla/hlo/testlib:test",
"@com_google_googletest//:gtest",
"@tsl//tsl/platform:statusor",
"@tsl//tsl/platform:test_main", # fixdeps: keep
Expand Down Expand Up @@ -512,9 +512,9 @@ xla_cc_test(
":dot_decomposer",
"//xla/hlo/ir:hlo",
"//xla/hlo/testlib:hlo_hardware_independent_test_base",
"//xla/hlo/testlib:pattern_matcher_gmock",
"//xla/hlo/utils:hlo_matchers",
"//xla/service:pattern_matcher",
"//xla/service:pattern_matcher_gmock",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest",
"@tsl//tsl/platform:statusor",
Expand Down Expand Up @@ -560,10 +560,10 @@ xla_cc_test(
srcs = ["expanders/reduce_decomposer_test.cc"],
deps = [
":reduce_decomposer",
"//xla:test",
"//xla:test_helpers",
"//xla/hlo/parser:hlo_parser",
"//xla/hlo/testlib:hlo_hardware_independent_test_base",
"//xla/hlo/testlib:test",
"//xla/hlo/testlib:test_helpers",
"@com_google_googletest//:gtest",
"@tsl//tsl/platform:test_main",
],
Expand All @@ -574,10 +574,10 @@ xla_cc_test(
srcs = ["expanders/reshape_decomposer_test.cc"],
deps = [
":reshape_decomposer",
"//xla:test",
"//xla:test_helpers",
"//xla/hlo/parser:hlo_parser",
"//xla/hlo/testlib:hlo_hardware_independent_test_base",
"//xla/hlo/testlib:test",
"//xla/hlo/testlib:test_helpers",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest",
Expand Down Expand Up @@ -638,13 +638,13 @@ xla_cc_test(
srcs = ["expanders/stable_sort_expander_test.cc"],
deps = [
":stable_sort_expander",
"//xla:test",
"//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/transforms/simplifiers:algebraic_simplifier",
"//xla/hlo/utils:hlo_matchers",
"//xla/service:pattern_matcher",
"//xla/service:pattern_matcher_gmock",
"//xla/tsl/lib/core:status_test_util",
"@com_google_googletest//:gtest",
"@tsl//tsl/platform:test_main",
Expand Down Expand Up @@ -729,9 +729,9 @@ 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:host_memory_offload_annotations_hdr",
"//xla/service:pattern_matcher",
"//xla/service:pattern_matcher_gmock",
"//xla/tsl/lib/core:status_test_util",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/status",
Expand Down Expand Up @@ -790,12 +790,12 @@ xla_cc_test(
"//xla:util",
"//xla/hlo/ir:hlo",
"//xla/hlo/testlib:hlo_hardware_independent_test_base",
"//xla/hlo/testlib:pattern_matcher_gmock",
"//xla/hlo/testlib:verified_hlo_module",
"//xla/service:hlo_verifier",
"//xla/service:host_memory_offload_annotations_hdr",
"//xla/service:host_offload_utils",
"//xla/service:pattern_matcher",
"//xla/service:pattern_matcher_gmock",
"//xla/tsl/lib/core:status_test_util",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/log",
Expand Down Expand Up @@ -925,11 +925,11 @@ xla_cc_test(
srcs = ["expanders/dynamic_index_splitter_test.cc"],
deps = [
":dynamic_index_splitter",
"//xla:test",
"//xla:test_helpers",
"//xla:xla_proto_cc",
"//xla/hlo/ir:hlo",
"//xla/hlo/testlib:hlo_hardware_independent_test_base",
"//xla/hlo/testlib:test",
"//xla/hlo/testlib:test_helpers",
"//xla/hlo/utils:hlo_matchers",
"@com_google_googletest//:gtest",
"@tsl//tsl/platform:test_main",
Expand Down Expand Up @@ -1094,9 +1094,9 @@ 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/hlo/testlib:verified_hlo_module",
"//xla/service:pattern_matcher",
"//xla/service:pattern_matcher_gmock",
"//xla/tsl/lib/core:status_test_util",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
Expand Down
4 changes: 2 additions & 2 deletions xla/hlo/transforms/bfloat16_propagation_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ 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/testlib/test_helpers.h"
#include "xla/literal_util.h"
#include "xla/service/float_support.h"
#include "xla/service/hlo_verifier.h"
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/test.h"
#include "xla/test_helpers.h"
#include "xla/tests/literal_test_util.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/statusor.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ 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/test.h"
#include "xla/hlo/testlib/test.h"
#include "tsl/platform/statusor.h"

namespace xla {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ limitations under the License.
#include <gtest/gtest.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"

Expand Down
2 changes: 1 addition & 1 deletion xla/hlo/transforms/expanders/dot_decomposer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,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/utils/hlo_matchers.h"
#include "xla/service/pattern_matcher.h"
#include "xla/service/pattern_matcher_gmock.h"
#include "tsl/platform/statusor.h"
#include "tsl/platform/test.h"

Expand Down
4 changes: 2 additions & 2 deletions xla/hlo/transforms/expanders/dynamic_index_splitter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ 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/testlib/test_helpers.h"
#include "xla/hlo/utils/hlo_matchers.h"
#include "xla/test.h"
#include "xla/test_helpers.h"
#include "xla/xla.pb.h"

namespace xla {
Expand Down
4 changes: 2 additions & 2 deletions xla/hlo/transforms/expanders/logistic_expander_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ limitations under the License.
#include "xla/hlo/ir/hlo_opcode.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/service/dynamic_padder.h"
#include "xla/service/pattern_matcher.h"
#include "xla/service/pattern_matcher_gmock.h"
#include "xla/test.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/statusor.h"

Expand Down
4 changes: 2 additions & 2 deletions xla/hlo/transforms/expanders/real_imag_expander_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ 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/hlo/utils/hlo_matchers.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/shape_util.h"
#include "xla/test.h"
#include "xla/tsl/lib/core/status_test_util.h"
#include "xla/types.h"

Expand Down
4 changes: 2 additions & 2 deletions xla/hlo/transforms/expanders/reduce_decomposer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ limitations under the License.
#include <gtest/gtest.h>
#include "xla/hlo/parser/hlo_parser.h"
#include "xla/hlo/testlib/hlo_hardware_independent_test_base.h"
#include "xla/test.h"
#include "xla/test_helpers.h"
#include "xla/hlo/testlib/test.h"
#include "xla/hlo/testlib/test_helpers.h"

namespace xla {
namespace {
Expand Down
4 changes: 2 additions & 2 deletions xla/hlo/transforms/expanders/reshape_decomposer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ limitations under the License.
#include "absl/strings/string_view.h"
#include "xla/hlo/parser/hlo_parser.h"
#include "xla/hlo/testlib/hlo_hardware_independent_test_base.h"
#include "xla/test.h"
#include "xla/test_helpers.h"
#include "xla/hlo/testlib/test.h"
#include "xla/hlo/testlib/test_helpers.h"

namespace xla {
namespace {
Expand Down
4 changes: 2 additions & 2 deletions xla/hlo/transforms/expanders/stable_sort_expander_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ limitations under the License.
#include <gtest/gtest.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/transforms/simplifiers/algebraic_simplifier.h"
#include "xla/hlo/utils/hlo_matchers.h"
#include "xla/service/pattern_matcher.h"
#include "xla/service/pattern_matcher_gmock.h"
#include "xla/test.h"
#include "xla/tsl/lib/core/status_test_util.h"

namespace xla {
Expand Down
2 changes: 1 addition & 1 deletion xla/hlo/transforms/host_offload_legalize_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,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/service/host_memory_offload_annotations.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"
Expand Down
2 changes: 1 addition & 1 deletion xla/hlo/transforms/host_offloader_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ 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/verified_hlo_module.h"
#include "xla/hlo/transforms/host_offload_legalize.h"
#include "xla/layout.h"
#include "xla/service/hlo_verifier.h"
#include "xla/service/host_memory_offload_annotations.h"
#include "xla/service/host_offload_utils.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"
Expand Down
2 changes: 1 addition & 1 deletion xla/hlo/transforms/while_loop_trip_count_annotator_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.

#include <gtest/gtest.h>
#include "xla/hlo/testlib/hlo_hardware_independent_test_base.h"
#include "xla/test.h"
#include "xla/hlo/testlib/test.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/statusor.h"

Expand Down

0 comments on commit b652962

Please sign in to comment.