Skip to content

Commit

Permalink
[HLO Componentization] Create hlo/builder 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  xla/client --> xla/hlo/builder

Phase I takes care of
1. Migrating xla/translate --> xla/hlo/translate
2. Setting up build aliases in xla/translate ensuring external dependencies are still satisfied.

PiperOrigin-RevId: 682530762
  • Loading branch information
sdasgup3 authored and tensorflower-gardener committed Oct 5, 2024
1 parent ad0f360 commit 63855b6
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 27 deletions.
24 changes: 12 additions & 12 deletions third_party/xla/xla/pjrt/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ cc_library(
"//xla:shape_util",
"//xla:util",
"//xla:xla_data_proto_cc",
"//xla/client:xla_computation",
"//xla/hlo/builder:xla_computation",
"//xla/hlo/ir:hlo",
"//xla/service:computation_placer_hdr",
"//xla/service:hlo_cost_analysis",
Expand Down Expand Up @@ -245,8 +245,8 @@ cc_library(
"//xla:shape_util",
"//xla:test",
"//xla:xla_data_proto_cc",
"//xla/client:xla_builder",
"//xla/client:xla_computation",
"//xla/hlo/builder:xla_builder",
"//xla/hlo/builder:xla_computation",
"//xla/service:hlo_parser",
"//xla/tests:literal_test_util",
"@com_google_absl//absl/status:statusor",
Expand Down Expand Up @@ -330,7 +330,7 @@ cc_library(
":metrics",
":pjrt_device_description",
":pjrt_executable",
"//xla/client:xla_computation",
"//xla/hlo/builder:xla_computation",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status",
Expand All @@ -350,7 +350,7 @@ xla_cc_test(
":pjrt_client",
":pjrt_compiler",
":pjrt_device_description",
"//xla/client:xla_computation",
"//xla/hlo/builder:xla_computation",
"//xla/tsl/lib/monitoring:cell_reader",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/log",
Expand Down Expand Up @@ -382,7 +382,7 @@ cc_library(
"//xla:util",
"//xla:xla_data_proto_cc",
"//xla/client:executable_build_options",
"//xla/client:xla_computation",
"//xla/hlo/builder:xla_computation",
"//xla/hlo/ir:hlo",
"//xla/service:computation_placer",
"//xla/service:hlo_proto_cc",
Expand Down Expand Up @@ -503,7 +503,7 @@ cc_library(
"//xla:xla_data_proto_cc",
"//xla/client:executable_build_options",
"//xla/client:local_client",
"//xla/client:xla_computation",
"//xla/hlo/builder:xla_computation",
"//xla/hlo/ir:hlo",
"//xla/pjrt/distributed:protocol_proto_cc",
"//xla/service:compiler",
Expand Down Expand Up @@ -562,7 +562,7 @@ xla_cc_test(
"//xla:test",
"//xla:xla_data_proto_cc",
"//xla/client:client_library",
"//xla/client:xla_builder",
"//xla/hlo/builder:xla_builder",
"//xla/service:cpu_plugin",
"//xla/service:platform_util",
"//xla/tsl/concurrency:async_value",
Expand Down Expand Up @@ -597,7 +597,7 @@ cc_library(
deps = [
"//xla:debug_options_flags",
"//xla:util",
"//xla/client:xla_computation",
"//xla/hlo/builder:xla_computation",
"//xla/hlo/translate/mhlo_to_hlo:mlir_hlo_to_hlo",
"//xla/mlir/utils:error_util",
"//xla/mlir_hlo:hlo_dialect_registration",
Expand Down Expand Up @@ -789,7 +789,7 @@ cc_library(
"//xla:util",
"//xla:xla_data_proto_cc",
"//xla:xla_proto_cc",
"//xla/client:xla_computation",
"//xla/hlo/builder:xla_computation",
"//xla/hlo/ir:hlo",
"//xla/hlo/translate/mhlo_to_hlo:mlir_hlo_to_hlo",
"//xla/mlir_hlo:mhlo_passes",
Expand Down Expand Up @@ -841,7 +841,7 @@ xla_cc_test(
":pjrt_executable",
"//xla:literal_util",
"//xla:shape_util",
"//xla/client:xla_builder",
"//xla/hlo/builder:xla_builder",
"//xla/pjrt/c:pjrt_c_api_cpu_internal",
"//xla/tests:literal_test_util",
"//xla/tsl/lib/core:status_test_util",
Expand All @@ -866,7 +866,7 @@ cc_library(
"//xla:literal",
"//xla:shape_util",
"//xla:util",
"//xla/client:xla_computation",
"//xla/hlo/builder:xla_computation",
"//xla/hlo/ir:hlo",
"//xla/service:computation_placer_hdr",
"//xla/service:hlo_cost_analysis",
Expand Down
2 changes: 1 addition & 1 deletion third_party/xla/xla/pjrt/mlir_to_hlo.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ limitations under the License.
#include "absl/status/status.h"
#include "absl/strings/string_view.h"
#include "mlir/IR/BuiltinOps.h"
#include "xla/client/xla_computation.h"
#include "xla/hlo/builder/xla_computation.h"

namespace xla {

Expand Down
2 changes: 1 addition & 1 deletion third_party/xla/xla/pjrt/pjrt_c_api_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ limitations under the License.
#include "mlir/IR/OwningOpRef.h"
#include "mlir/Pass/PassManager.h"
#include "mlir/Support/LogicalResult.h"
#include "xla/client/xla_computation.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/hlo/ir/hlo_module.h"
#include "xla/hlo/translate/mhlo_to_hlo/mlir_hlo_to_hlo.h"
#include "xla/layout.h"
Expand Down
2 changes: 1 addition & 1 deletion third_party/xla/xla/pjrt/pjrt_c_api_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ limitations under the License.
#include "absl/synchronization/mutex.h"
#include "absl/types/span.h"
#include "mlir/IR/BuiltinOps.h"
#include "xla/client/xla_computation.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/hlo/ir/hlo_module.h"
#include "xla/layout.h"
#include "xla/literal.h"
Expand Down
2 changes: 1 addition & 1 deletion third_party/xla/xla/pjrt/pjrt_c_api_client_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ limitations under the License.
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "absl/status/status.h"
#include "xla/client/xla_builder.h"
#include "xla/hlo/builder/xla_builder.h"
#include "xla/literal_util.h"
#include "xla/pjrt/c/pjrt_c_api_cpu_internal.h"
#include "xla/pjrt/pjrt_api.h"
Expand Down
2 changes: 1 addition & 1 deletion third_party/xla/xla/pjrt/pjrt_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ limitations under the License.
#include "absl/synchronization/notification.h"
#include "absl/types/span.h"
#include "mlir/IR/BuiltinOps.h"
#include "xla/client/xla_computation.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/layout.h"
#include "xla/literal.h"
#include "xla/pjrt/pjrt_common.h"
Expand Down
4 changes: 2 additions & 2 deletions third_party/xla/xla/pjrt/pjrt_client_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ limitations under the License.
#include "absl/status/statusor.h"
#include "absl/synchronization/blocking_counter.h"
#include "absl/types/span.h"
#include "xla/client/xla_builder.h"
#include "xla/client/xla_computation.h"
#include "xla/hlo/builder/xla_builder.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/pjrt/pjrt_client.h"
#include "xla/service/hlo_parser.h"
#include "xla/shape.h"
Expand Down
2 changes: 1 addition & 1 deletion third_party/xla/xla/pjrt/pjrt_compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ limitations under the License.
#include "absl/status/statusor.h"
#include "absl/strings/string_view.h"
#include "mlir/IR/BuiltinOps.h"
#include "xla/client/xla_computation.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/pjrt/pjrt_device_description.h"
#include "xla/pjrt/pjrt_executable.h"
#include "tsl/platform/fingerprint.h"
Expand Down
2 changes: 1 addition & 1 deletion third_party/xla/xla/pjrt/pjrt_compiler_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ limitations under the License.
#include "absl/log/log.h"
#include "absl/status/statusor.h"
#include "absl/strings/string_view.h"
#include "xla/client/xla_computation.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/pjrt/metrics.h"
#include "xla/pjrt/pjrt_client.h"
#include "xla/pjrt/pjrt_device_description.h"
Expand Down
2 changes: 1 addition & 1 deletion third_party/xla/xla/pjrt/pjrt_stream_executor_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ limitations under the License.
#include "mlir/IR/BuiltinOps.h"
#include "xla/client/executable_build_options.h"
#include "xla/client/local_client.h"
#include "xla/client/xla_computation.h"
#include "xla/executable_run_options.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/layout.h"
#include "xla/literal.h"
#include "xla/pjrt/distributed/protocol.pb.h"
Expand Down
2 changes: 1 addition & 1 deletion third_party/xla/xla/pjrt/pjrt_stream_executor_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ limitations under the License.
#include "mlir/IR/BuiltinOps.h"
#include "xla/client/executable_build_options.h"
#include "xla/client/local_client.h"
#include "xla/client/xla_computation.h"
#include "xla/executable_run_options.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/hlo/ir/hlo_module.h"
#include "xla/layout.h"
#include "xla/literal.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ limitations under the License.
#include "absl/functional/any_invocable.h"
#include "absl/synchronization/mutex.h"
#include "xla/client/client_library.h"
#include "xla/client/xla_builder.h"
#include "xla/hlo/builder/xla_builder.h"
#include "xla/literal.h"
#include "xla/literal_comparison.h"
#include "xla/literal_util.h"
Expand Down
2 changes: 1 addition & 1 deletion third_party/xla/xla/pjrt/tf_pjrt_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ limitations under the License.
#include "absl/strings/string_view.h"
#include "absl/synchronization/mutex.h"
#include "absl/types/span.h"
#include "xla/client/xla_computation.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/hlo/ir/hlo_module.h"
#include "xla/layout.h"
#include "xla/literal.h"
Expand Down
2 changes: 1 addition & 1 deletion third_party/xla/xla/pjrt/utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ limitations under the License.
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/Support/LLVM.h"
#include "xla/client/executable_build_options.h"
#include "xla/client/xla_computation.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/hlo/ir/hlo_computation.h"
#include "xla/hlo/ir/hlo_input_output_alias_config.h"
#include "xla/hlo/ir/hlo_opcode.h"
Expand Down
2 changes: 1 addition & 1 deletion third_party/xla/xla/pjrt/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ limitations under the License.
#include "absl/types/span.h"
#include "mlir/IR/BuiltinOps.h"
#include "xla/client/executable_build_options.h"
#include "xla/client/xla_computation.h"
#include "xla/hlo/builder/xla_computation.h"
#include "xla/hlo/ir/hlo_module.h"
#include "xla/pjrt/layout_mode.h"
#include "xla/service/computation_placer.h"
Expand Down

0 comments on commit 63855b6

Please sign in to comment.