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: 714496436
  • Loading branch information
sdasgup3 authored and Google-ML-Automation committed Jan 11, 2025
1 parent b652962 commit 0cb8b51
Show file tree
Hide file tree
Showing 24 changed files with 54 additions and 54 deletions.
22 changes: 11 additions & 11 deletions xla/hlo/analysis/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ xla_cc_test(
":hlo_dfs_reachability",
"//xla:literal_util",
"//xla:shape_util",
"//xla:test",
"//xla/hlo/ir:hlo",
"//xla/hlo/testlib:hlo_hardware_independent_test_base",
"//xla/hlo/testlib:test",
"//xla/service:computation_placer_hdr",
"//xla/service:hlo_module_config",
"@tsl//tsl/platform:status",
Expand Down Expand Up @@ -70,10 +70,10 @@ xla_cc_test(
":hlo_reachability",
"//xla:literal_util",
"//xla:shape_util",
"//xla:test",
"//xla:test_helpers",
"//xla/hlo/ir:hlo",
"//xla/hlo/testlib:hlo_hardware_independent_test_base",
"//xla/hlo/testlib:test",
"//xla/hlo/testlib:test_helpers",
"//xla/service:computation_placer",
"//xla/service:hlo_module_config",
"@com_google_absl//absl/random",
Expand Down Expand Up @@ -165,10 +165,10 @@ xla_cc_test(
deps = [
":while_loop_analysis",
"//xla:comparison_util",
"//xla:test",
"//xla:util",
"//xla/hlo/ir:hlo",
"//xla/hlo/testlib:hlo_hardware_independent_test_base",
"//xla/hlo/testlib:test",
"//xla/service:constant_value",
"//xla/service:value_range",
"@com_google_absl//absl/log",
Expand Down Expand Up @@ -221,10 +221,10 @@ xla_cc_test(
"//xla:comparison_util",
"//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",
"//xla/hlo/testlib:test",
"//xla/hlo/transforms/simplifiers:flatten_call_graph",
"//xla/hlo/transforms/simplifiers:hlo_dce",
"//xla/service:hlo_creation_utils",
Expand Down Expand Up @@ -347,10 +347,10 @@ xla_cc_test(
"//xla:literal",
"//xla:shape_util",
"//xla:status_macros",
"//xla:test",
"//xla:test_helpers",
"//xla/hlo/ir:hlo",
"//xla/hlo/testlib:hlo_hardware_independent_test_base",
"//xla/hlo/testlib:test",
"//xla/hlo/testlib:test_helpers",
"@tsl//tsl/platform:logging",
"@tsl//tsl/platform:test",
"@tsl//tsl/platform:test_main",
Expand Down Expand Up @@ -393,11 +393,11 @@ xla_cc_test(
"//xla:literal",
"//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/hlo/transforms/simplifiers:flatten_call_graph",
"//xla/hlo/utils:hlo_matchers",
"//xla/service:hlo_buffer",
Expand Down Expand Up @@ -464,11 +464,11 @@ xla_cc_test(
":tuple_points_to_analysis",
"//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:logical_buffer",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/types:span",
Expand Down
4 changes: 2 additions & 2 deletions xla/hlo/analysis/hlo_alias_analysis_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,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/test.h"
#include "xla/hlo/testlib/test_helpers.h"
#include "xla/hlo/transforms/simplifiers/flatten_call_graph.h"
#include "xla/literal_util.h"
#include "xla/service/hlo_buffer.h"
#include "xla/service/hlo_value.h"
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/test.h"
#include "xla/test_helpers.h"
#include "xla/tsl/lib/core/status_test_util.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/logging.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/hlo/analysis/hlo_dataflow_analysis_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ limitations under the License.
#include "xla/hlo/ir/hlo_opcode.h"
#include "xla/hlo/ir/hlo_schedule.h"
#include "xla/hlo/testlib/hlo_hardware_independent_test_base.h"
#include "xla/hlo/testlib/test.h"
#include "xla/hlo/transforms/simplifiers/flatten_call_graph.h"
#include "xla/hlo/transforms/simplifiers/hlo_dce.h"
#include "xla/literal_util.h"
#include "xla/service/hlo_creation_utils.h"
#include "xla/service/hlo_value.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/xla_data.pb.h"
#include "tsl/platform/statusor.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/hlo/analysis/hlo_dfs_reachability_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ 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/literal_util.h"
#include "xla/service/computation_placer.h"
#include "xla/service/hlo_module_config.h"
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/test.h"
#include "tsl/platform/status.h"
#include "tsl/platform/test_benchmark.h"

Expand Down
4 changes: 2 additions & 2 deletions xla/hlo/analysis/hlo_liveness_analysis_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ limitations under the License.
#include "xla/hlo/ir/hlo_computation.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.h"
#include "xla/shape_util.h"
#include "xla/status_macros.h"
#include "xla/test.h"
#include "xla/test_helpers.h"
#include "tsl/platform/logging.h"
#include "tsl/platform/test.h"

Expand Down
4 changes: 2 additions & 2 deletions xla/hlo/analysis/hlo_reachability_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ 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/literal_util.h"
#include "xla/service/computation_placer.h"
#include "xla/service/hlo_module_config.h"
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/test.h"
#include "xla/test_helpers.h"
#include "tsl/platform/status.h"
#include "tsl/platform/test_benchmark.h"

Expand Down
4 changes: 2 additions & 2 deletions xla/hlo/analysis/tuple_points_to_analysis_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ limitations under the License.
#include "xla/hlo/ir/hlo_instructions.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/logical_buffer.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/logging.h"
#include "tsl/platform/statusor.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/hlo/analysis/while_loop_analysis_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,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/test.h"
#include "xla/service/constant_value.h"
#include "xla/service/value_range.h"
#include "xla/test.h"
#include "xla/util.h"
#include "tsl/platform/statusor.h"

Expand Down
14 changes: 7 additions & 7 deletions xla/pjrt/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ xla_cc_test(
srcs = ["semaphore_test.cc"],
deps = [
":semaphore",
"//xla:test",
"//xla/hlo/testlib:test",
"@com_google_absl//absl/synchronization",
"@com_google_googletest//:gtest_main",
"@tsl//tsl/platform:env",
Expand Down Expand Up @@ -123,10 +123,10 @@ xla_cc_test(
"//xla:literal_util",
"//xla:shape_util",
"//xla:status_macros",
"//xla:test",
"//xla:util",
"//xla/client:client_library",
"//xla/client:local_client",
"//xla/hlo/testlib:test",
"//xla/service:cpu_plugin",
"//xla/stream_executor:device_memory_allocator",
"@com_google_absl//absl/log",
Expand Down Expand Up @@ -247,11 +247,11 @@ cc_library(
":pjrt_compiler",
"//xla:cpu_function_runtime",
"//xla:shape_util",
"//xla:test",
"//xla:xla_data_proto_cc",
"//xla/hlo/builder:xla_builder",
"//xla/hlo/builder:xla_computation",
"//xla/hlo/parser:hlo_parser",
"//xla/hlo/testlib:test",
"//xla/tests:literal_test_util",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/synchronization",
Expand Down Expand Up @@ -566,10 +566,10 @@ xla_cc_test(
"//xla:literal_comparison",
"//xla:literal_util",
"//xla:shape_util",
"//xla:test",
"//xla:xla_data_proto_cc",
"//xla/client:client_library",
"//xla/hlo/builder:xla_builder",
"//xla/hlo/testlib:test",
"//xla/service:cpu_plugin",
"//xla/service:platform_util",
"//xla/tsl/concurrency:async_value",
Expand Down Expand Up @@ -645,7 +645,7 @@ xla_cc_test(
srcs = ["mlir_to_hlo_test.cc"],
deps = [
":mlir_to_hlo",
"//xla:test",
"//xla/hlo/testlib:test",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest_main",
Expand Down Expand Up @@ -723,7 +723,7 @@ xla_cc_test(
srcs = ["lru_cache_test.cc"],
deps = [
":lru_cache",
"//xla:test",
"//xla/hlo/testlib:test",
"@tsl//tsl/platform:test_main",
],
)
Expand Down Expand Up @@ -767,8 +767,8 @@ xla_cc_test(
"//xla:array",
"//xla:permutation_util",
"//xla:shape_util",
"//xla:test",
"//xla:util",
"//xla/hlo/testlib:test",
"//xla/tsl/protobuf:error_codes_proto_impl_cc",
"@com_google_absl//absl/container:inlined_vector",
"@com_google_absl//absl/numeric:int128",
Expand Down
2 changes: 1 addition & 1 deletion xla/pjrt/lru_cache_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.

#include <random>

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

namespace xla {
namespace {
Expand Down
2 changes: 1 addition & 1 deletion xla/pjrt/mlir_to_hlo_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ limitations under the License.
#include "mlir/IR/MLIRContext.h"
#include "mlir/IR/OwningOpRef.h"
#include "stablehlo/api/PortableApi.h"
#include "xla/test.h"
#include "xla/hlo/testlib/test.h"
#include "tsl/platform/statusor.h"

namespace xla {
Expand Down
2 changes: 1 addition & 1 deletion xla/pjrt/pjrt_client_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ limitations under the License.
#include "xla/hlo/builder/xla_builder.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/hlo/parser/hlo_parser.h"
#include "xla/hlo/testlib/test.h"
#include "xla/pjrt/pjrt_client.h"
#include "xla/pjrt/pjrt_compiler.h"
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/test.h"
#include "xla/tests/literal_test_util.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/statusor.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/pjrt/pjrt_stream_executor_client_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ limitations under the License.
#include "absl/synchronization/mutex.h"
#include "xla/client/client_library.h"
#include "xla/hlo/builder/xla_builder.h"
#include "xla/hlo/testlib/test.h"
#include "xla/literal.h"
#include "xla/literal_comparison.h"
#include "xla/literal_util.h"
#include "xla/pjrt/pjrt_client.h"
#include "xla/pjrt/pjrt_future.h"
#include "xla/service/platform_util.h"
#include "xla/shape_util.h"
#include "xla/test.h"
#include "xla/tsl/concurrency/async_value_ref.h"
#include "xla/tsl/lib/core/status_test_util.h"
#include "xla/xla_data.pb.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/pjrt/semaphore_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 "absl/synchronization/notification.h"
#include "xla/test.h"
#include "xla/hlo/testlib/test.h"
#include "tsl/platform/env.h"
#include "tsl/platform/threadpool.h"

Expand Down
2 changes: 1 addition & 1 deletion xla/pjrt/tracked_device_buffer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ limitations under the License.
#include "absl/types/span.h"
#include "xla/client/client_library.h"
#include "xla/client/local_client.h"
#include "xla/hlo/testlib/test.h"
#include "xla/literal.h"
#include "xla/literal_util.h"
#include "xla/pjrt/pjrt_client.h"
Expand All @@ -34,7 +35,6 @@ limitations under the License.
#include "xla/shape_util.h"
#include "xla/status_macros.h"
#include "xla/stream_executor/device_memory_allocator.h"
#include "xla/test.h"
#include "xla/util.h"
#include "tsl/platform/statusor.h"

Expand Down
2 changes: 1 addition & 1 deletion xla/pjrt/transpose_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ limitations under the License.
#include "absl/numeric/int128.h"
#include "unsupported/Eigen/CXX11/Tensor"
#include "xla/array.h"
#include "xla/hlo/testlib/test.h"
#include "xla/permutation_util.h"
#include "xla/shape_util.h"
#include "xla/test.h"
#include "xla/tsl/protobuf/error_codes.pb.h"
#include "xla/util.h"
#include "tsl/platform/statusor.h"
Expand Down
Loading

0 comments on commit 0cb8b51

Please sign in to comment.