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: 714103813
  • Loading branch information
sdasgup3 authored and Google-ML-Automation committed Jan 11, 2025
1 parent 53af204 commit 91bf62c
Show file tree
Hide file tree
Showing 62 changed files with 145 additions and 144 deletions.
144 changes: 72 additions & 72 deletions xla/tests/BUILD

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion xla/tests/all_reduce_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ limitations under the License.
#include <cstdint>
#include <utility>

#include "xla/hlo/testlib/test.h"
#include "xla/literal_util.h"
#include "xla/test.h"
#include "xla/tests/hlo_pjrt_test_base.h"
#include "xla/tests/test_macros.h"

Expand Down
2 changes: 1 addition & 1 deletion xla/tests/array_elementwise_ops_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ limitations under the License.
#include "xla/comparison_util.h"
#include "xla/fp_util.h"
#include "xla/hlo/builder/xla_builder.h"
#include "xla/hlo/testlib/test.h"
#include "xla/layout_util.h"
#include "xla/literal.h"
#include "xla/primitive_util.h"
#include "xla/stream_executor/device_description.h"
#include "xla/test.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/test_macros.h"
#include "xla/types.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/bad_rng_shape_validation_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ limitations under the License.
#include "absl/status/statusor.h"
#include "xla/hlo/builder/xla_builder.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/hlo/testlib/test.h"
#include "xla/shape.h"
#include "xla/test.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/logging.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/batch_norm_grad_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ limitations under the License.
#include <utility>

#include "absl/status/status.h"
#include "xla/hlo/testlib/test.h"
#include "xla/literal_util.h"
#include "xla/test.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/tests/test_macros.h"
#include "tsl/platform/statusor.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/batch_norm_training_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ limitations under the License.
#include <utility>

#include "absl/status/status.h"
#include "xla/hlo/testlib/test.h"
#include "xla/literal_util.h"
#include "xla/test.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/tests/test_macros.h"
#include "tsl/platform/statusor.h"
Expand Down
4 changes: 2 additions & 2 deletions xla/tests/batch_normalization_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ limitations under the License.
#include "xla/hlo/ir/hlo_computation.h"
#include "xla/hlo/ir/hlo_instruction.h"
#include "xla/hlo/ir/hlo_module.h"
#include "xla/hlo/testlib/test.h"
#include "xla/hlo/testlib/test_helpers.h"
#include "xla/literal.h"
#include "xla/reference_util.h"
#include "xla/shape_util.h"
#include "xla/test.h"
#include "xla/test_helpers.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/tests/literal_test_util.h"
Expand Down
4 changes: 2 additions & 2 deletions xla/tests/bfloat16_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ limitations under the License.
#include "xla/hlo/ir/hlo_computation.h"
#include "xla/hlo/ir/hlo_instruction.h"
#include "xla/hlo/ir/hlo_module.h"
#include "xla/hlo/testlib/test.h"
#include "xla/hlo/testlib/test_helpers.h"
#include "xla/literal.h"
#include "xla/reference_util.h"
#include "xla/shape_util.h"
#include "xla/test.h"
#include "xla/test_helpers.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/tests/literal_test_util.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/broadcast_simple_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ limitations under the License.
#include "xla/array4d.h"
#include "xla/client/local_client.h"
#include "xla/hlo/builder/xla_builder.h"
#include "xla/hlo/testlib/test.h"
#include "xla/literal.h"
#include "xla/literal_util.h"
#include "xla/test.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/literal_test_util.h"
#include "xla/tests/test_macros.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/call_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ limitations under the License.

#include "xla/hlo/builder/xla_builder.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/hlo/testlib/test_helpers.h"
#include "xla/literal.h"
#include "xla/literal_util.h"
#include "xla/shape_util.h"
#include "xla/test_helpers.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/literal_test_util.h"
#include "xla/tests/test_macros.h"
Expand Down
4 changes: 2 additions & 2 deletions xla/tests/check_execution_arity_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ limitations under the License.
#include "xla/client/global_data.h"
#include "xla/client/local_client.h"
#include "xla/hlo/builder/xla_builder.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/test.h"
#include "xla/test_helpers.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/test_macros.h"
#include "xla/xla_data.pb.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/cholesky_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ limitations under the License.
#include "xla/hlo/builder/lib/arithmetic.h"
#include "xla/hlo/builder/lib/matrix.h"
#include "xla/hlo/builder/xla_builder.h"
#include "xla/hlo/testlib/test.h"
#include "xla/literal.h"
#include "xla/test.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/literal_test_util.h"
#include "xla/tests/test_macros.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/client_library_test_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ limitations under the License.
#include "xla/client/local_client.h"
#include "xla/execution_options_util.h"
#include "xla/hlo/builder/xla_builder.h"
#include "xla/hlo/testlib/test_helpers.h"
#include "xla/literal_util.h"
#include "xla/service/platform_util.h"
#include "xla/shape_util.h"
#include "xla/status_macros.h"
#include "xla/test_helpers.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/logging.h"

Expand Down
2 changes: 1 addition & 1 deletion xla/tests/client_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ limitations under the License.
#include "xla/client/local_client.h"
#include "xla/hlo/builder/xla_builder.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/hlo/testlib/test_helpers.h"
#include "xla/shape_util.h"
#include "xla/status_macros.h"
#include "xla/test_helpers.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/literal_test_util.h"
#include "xla/tests/test_macros.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/compute_constant_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ limitations under the License.
#include "xla/client/global_data.h"
#include "xla/hlo/builder/xla_builder.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/hlo/testlib/test.h"
#include "xla/layout_util.h"
#include "xla/literal.h"
#include "xla/shape_util.h"
#include "xla/status_macros.h"
#include "xla/test.h"
#include "xla/tests/literal_test_util.h"
#include "xla/tests/test_macros.h"
#include "xla/tests/test_utils.h"
Expand Down
4 changes: 2 additions & 2 deletions xla/tests/concat_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ limitations under the License.
#include "xla/client/local_client.h"
#include "xla/hlo/builder/xla_builder.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/hlo/testlib/test.h"
#include "xla/hlo/testlib/test_helpers.h"
#include "xla/literal_util.h"
#include "xla/reference_util.h"
#include "xla/test.h"
#include "xla/test_helpers.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/tests/literal_test_util.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/concatenate_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,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/literal.h"
#include "xla/literal_util.h"
#include "xla/shape.h"
#include "xla/test.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/tests/literal_test_util.h"
#include "tsl/platform/status.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/constant_reduction_function_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 <vector>

#include "xla/test.h"
#include "xla/hlo/testlib/test.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/tests/literal_test_util.h"
#include "xla/tests/test_macros.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/conv_depthwise_backprop_filter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ limitations under the License.

#include "xla/execution_options_util.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/hlo/testlib/test.h"
#include "xla/hlo/transforms/despecializer.h"
#include "xla/hlo/transforms/simplifiers/float_normalization.h"
#include "xla/status_macros.h"
#include "xla/test.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/tests/test_macros.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/conv_depthwise_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ limitations under the License.

#include "xla/execution_options_util.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/hlo/testlib/test.h"
#include "xla/hlo/transforms/despecializer.h"
#include "xla/hlo/transforms/simplifiers/float_normalization.h"
#include "xla/status_macros.h"
#include "xla/test.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/tests/test_macros.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/conv_depthwise_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ limitations under the License.

#include "xla/execution_options_util.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/hlo/testlib/test.h"
#include "xla/hlo/transforms/despecializer.h"
#include "xla/hlo/transforms/simplifiers/float_normalization.h"
#include "xla/status_macros.h"
#include "xla/test.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/tests/test_macros.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/conv_depthwise_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ limitations under the License.

#include "xla/execution_options_util.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/hlo/testlib/test.h"
#include "xla/hlo/transforms/despecializer.h"
#include "xla/hlo/transforms/simplifiers/float_normalization.h"
#include "xla/status_macros.h"
#include "xla/test.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/conv_depthwise_common.h"
#include "xla/tests/hlo_test_base.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/convolution_dimension_numbers_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ limitations under the License.
#include "xla/client/local_client.h"
#include "xla/hlo/builder/padding.h"
#include "xla/hlo/builder/xla_builder.h"
#include "xla/hlo/testlib/test.h"
#include "xla/reference_util.h"
#include "xla/test.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/literal_test_util.h"
#include "xla/tests/test_macros.h"
Expand Down
4 changes: 2 additions & 2 deletions xla/tests/deallocation_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ limitations under the License.
#include "xla/client/local_client.h"
#include "xla/hlo/builder/xla_builder.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/test.h"
#include "xla/test_helpers.h"
#include "xla/hlo/testlib/test.h"
#include "xla/hlo/testlib/test_helpers.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/test_macros.h"

Expand Down
4 changes: 2 additions & 2 deletions xla/tests/deconstruct_tuple_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ limitations under the License.
#include "xla/client/local_client.h"
#include "xla/hlo/builder/xla_builder.h"
#include "xla/hlo/builder/xla_computation.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/test.h"
#include "xla/test_helpers.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/test_macros.h"
#include "xla/xla_data.pb.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/dynamic_ops_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ limitations under the License.
#include "xla/client/client_library.h"
#include "xla/client/local_client.h"
#include "xla/hlo/builder/xla_builder.h"
#include "xla/hlo/testlib/test_helpers.h"
#include "xla/reference_util.h"
#include "xla/service/local_service.h"
#include "xla/service/platform_util.h"
Expand All @@ -28,7 +29,6 @@ limitations under the License.
#include "xla/stream_executor/device_memory_allocator.h"
#include "xla/stream_executor/stream_executor.h"
#include "xla/stream_executor/stream_executor_memory_allocator.h"
#include "xla/test_helpers.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/tests/literal_test_util.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/dynamic_reshape_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ limitations under the License.
#include <cstdint>
#include <utility>

#include "xla/hlo/testlib/test.h"
#include "xla/literal.h"
#include "xla/literal_util.h"
#include "xla/test.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/tests/test_macros.h"
#include "tsl/platform/statusor.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/float8_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ limitations under the License.

#include <gtest/gtest.h>
#include "xla/hlo/builder/xla_builder.h"
#include "xla/test.h"
#include "xla/hlo/testlib/test.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/test_macros.h"
#include "tsl/platform/ml_dtypes.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/gather_operation_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ limitations under the License.
#include "xla/execution_options_util.h"
#include "xla/hlo/builder/xla_builder.h"
#include "xla/hlo/ir/hlo_module.h"
#include "xla/hlo/testlib/test.h"
#include "xla/literal.h"
#include "xla/literal_util.h"
#include "xla/service/hlo_module_config.h"
#include "xla/service/service.h"
#include "xla/test.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/hlo_pjrt_test_base.h"
#include "xla/tests/test_macros.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/get_dimension_size_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ limitations under the License.

#include "absl/status/status.h"
#include "xla/hlo/ir/hlo_module.h"
#include "xla/hlo/testlib/test.h"
#include "xla/literal.h"
#include "xla/literal_util.h"
#include "xla/test.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/tests/test_macros.h"
#include "tsl/platform/statusor.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/grouped_convolution_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ limitations under the License.
#include "absl/algorithm/container.h"
#include "xla/execution_options_util.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/hlo/testlib/test.h"
#include "xla/hlo/transforms/despecializer.h"
#include "xla/hlo/transforms/simplifiers/float_normalization.h"
#include "xla/status_macros.h"
#include "xla/test.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/tests/test_macros.h"
Expand Down
4 changes: 2 additions & 2 deletions xla/tests/half_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ limitations under the License.

#include "absl/status/statusor.h"
#include "xla/hlo/builder/xla_builder.h"
#include "xla/hlo/testlib/test.h"
#include "xla/hlo/testlib/test_helpers.h"
#include "xla/literal.h"
#include "xla/test.h"
#include "xla/test_helpers.h"
#include "xla/tests/client_library_test_base.h"
#include "xla/tests/test_macros.h"
#include "xla/tests/test_utils.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/hlo_metadata_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ limitations under the License.

#include "xla/client/local_client.h"
#include "xla/hlo/builder/xla_builder.h"
#include "xla/hlo/testlib/test_helpers.h"
#include "xla/service/local_service.h"
#include "xla/test_helpers.h"
#include "xla/tests/local_client_test_base.h"

namespace xla {
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/hlo_runner_agnostic_test_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ 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_helpers.h"
#include "xla/hlo/testlib/verified_hlo_module.h"
#include "xla/literal.h"
#include "xla/service/computation_placer.h"
#include "xla/service/executable.h"
#include "xla/service/hlo_module_config.h"
#include "xla/service/hlo_runner_interface.h"
#include "xla/test_helpers.h"
#include "xla/tsl/platform/test.h"
#include "xla/util.h"
#include "xla/xla_data.pb.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/tests/int4_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ limitations under the License.
#include "absl/strings/substitute.h"
#include "xla/hlo/ir/hlo_instruction.h"
#include "xla/hlo/ir/hlo_opcode.h"
#include "xla/test.h"
#include "xla/hlo/testlib/test.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/tests/test_macros.h"

Expand Down
Loading

0 comments on commit 91bf62c

Please sign in to comment.