diff --git a/xla/BUILD b/xla/BUILD index 44459e0e6df7d9..f9566782a6c5a7 100644 --- a/xla/BUILD +++ b/xla/BUILD @@ -487,7 +487,7 @@ cc_library( deps = [ ":status_macros", ":util", - "//xla/service:hlo_lexer", + "//xla/hlo/parser:hlo_lexer", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:span", @@ -910,7 +910,7 @@ cc_library( ":types", ":util", ":xla_data_proto_cc", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/tsl/lib/io:buffered_inputstream", "//xla/tsl/lib/io:random_inputstream", "@com_google_absl//absl/log:check", diff --git a/xla/hlo/builder/BUILD b/xla/hlo/builder/BUILD index af1ea7f3d6cfc4..5d3c560a65e82b 100644 --- a/xla/hlo/builder/BUILD +++ b/xla/hlo/builder/BUILD @@ -172,7 +172,7 @@ xla_cc_test( "//xla:util", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/service:hlo_proto_cc", "//xla/service:pattern_matcher", "//xla/service:pattern_matcher_gmock", diff --git a/xla/hlo/builder/xla_builder_test.cc b/xla/hlo/builder/xla_builder_test.cc index 293f24d634f67a..089dba93f216ad 100644 --- a/xla/hlo/builder/xla_builder_test.cc +++ b/xla/hlo/builder/xla_builder_test.cc @@ -47,9 +47,9 @@ limitations under the License. #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" #include "xla/hlo/ir/hlo_sharding.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/layout_util.h" #include "xla/service/hlo.pb.h" -#include "xla/service/hlo_parser.h" #include "xla/service/pattern_matcher.h" #include "xla/service/pattern_matcher_gmock.h" #include "xla/shape.h" diff --git a/xla/hlo/experimental/auto_sharding/BUILD b/xla/hlo/experimental/auto_sharding/BUILD index ade737608da33b..78768755fe104f 100644 --- a/xla/hlo/experimental/auto_sharding/BUILD +++ b/xla/hlo/experimental/auto_sharding/BUILD @@ -330,7 +330,7 @@ xla_cc_binary( deps = [ ":auto_sharding", "//xla/hlo/ir:hlo", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/tools:hlo_module_loader", "@com_google_absl//absl/status", "@tsl//tsl/platform:platform_port", @@ -380,12 +380,12 @@ xla_cc_test( ":auto_sharding_strategy", ":auto_sharding_util", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_live_range", "//xla/hlo/utils:hlo_matchers", "//xla/service:buffer_value", "//xla/service:hlo_alias_analysis", "//xla/service:hlo_memory_scheduler", - "//xla/service:hlo_parser", "//xla/service:hlo_value", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", diff --git a/xla/hlo/experimental/auto_sharding/auto_sharding_runner.cc b/xla/hlo/experimental/auto_sharding/auto_sharding_runner.cc index e82bf2a5e31751..753bc8a70d54ab 100644 --- a/xla/hlo/experimental/auto_sharding/auto_sharding_runner.cc +++ b/xla/hlo/experimental/auto_sharding/auto_sharding_runner.cc @@ -20,7 +20,7 @@ limitations under the License. #include "absl/status/status.h" #include "xla/hlo/experimental/auto_sharding/auto_sharding.h" #include "xla/hlo/ir/hlo_module.h" -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/tools/hlo_module_loader.h" #include "tsl/platform/init_main.h" diff --git a/xla/hlo/experimental/auto_sharding/auto_sharding_test.cc b/xla/hlo/experimental/auto_sharding/auto_sharding_test.cc index 55d53e34619a82..c78d8df717f3da 100644 --- a/xla/hlo/experimental/auto_sharding/auto_sharding_test.cc +++ b/xla/hlo/experimental/auto_sharding/auto_sharding_test.cc @@ -41,12 +41,12 @@ limitations under the License. #include "xla/hlo/ir/hlo_opcode.h" #include "xla/hlo/ir/hlo_schedule.h" #include "xla/hlo/ir/hlo_sharding.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_live_range.h" #include "xla/hlo/utils/hlo_matchers.h" #include "xla/service/buffer_value.h" #include "xla/service/hlo_alias_analysis.h" #include "xla/service/hlo_memory_scheduler.h" -#include "xla/service/hlo_parser.h" #include "xla/service/hlo_value.h" #include "xla/tests/hlo_test_base.h" #include "xla/tsl/lib/core/status_test_util.h" diff --git a/xla/hlo/ir/BUILD b/xla/hlo/ir/BUILD index dfaa413716d4a3..b13714fbee45e5 100644 --- a/xla/hlo/ir/BUILD +++ b/xla/hlo/ir/BUILD @@ -77,10 +77,10 @@ cc_library( "//xla:window_util", "//xla:xla_data_proto_cc", "//xla:xla_proto_cc", + "//xla/hlo/parser:hlo_lexer", "//xla/service:compilation_environments", "//xla/service:computation_layout", "//xla/service:computation_placer_hdr", - "//xla/service:hlo_lexer", "//xla/service:hlo_module_config", "//xla/service:hlo_proto_cc", "//xla/service:mapped_ptr_container_sorter", diff --git a/xla/hlo/ir/hlo_instruction.cc b/xla/hlo/ir/hlo_instruction.cc index c0fec2434de508..652a08c5e75a6e 100644 --- a/xla/hlo/ir/hlo_instruction.cc +++ b/xla/hlo/ir/hlo_instruction.cc @@ -63,13 +63,13 @@ limitations under the License. #include "xla/hlo/ir/hlo_sharding.h" #include "xla/hlo/ir/hlo_sharding_metadata.h" #include "xla/hlo/ir/ptrvec.h" +#include "xla/hlo/parser/hlo_lexer.h" #include "xla/layout.h" #include "xla/literal.h" #include "xla/map_util.h" #include "xla/primitive_util.h" #include "xla/printer.h" #include "xla/service/hlo.pb.h" -#include "xla/service/hlo_lexer.h" #include "xla/service/mapped_ptr_container_sorter.h" #include "xla/service/name_uniquer.h" #include "xla/shape.h" diff --git a/xla/hlo/pass/BUILD b/xla/hlo/pass/BUILD index 4932aa3b3a8325..192293a647c69b 100644 --- a/xla/hlo/pass/BUILD +++ b/xla/hlo/pass/BUILD @@ -80,7 +80,7 @@ xla_cc_test( "//xla:util", "//xla/hlo/ir:hlo", "//xla/hlo/ir:hlo_module_group", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", "//xla/tsl/lib/core:status_test_util", diff --git a/xla/hlo/pass/hlo_pass_pipeline_test.cc b/xla/hlo/pass/hlo_pass_pipeline_test.cc index 5ef86e33ef9461..df7b0188077f60 100644 --- a/xla/hlo/pass/hlo_pass_pipeline_test.cc +++ b/xla/hlo/pass/hlo_pass_pipeline_test.cc @@ -32,8 +32,8 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_module_group.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/pass/hlo_pass_interface.h" -#include "xla/service/hlo_parser.h" #include "xla/test_helpers.h" #include "xla/tests/hlo_test_base.h" #include "xla/tsl/lib/core/status_test_util.h" diff --git a/xla/hlo/transforms/BUILD b/xla/hlo/transforms/BUILD index b14cd6dc2a8a48..f95f4ff4c67bdc 100644 --- a/xla/hlo/transforms/BUILD +++ b/xla/hlo/transforms/BUILD @@ -45,8 +45,8 @@ xla_cc_test( "//xla:test", "//xla:util", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/service:hlo_dce", - "//xla/service:hlo_parser", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", "//xla/tsl/lib/core:status_test_util", diff --git a/xla/hlo/transforms/hlo_constant_splitter_test.cc b/xla/hlo/transforms/hlo_constant_splitter_test.cc index c7ebf8459502e8..28d3310865e9f9 100644 --- a/xla/hlo/transforms/hlo_constant_splitter_test.cc +++ b/xla/hlo/transforms/hlo_constant_splitter_test.cc @@ -19,8 +19,8 @@ limitations under the License. #include "xla/hlo/ir/hlo_computation.h" #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/hlo_dce.h" -#include "xla/service/hlo_parser.h" #include "xla/test.h" #include "xla/tests/hlo_test_base.h" #include "xla/tsl/lib/core/status_test_util.h" diff --git a/xla/hlo/translate/hlo_to_mhlo/BUILD b/xla/hlo/translate/hlo_to_mhlo/BUILD index 7a63a6319d3c22..acf1a3d05fcc25 100644 --- a/xla/hlo/translate/hlo_to_mhlo/BUILD +++ b/xla/hlo/translate/hlo_to_mhlo/BUILD @@ -236,9 +236,9 @@ cc_library( hdrs = ["translate.h"], deps = [ ":hlo_to_mlir_hlo", + "//xla/hlo/parser:hlo_parser", "//xla/mlir_hlo", "//xla/mlir_hlo:mhlo_passes", - "//xla/service:hlo_parser", "//xla/service:hlo_proto_cc", "//xla/service/llvm_ir:llvm_util", "@com_google_absl//absl/status", diff --git a/xla/hlo/translate/hlo_to_mhlo/translate.cc b/xla/hlo/translate/hlo_to_mhlo/translate.cc index ec89c29cafa0ad..7d8c5897f689b0 100644 --- a/xla/hlo/translate/hlo_to_mhlo/translate.cc +++ b/xla/hlo/translate/hlo_to_mhlo/translate.cc @@ -19,11 +19,11 @@ limitations under the License. #include "mlir/IR/BuiltinOps.h" #include "mlir/IR/Location.h" #include "mlir/Pass/PassManager.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/translate/hlo_to_mhlo/hlo_to_mlir_hlo.h" #include "xla/mlir_hlo/mhlo/IR/hlo_ops.h" #include "xla/mlir_hlo/mhlo/transforms/passes.h" #include "xla/service/hlo.pb.h" -#include "xla/service/hlo_parser.h" #include "xla/service/llvm_ir/llvm_util.h" #include "tsl/platform/protobuf.h" diff --git a/xla/hlo/translate/mhlo_to_hlo/BUILD b/xla/hlo/translate/mhlo_to_hlo/BUILD index d894c99ae97d00..7460c8d2024ca0 100644 --- a/xla/hlo/translate/mhlo_to_hlo/BUILD +++ b/xla/hlo/translate/mhlo_to_hlo/BUILD @@ -24,8 +24,8 @@ cc_library( "//xla:util", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/mlir_hlo", - "//xla/service:hlo_parser", "//xla/service:hlo_proto_cc", "//xla/stream_executor:dnn", "@com_google_absl//absl/status:statusor", @@ -125,13 +125,13 @@ cc_library( "//xla/client/lib:quantize", "//xla/client/lib:slicing", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/mlir/utils:error_util", "//xla/mlir/utils:type_util", "//xla/mlir_hlo", "//xla/mlir_hlo:mhlo_passes", "//xla/service:computation_layout", "//xla/service:hlo_module_config", - "//xla/service:hlo_parser", "//xla/service:hlo_proto_cc", "//xla/service/gpu:backend_configs_cc", "@com_google_absl//absl/log:check", diff --git a/xla/hlo/translate/mhlo_to_hlo/attribute_exporter.cc b/xla/hlo/translate/mhlo_to_hlo/attribute_exporter.cc index cd1f3f36d58a6e..0246563c455a16 100644 --- a/xla/hlo/translate/mhlo_to_hlo/attribute_exporter.cc +++ b/xla/hlo/translate/mhlo_to_hlo/attribute_exporter.cc @@ -25,9 +25,9 @@ limitations under the License. #include "mlir/Support/LLVM.h" #include "stablehlo/dialect/Base.h" #include "xla/hlo/ir/hlo_sharding.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/mlir_hlo/mhlo/IR/hlo_ops.h" #include "xla/service/hlo.pb.h" -#include "xla/service/hlo_parser.h" #include "xla/shape_util.h" #include "xla/util.h" #include "xla/xla_data.pb.h" diff --git a/xla/hlo/translate/mhlo_to_hlo/mlir_hlo_to_hlo.cc b/xla/hlo/translate/mhlo_to_hlo/mlir_hlo_to_hlo.cc index 9b201f946ccaa5..fe7add3ecc5c11 100644 --- a/xla/hlo/translate/mhlo_to_hlo/mlir_hlo_to_hlo.cc +++ b/xla/hlo/translate/mhlo_to_hlo/mlir_hlo_to_hlo.cc @@ -76,6 +76,7 @@ limitations under the License. #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" #include "xla/hlo/ir/hlo_sharding.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/translate/mhlo_to_hlo/attribute_exporter.h" #include "xla/hlo/translate/mhlo_to_hlo/layout_util.h" #include "xla/hlo/translate/mhlo_to_hlo/location_exporter.h" @@ -94,7 +95,6 @@ limitations under the License. #include "xla/service/gpu/backend_configs.pb.h" #include "xla/service/hlo.pb.h" #include "xla/service/hlo_module_config.h" -#include "xla/service/hlo_parser.h" #include "xla/shape.h" #include "xla/shape_util.h" #include "xla/xla_data.pb.h" diff --git a/xla/hlo/utils/BUILD b/xla/hlo/utils/BUILD index 10d9358e44bf5a..f94a3e3b457133 100644 --- a/xla/hlo/utils/BUILD +++ b/xla/hlo/utils/BUILD @@ -70,7 +70,7 @@ cc_library( "//xla:test", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "@com_google_absl//absl/strings", ], ) @@ -172,7 +172,7 @@ xla_cc_test( deps = [ ":hlo_query", "//xla/hlo/ir:hlo", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "@com_google_absl//absl/log", "@com_google_absl//absl/log:check", diff --git a/xla/hlo/utils/hlo_matchers.h b/xla/hlo/utils/hlo_matchers.h index 17f3294156bcab..200973872bfe7c 100644 --- a/xla/hlo/utils/hlo_matchers.h +++ b/xla/hlo/utils/hlo_matchers.h @@ -21,7 +21,7 @@ limitations under the License. #include #include "xla/hlo/ir/hlo_instruction.h" -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/test.h" #include "xla/xla_data.pb.h" diff --git a/xla/hlo/utils/hlo_query_test.cc b/xla/hlo/utils/hlo_query_test.cc index 1f715ad6815284..3a741a8fdaf287 100644 --- a/xla/hlo/utils/hlo_query_test.cc +++ b/xla/hlo/utils/hlo_query_test.cc @@ -27,7 +27,7 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/tests/hlo_test_base.h" #include "tsl/platform/statusor.h" diff --git a/xla/pjrt/BUILD b/xla/pjrt/BUILD index f443bdf46d1b90..b5c446f4422d97 100644 --- a/xla/pjrt/BUILD +++ b/xla/pjrt/BUILD @@ -247,7 +247,7 @@ cc_library( "//xla:xla_data_proto_cc", "//xla/client:xla_builder", "//xla/client:xla_computation", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/tests:literal_test_util", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/synchronization", @@ -408,7 +408,7 @@ cc_library( visibility = ["//xla:friends"], deps = [ "//xla:shape_util", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "@com_google_absl//absl/hash", "@com_google_absl//absl/log:check", "@com_google_absl//absl/status:statusor", @@ -425,7 +425,7 @@ cc_library( visibility = ["//xla:friends"], deps = [ "//xla:shape_util", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "@com_google_absl//absl/status", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", @@ -891,8 +891,8 @@ xla_cc_test( deps = [ ":tf_pjrt_client", "//xla:literal_util", + "//xla/hlo/parser:hlo_parser", "//xla/pjrt/cpu:cpu_client", - "//xla/service:hlo_parser", "@com_google_googletest//:gtest_main", "@tsl//tsl/platform:env", "@tsl//tsl/platform:test", diff --git a/xla/pjrt/c/BUILD b/xla/pjrt/c/BUILD index 67ad036a155cce..200af6f3678715 100644 --- a/xla/pjrt/c/BUILD +++ b/xla/pjrt/c/BUILD @@ -454,11 +454,11 @@ cc_library( "//xla:xla_proto_cc", "//xla/client:executable_build_options", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/pjrt:compile_options_proto_cc", "//xla/pjrt:pjrt_client", "//xla/pjrt:pjrt_future", "//xla/service:computation_placer_hdr", - "//xla/service:hlo_parser", "//xla/service:hlo_proto_cc", "//xla/tests:literal_test_util", "@com_google_absl//absl/base:core_headers", diff --git a/xla/pjrt/c/pjrt_c_api_test.cc b/xla/pjrt/c/pjrt_c_api_test.cc index c341df9e82f324..ae7ef1e52df5a0 100644 --- a/xla/pjrt/c/pjrt_c_api_test.cc +++ b/xla/pjrt/c/pjrt_c_api_test.cc @@ -36,6 +36,7 @@ limitations under the License. #include "absl/types/span.h" #include "xla/client/executable_build_options.h" #include "xla/hlo/ir/hlo_module.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/literal.h" #include "xla/literal_util.h" #include "xla/pjrt/c/pjrt_c_api.h" @@ -46,7 +47,6 @@ limitations under the License. #include "xla/pjrt/pjrt_future.h" #include "xla/service/computation_placer.h" #include "xla/service/hlo.pb.h" -#include "xla/service/hlo_parser.h" #include "xla/shape.h" #include "xla/shape_util.h" #include "xla/tests/literal_test_util.h" diff --git a/xla/pjrt/cpu/BUILD b/xla/pjrt/cpu/BUILD index 7c928106ee92a7..d45d198fccd6f0 100644 --- a/xla/pjrt/cpu/BUILD +++ b/xla/pjrt/cpu/BUILD @@ -235,10 +235,10 @@ xla_cc_test( "//xla/client:xla_computation", "//xla/ffi", "//xla/ffi:ffi_api", + "//xla/hlo/parser:hlo_parser", "//xla/pjrt:host_memory_spaces", "//xla/pjrt:pjrt_client", "//xla/pjrt:pjrt_executable", - "//xla/service:hlo_parser", "//xla/service:hlo_proto_cc", "//xla/tests:literal_test_util", "//xla/tests:test_utils", diff --git a/xla/pjrt/cpu/cpu_client_test.cc b/xla/pjrt/cpu/cpu_client_test.cc index d0b634f17b5527..b51c81004db973 100644 --- a/xla/pjrt/cpu/cpu_client_test.cc +++ b/xla/pjrt/cpu/cpu_client_test.cc @@ -39,12 +39,12 @@ limitations under the License. #include "xla/client/xla_computation.h" #include "xla/ffi/ffi.h" #include "xla/ffi/ffi_api.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/literal.h" #include "xla/literal_util.h" #include "xla/pjrt/host_memory_spaces.h" #include "xla/pjrt/pjrt_client.h" #include "xla/pjrt/pjrt_executable.h" -#include "xla/service/hlo_parser.h" #include "xla/shape.h" #include "xla/shape_util.h" #include "xla/tests/literal_test_util.h" diff --git a/xla/pjrt/gpu/BUILD b/xla/pjrt/gpu/BUILD index 6c4548f3d5cbf8..74ededb2bd5aa2 100644 --- a/xla/pjrt/gpu/BUILD +++ b/xla/pjrt/gpu/BUILD @@ -157,6 +157,7 @@ xla_cc_test( "//xla/client:xla_computation", "//xla/ffi", "//xla/ffi:ffi_api", + "//xla/hlo/parser:hlo_parser", "//xla/pjrt:host_memory_spaces", "//xla/pjrt:mlir_to_hlo", "//xla/pjrt:pjrt_client", @@ -165,7 +166,6 @@ xla_cc_test( "//xla/pjrt:pjrt_stream_executor_client", "//xla/pjrt/distributed:in_memory_key_value_store", "//xla/service:gpu_plugin", - "//xla/service:hlo_parser", "//xla/service:platform_util", "//xla/stream_executor", "//xla/tests:literal_test_util", @@ -311,10 +311,10 @@ xla_test( ":se_gpu_pjrt_compiler", "//xla:test", "//xla/client:xla_computation", + "//xla/hlo/parser:hlo_parser", "//xla/mlir_hlo", "//xla/pjrt:pjrt_client", "//xla/pjrt:pjrt_compiler", - "//xla/service:hlo_parser", "//xla/tests:literal_test_util", "@com_google_absl//absl/status", "@com_google_googletest//:gtest", @@ -339,12 +339,12 @@ xla_test( "//xla:literal", "//xla:literal_util", "//xla/client:xla_computation", + "//xla/hlo/parser:hlo_parser", "//xla/mlir_hlo", "//xla/pjrt:pjrt_client", "//xla/pjrt:pjrt_compiler", "//xla/pjrt:pjrt_executable", "//xla/service:compiler", - "//xla/service:hlo_parser", "//xla/tests:literal_test_util", "@com_google_absl//absl/memory", "@com_google_absl//absl/status", diff --git a/xla/pjrt/gpu/se_gpu_pjrt_client_test.cc b/xla/pjrt/gpu/se_gpu_pjrt_client_test.cc index 359b621349a9e6..6098969ff66242 100644 --- a/xla/pjrt/gpu/se_gpu_pjrt_client_test.cc +++ b/xla/pjrt/gpu/se_gpu_pjrt_client_test.cc @@ -39,6 +39,7 @@ limitations under the License. #include "xla/client/xla_computation.h" #include "xla/ffi/ffi.h" #include "xla/ffi/ffi_api.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/layout.h" #include "xla/literal.h" #include "xla/literal_util.h" @@ -50,7 +51,6 @@ limitations under the License. #include "xla/pjrt/pjrt_executable.h" #include "xla/pjrt/pjrt_future.h" #include "xla/pjrt/pjrt_stream_executor_client.h" -#include "xla/service/hlo_parser.h" #include "xla/service/platform_util.h" #include "xla/shape.h" #include "xla/shape_util.h" diff --git a/xla/pjrt/gpu/se_gpu_pjrt_compiler_aot_test.cc b/xla/pjrt/gpu/se_gpu_pjrt_compiler_aot_test.cc index 84570559295040..4e7478bf62e1e6 100644 --- a/xla/pjrt/gpu/se_gpu_pjrt_compiler_aot_test.cc +++ b/xla/pjrt/gpu/se_gpu_pjrt_compiler_aot_test.cc @@ -44,7 +44,7 @@ limitations under the License. #elif TENSORFLOW_USE_ROCM #include "xla/service/gpu/amdgpu_compiler.h" #endif -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/tests/literal_test_util.h" #include "tsl/platform/casts.h" #include "tsl/platform/protobuf.h" diff --git a/xla/pjrt/gpu/se_gpu_pjrt_compiler_test.cc b/xla/pjrt/gpu/se_gpu_pjrt_compiler_test.cc index 1b630342bf1336..76d0703cb7e9d3 100644 --- a/xla/pjrt/gpu/se_gpu_pjrt_compiler_test.cc +++ b/xla/pjrt/gpu/se_gpu_pjrt_compiler_test.cc @@ -23,12 +23,12 @@ limitations under the License. #include "mlir/Dialect/Func/IR/FuncOps.h" #include "mlir/Parser/Parser.h" #include "xla/client/xla_computation.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/mlir_hlo/mhlo/IR/hlo_ops.h" #include "xla/pjrt/gpu/gpu_topology.h" #include "xla/pjrt/gpu/se_gpu_pjrt_client.h" #include "xla/pjrt/pjrt_client.h" #include "xla/pjrt/pjrt_compiler.h" -#include "xla/service/hlo_parser.h" #include "xla/test.h" #include "xla/tests/literal_test_util.h" #include "tsl/platform/status_matchers.h" diff --git a/xla/pjrt/layout_mode.cc b/xla/pjrt/layout_mode.cc index 84758c6ef7e293..08877724052ac6 100644 --- a/xla/pjrt/layout_mode.cc +++ b/xla/pjrt/layout_mode.cc @@ -22,8 +22,8 @@ limitations under the License. #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/layout.h" -#include "xla/service/hlo_parser.h" namespace xla { diff --git a/xla/pjrt/pjrt_client_test.cc b/xla/pjrt/pjrt_client_test.cc index cdaadf57295ca5..fbcf1a9f3116b6 100644 --- a/xla/pjrt/pjrt_client_test.cc +++ b/xla/pjrt/pjrt_client_test.cc @@ -27,8 +27,8 @@ limitations under the License. #include "absl/types/span.h" #include "xla/client/xla_builder.h" #include "xla/client/xla_computation.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/pjrt/pjrt_client.h" -#include "xla/service/hlo_parser.h" #include "xla/shape.h" #include "xla/shape_util.h" #include "xla/test.h" diff --git a/xla/pjrt/pjrt_layout.h b/xla/pjrt/pjrt_layout.h index e9c01b36c1fed6..eea9b861690860 100644 --- a/xla/pjrt/pjrt_layout.h +++ b/xla/pjrt/pjrt_layout.h @@ -24,8 +24,8 @@ limitations under the License. #include "absl/log/check.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/layout.h" -#include "xla/service/hlo_parser.h" #include "tsl/platform/casts.h" #include "tsl/platform/statusor.h" diff --git a/xla/pjrt/tf_pjrt_client_test.cc b/xla/pjrt/tf_pjrt_client_test.cc index 2e946459fbebde..16c9f3aa183f58 100644 --- a/xla/pjrt/tf_pjrt_client_test.cc +++ b/xla/pjrt/tf_pjrt_client_test.cc @@ -20,9 +20,9 @@ limitations under the License. #include #include +#include "xla/hlo/parser/hlo_parser.h" #include "xla/literal_util.h" #include "xla/pjrt/cpu/cpu_client.h" -#include "xla/service/hlo_parser.h" #include "tsl/platform/env.h" #include "tsl/platform/file_system.h" #include "tsl/platform/test.h" diff --git a/xla/python/BUILD b/xla/python/BUILD index 5387b8986ad0d5..66196b1d41ca2a 100644 --- a/xla/python/BUILD +++ b/xla/python/BUILD @@ -1161,6 +1161,7 @@ cc_library( "//xla/ffi/api:c_api", "//xla/hlo/ir:hlo", "//xla/hlo/ir:hlo_module_group", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/pass:hlo_pass", "//xla/pjrt:exceptions", "//xla/pjrt:pjrt_executable", @@ -1172,7 +1173,6 @@ cc_library( "//xla/service:hlo_dce", "//xla/service:hlo_graph_dumper", "//xla/service:hlo_module_config", - "//xla/service:hlo_parser", "//xla/service:hlo_proto_cc", "//xla/service:name_uniquer", "//xla/service:tuple_simplifier", diff --git a/xla/python/xla_compiler.cc b/xla/python/xla_compiler.cc index e61585b61cccdc..3f07730efc96a9 100644 --- a/xla/python/xla_compiler.cc +++ b/xla/python/xla_compiler.cc @@ -55,6 +55,7 @@ limitations under the License. #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_module_group.h" #include "xla/hlo/ir/hlo_sharding.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/pass/hlo_pass_interface.h" #include "xla/layout.h" #include "xla/layout_util.h" @@ -75,7 +76,6 @@ limitations under the License. #include "xla/service/hlo_dce.h" #include "xla/service/hlo_graph_dumper.h" #include "xla/service/hlo_module_config.h" -#include "xla/service/hlo_parser.h" #include "xla/service/name_uniquer.h" #include "xla/service/tuple_simplifier.h" #include "xla/shape.h" diff --git a/xla/service/BUILD b/xla/service/BUILD index 5f1c0407d99fd0..16daad0bf11aaf 100644 --- a/xla/service/BUILD +++ b/xla/service/BUILD @@ -487,8 +487,8 @@ xla_cc_test( deps = [ ":collective_ops_utils", ":collective_permute_decomposer", - ":hlo_parser", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_matchers", "//xla/hlo/utils:hlo_query", "//xla/service/gpu:backend_configs_cc", @@ -558,8 +558,8 @@ xla_cc_test( srcs = ["value_range_test.cc"], deps = [ ":hlo_module_config", - ":hlo_parser", ":value_range", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "@com_google_absl//absl/container:flat_hash_map", "@com_google_googletest//:gtest_main", @@ -593,7 +593,6 @@ cc_library( ":collective_ops_utils", ":constant_value", ":hlo_dce", - ":hlo_parser", ":hlo_pass", ":tuple_points_to_analysis", ":value_range", @@ -606,6 +605,7 @@ cc_library( "//xla/hlo/evaluator:hlo_evaluator", "//xla/hlo/ir:hlo", "//xla/hlo/ir:hlo_instruction_utils", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/pass:hlo_pass", "//xla/hlo/utils:hlo_query", "@com_google_absl//absl/algorithm:container", @@ -631,12 +631,12 @@ xla_cc_test( deps = [ ":collective_pipeliner", ":hlo_module_config", - ":hlo_parser", ":hlo_verifier", ":host_memory_offload_annotations_hdr", "//xla:test_helpers", "//xla:util", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/pass:hlo_pass_pipeline", "//xla/hlo/utils:hlo_matchers", "//xla/tests:filecheck", @@ -728,8 +728,8 @@ xla_cc_test( deps = [ ":dump", ":hlo_module_config", - ":hlo_parser", "//xla:xla_proto_cc", + "//xla/hlo/parser:hlo_parser", "//xla/tests:xla_internal_test_main", "//xla/tsl/lib/core:status_test_util", "@com_google_absl//absl/strings", @@ -772,7 +772,6 @@ xla_cc_test( name = "shape_inference_test", srcs = ["shape_inference_test.cc"], deps = [ - ":hlo_parser", ":shape_inference", "//xla:shape_util", "//xla:test", @@ -780,6 +779,7 @@ xla_cc_test( "//xla:xla_data_proto_cc", "//xla/client:padding", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/tests:xla_internal_test_main", # fixdeps: keep "@com_google_absl//absl/log", "@com_google_absl//absl/log:check", @@ -851,12 +851,12 @@ xla_cc_test( ], deps = [ ":hlo_dce", - ":hlo_parser", ":sharding_propagation", "//xla:protobuf_util", "//xla:util", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/transforms:hlo_constant_splitter", "//xla/hlo/utils:hlo_matchers", "//xla/tests:hlo_test_base", @@ -895,10 +895,10 @@ xla_cc_test( "sharding_remover_test.cc", ], deps = [ - ":hlo_parser", ":sharding_remover", "//xla:status_macros", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_matchers", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", @@ -943,10 +943,10 @@ xla_test( "gpu", ], deps = [ - ":hlo_parser", "//xla:execution_options_util", "//xla:status_macros", "//xla:test", + "//xla/hlo/parser:hlo_parser", "//xla/tests:client_library_test_base", "//xla/tests:hlo_test_base", "//xla/tests:test_macros_header", @@ -973,7 +973,6 @@ cc_library( name = "pattern_matcher", hdrs = ["pattern_matcher.h"], deps = [ - ":hlo_parser", "//xla:comparison_util", "//xla:literal", "//xla:shape_util", @@ -981,6 +980,7 @@ cc_library( "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", "//xla/hlo/ir:ptrvec", + "//xla/hlo/parser:hlo_parser", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/container:inlined_vector", "@com_google_absl//absl/log", @@ -995,7 +995,6 @@ xla_cc_test( name = "pattern_matcher_test", srcs = ["pattern_matcher_test.cc"], deps = [ - ":hlo_parser", ":pattern_matcher", "//xla:comparison_util", "//xla:literal_util", @@ -1003,6 +1002,7 @@ xla_cc_test( "//xla:test", "//xla:util", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", "@com_google_absl//absl/strings", @@ -1131,12 +1131,12 @@ xla_cc_test( name = "hlo_sharding_test", srcs = ["hlo_sharding_test.cc"], deps = [ - ":hlo_parser", "//xla:protobuf_util", "//xla:shape_util", "//xla:test", "//xla:test_helpers", "//xla:xla_data_proto_cc", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", "@com_google_absl//absl/hash", @@ -1238,13 +1238,13 @@ xla_cc_test( srcs = ["call_inliner_test.cc"], deps = [ ":call_inliner", - ":hlo_parser", "//xla:literal", "//xla:literal_util", "//xla:shape_util", "//xla:test", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_matchers", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", @@ -1568,10 +1568,10 @@ xla_cc_test( name = "p2p_schedule_preparation_test", srcs = ["p2p_schedule_preparation_test.cc"], deps = [ - ":hlo_parser", ":p2p_schedule_preparation", "//xla:util", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/log", @@ -2038,7 +2038,6 @@ xla_cc_test( ":hlo_dce", ":hlo_memory_scheduler", ":hlo_ordering", - ":hlo_parser", ":hlo_proto_cc", ":hlo_proto_util", ":hlo_value", @@ -2052,6 +2051,7 @@ xla_cc_test( "//xla:types", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/service/memory_space_assignment", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", @@ -2340,11 +2340,11 @@ xla_cc_test( name = "instruction_fusion_test", srcs = ["instruction_fusion_test.cc"], deps = [ - ":hlo_parser", ":instruction_fusion", "//xla:shape_util", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_matchers", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", @@ -2421,9 +2421,9 @@ xla_cc_test( srcs = ["fusion_node_indexing_evaluation_test.cc"], deps = [ ":fusion_node_indexing_evaluation", - ":hlo_parser", ":instruction_fusion", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", "@com_google_absl//absl/container:flat_hash_map", @@ -2784,7 +2784,6 @@ xla_test( ], deps = [ ":batchnorm_expander", - ":hlo_parser", "//xla:error_spec", "//xla:literal", "//xla:shape_util", @@ -2792,6 +2791,7 @@ xla_test( "//xla:types", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_matchers", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", @@ -2868,7 +2868,6 @@ xla_cc_test( deps = [ ":algebraic_simplifier", ":hlo_creation_utils", - ":hlo_parser", ":host_memory_offload_annotations_hdr", ":layout_assignment", ":pattern_matcher", @@ -2883,6 +2882,7 @@ xla_cc_test( "//xla:window_util", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/pass:hlo_pass", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", # fixdeps: keep @@ -2965,13 +2965,13 @@ xla_cc_test( srcs = ["logistic_expander_test.cc"], deps = [ ":dynamic_padder", - ":hlo_parser", ":logistic_expander", ":pattern_matcher", ":pattern_matcher_gmock", "//xla:test", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", # fixdeps: keep "@tsl//tsl/platform:statusor", @@ -3315,7 +3315,6 @@ xla_cc_test( deps = [ ":all_reduce_simplifier", ":hlo_module_config", - ":hlo_parser", ":pattern_matcher", ":pattern_matcher_gmock", "//xla:shape_util", @@ -3323,6 +3322,7 @@ xla_cc_test( "//xla:types", "//xla:window_util", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", # fixdeps: keep "//xla/tsl/lib/core:status_test_util", @@ -3840,7 +3840,6 @@ xla_cc_test( srcs = ["while_loop_simplifier_test.cc"], deps = [ ":hlo_dce", - ":hlo_parser", ":tuple_simplifier", ":while_loop_simplifier", "//xla:literal_util", @@ -3848,6 +3847,7 @@ xla_cc_test( "//xla:test", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_matchers", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", @@ -4000,7 +4000,7 @@ xla_cc_test( srcs = ["dot_dimension_merger_test.cc"], deps = [ ":dot_dimension_merger", - ":hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", "@com_google_googletest//:gtest_main", @@ -4132,8 +4132,8 @@ xla_cc_test( srcs = ["all_gather_decomposer_test.cc"], deps = [ ":all_gather_decomposer", - ":hlo_parser", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_matchers", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", # fixdeps: keep @@ -4219,10 +4219,10 @@ xla_cc_test( name = "reduce_decomposer_test", srcs = ["reduce_decomposer_test.cc"], deps = [ - ":hlo_parser", ":reduce_decomposer", "//xla:test", "//xla:test_helpers", + "//xla/hlo/parser:hlo_parser", "//xla/tests:filecheck", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", @@ -4233,10 +4233,10 @@ xla_cc_test( name = "reshape_decomposer_test", srcs = ["reshape_decomposer_test.cc"], deps = [ - ":hlo_parser", ":reshape_decomposer", "//xla:test", "//xla:test_helpers", + "//xla/hlo/parser:hlo_parser", "//xla/tests:filecheck", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", @@ -4315,7 +4315,6 @@ xla_cc_test( deps = [ ":dynamic_dimension_simplifier", ":hlo_creation_utils", - ":hlo_parser", ":pattern_matcher", ":pattern_matcher_gmock", ":shape_inference", @@ -4326,6 +4325,7 @@ xla_cc_test( "//xla:window_util", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/pass:hlo_pass_pipeline", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", # fixdeps: keep @@ -4383,7 +4383,6 @@ xla_test( ":dynamic_dimension_simplifier", ":dynamic_padder", ":hlo_dce", - ":hlo_parser", ":pattern_matcher", ":pattern_matcher_gmock", ":tuple_simplifier", @@ -4398,6 +4397,7 @@ xla_test( "//xla:xla_data_proto_cc", "//xla/client:xla_builder", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_matchers", "//xla/tests:client_library_test_base", "//xla/tests:hlo_test_base", @@ -4623,7 +4623,6 @@ xla_cc_test( deps = [ ":cpu_plugin", ":hlo_cost_analysis", - ":hlo_parser", ":local_service", ":service", "//xla:shape_util", @@ -4636,6 +4635,7 @@ xla_cc_test( "//xla/client:xla_builder", "//xla/client:xla_computation", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", "@com_google_absl//absl/status:statusor", @@ -4678,7 +4678,6 @@ xla_cc_test( name = "hlo_computation_test", srcs = ["hlo_computation_test.cc"], deps = [ - ":hlo_parser", ":pattern_matcher", ":pattern_matcher_gmock", "//xla:comparison_util", @@ -4688,6 +4687,7 @@ xla_cc_test( "//xla:test", "//xla:test_helpers", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_matchers", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", @@ -5285,7 +5285,6 @@ xla_cc_test( ":copy_insertion", ":hlo_graph_dumper", ":hlo_module_config", - ":hlo_parser", "//xla:comparison_util", "//xla:debug_options_flags", "//xla:literal_util", @@ -5294,6 +5293,7 @@ xla_cc_test( "//xla:test_helpers", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_matchers", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", @@ -5339,8 +5339,8 @@ xla_cc_test( name = "memory_space_propagation_test", srcs = ["memory_space_propagation_test.cc"], deps = [ - ":hlo_parser", ":memory_space_propagation", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", "//xla/tsl/lib/core:status_test_util", @@ -5427,7 +5427,6 @@ xla_cc_test( srcs = ["hlo_verifier_test.cc"], deps = [ ":hlo_module_config", - ":hlo_parser", ":hlo_verifier", ":layout_assignment", "//xla:literal_util", @@ -5435,6 +5434,7 @@ xla_cc_test( "//xla:xla_data_proto_cc", "//xla:xla_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", "//xla/tsl/lib/core:status_test_util", @@ -5472,8 +5472,8 @@ xla_cc_test( srcs = ["cpu_gpu_shape_verifier_test.cc"], deps = [ ":cpu_gpu_shape_verifier", - ":hlo_parser", ":hlo_verifier", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", "//xla/tsl/lib/core:status_test_util", @@ -5605,7 +5605,6 @@ xla_cc_test( deps = [ ":algebraic_simplifier", ":computation_layout", - ":hlo_parser", ":layout_assignment", ":logical_buffer", ":pattern_matcher", @@ -5619,6 +5618,7 @@ xla_cc_test( "//xla:util", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", "//xla/tsl/lib/core:status_test_util", @@ -5690,7 +5690,6 @@ xla_cc_test( srcs = ["hlo_cse_test.cc"], deps = [ ":hlo_cse", - ":hlo_parser", ":pattern_matcher", ":pattern_matcher_gmock", "//xla:literal", @@ -5698,6 +5697,7 @@ xla_cc_test( "//xla:util", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_matchers", "//xla/tests:hlo_test_base", "//xla/tests:literal_test_util", @@ -5736,7 +5736,6 @@ xla_cc_test( srcs = ["hlo_constant_folding_test.cc"], deps = [ ":hlo_constant_folding", - ":hlo_parser", ":pattern_matcher", ":pattern_matcher_gmock", "//xla:literal", @@ -5746,6 +5745,7 @@ xla_cc_test( "//xla:test", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_matchers", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", @@ -5819,11 +5819,11 @@ xla_cc_test( ":hlo_domain_isolator", ":hlo_domain_remover", ":hlo_domain_verifier", - ":hlo_parser", ":sharding_propagation", "//xla:debug_options_flags", "//xla:test", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", "//xla/tsl/lib/core:status_test_util", @@ -5873,11 +5873,11 @@ xla_cc_test( srcs = ["conditional_canonicalizer_test.cc"], deps = [ ":conditional_canonicalizer", - ":hlo_parser", "//xla:shape_util", "//xla:types", "//xla:util", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_matchers", "//xla/tests:hlo_test_base", "//xla/tests:literal_test_util", @@ -5971,7 +5971,6 @@ xla_test( deps = [ ":elemental_ir_emitter", ":hlo_module_config", - ":hlo_parser", "//xla:error_spec", "//xla:execution_options_util", "//xla:literal", @@ -5979,6 +5978,7 @@ xla_test( "//xla:status_macros", "//xla:test", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/service/llvm_ir:ir_array", "//xla/tests:client_library_test_base", "//xla/tests:hlo_test_base", @@ -6239,12 +6239,12 @@ cc_library( deps = [ ":computation_placer", ":executable", - ":hlo_parser", "//xla:status_macros", "//xla:types", "//xla:util", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/types:span", ], @@ -6260,7 +6260,6 @@ cc_library( ":computation_placer", ":executable", ":hlo_module_util", - ":hlo_parser", ":hlo_runner_interface", ":transfer_manager", "//xla:shape_util", @@ -6270,6 +6269,7 @@ cc_library( "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", "//xla/hlo/ir:hlo_module_group", + "//xla/hlo/parser:hlo_parser", "//xla/stream_executor", "//xla/stream_executor:stream_executor_memory_allocator", "@com_google_absl//absl/status:statusor", @@ -6339,11 +6339,11 @@ xla_cc_test( name = "sort_simplifier_test", srcs = ["sort_simplifier_test.cc"], deps = [ - ":hlo_parser", ":pattern_matcher", ":pattern_matcher_gmock", ":sort_simplifier", "//xla:test", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_matchers", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", @@ -6369,11 +6369,11 @@ xla_cc_test( srcs = ["stable_sort_expander_test.cc"], deps = [ ":algebraic_simplifier", - ":hlo_parser", ":pattern_matcher", ":pattern_matcher_gmock", ":stable_sort_expander", "//xla:test", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_matchers", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", @@ -6406,10 +6406,10 @@ xla_cc_test( srcs = ["tuple_util_test.cc"], deps = [ ":hlo_module_config", - ":hlo_parser", ":tuple_util", "//xla:shape_util", "//xla:test", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_matchers", "//xla/tests:hlo_test_base", "//xla/tests:verified_hlo_module", @@ -6883,13 +6883,13 @@ xla_cc_test( name = "while_loop_invariant_code_motion_test", srcs = ["while_loop_invariant_code_motion_test.cc"], deps = [ - ":hlo_parser", ":while_loop_invariant_code_motion", "//xla:literal_util", "//xla:shape_util", "//xla:test", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_matchers", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", @@ -6923,10 +6923,10 @@ xla_cc_test( name = "while_loop_expensive_invariant_code_motion_test", srcs = ["while_loop_expensive_invariant_code_motion_test.cc"], deps = [ - ":hlo_parser", ":while_loop_expensive_invariant_code_motion", "//xla:util", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_matchers", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", @@ -7444,7 +7444,6 @@ xla_cc_test( srcs = ["slice_sinker_test.cc"], deps = [ ":hlo_dce", - ":hlo_parser", ":pattern_matcher", ":pattern_matcher_gmock", ":slice_sinker", @@ -7452,6 +7451,7 @@ xla_cc_test( "//xla:shape_util", "//xla:types", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", "//xla/tsl/lib/core:status_test_util", @@ -7572,10 +7572,10 @@ xla_cc_test( ":collective_ops_utils", ":computation_placer", ":global_device_id", - ":hlo_parser", "//xla:shape_util", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/tests:xla_internal_test_main", "//xla/tsl/lib/core:status_test_util", "@com_google_absl//absl/algorithm:container", @@ -8010,9 +8010,9 @@ xla_cc_test( name = "scatter_simplifier_test", srcs = ["scatter_simplifier_test.cc"], deps = [ - ":hlo_parser", ":scatter_simplifier", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/pass:hlo_pass", "//xla/hlo/pass:hlo_pass_pipeline", "//xla/tests:hlo_test_base", @@ -8184,9 +8184,9 @@ xla_cc_test( name = "stochastic_convert_decomposer_test", srcs = ["stochastic_convert_decomposer_test.cc"], deps = [ - ":hlo_parser", ":stochastic_convert_decomposer", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/utils:hlo_matchers", "//xla/tests:hlo_test_base", "@tsl//tsl/platform:test_main", diff --git a/xla/service/algebraic_simplifier_test.cc b/xla/service/algebraic_simplifier_test.cc index 430f445d7fa8c2..d34deffadbfa6b 100644 --- a/xla/service/algebraic_simplifier_test.cc +++ b/xla/service/algebraic_simplifier_test.cc @@ -42,13 +42,13 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_instructions.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/pass/hlo_pass_fix.h" #include "xla/layout_util.h" #include "xla/literal.h" #include "xla/literal_util.h" #include "xla/primitive_util.h" #include "xla/service/hlo_creation_utils.h" -#include "xla/service/hlo_parser.h" #include "xla/service/host_memory_offload_annotations.h" #include "xla/service/layout_assignment.h" #include "xla/service/pattern_matcher.h" diff --git a/xla/service/all_gather_decomposer_test.cc b/xla/service/all_gather_decomposer_test.cc index 214134648a7ea4..b857ce032959fc 100644 --- a/xla/service/all_gather_decomposer_test.cc +++ b/xla/service/all_gather_decomposer_test.cc @@ -23,8 +23,8 @@ 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/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_matchers.h" -#include "xla/service/hlo_parser.h" #include "xla/tests/hlo_test_base.h" #include "tsl/platform/statusor.h" diff --git a/xla/service/all_reduce_simplifier_test.cc b/xla/service/all_reduce_simplifier_test.cc index 5b07e61447ce3c..322c5c2ee0f8ea 100644 --- a/xla/service/all_reduce_simplifier_test.cc +++ b/xla/service/all_reduce_simplifier_test.cc @@ -20,8 +20,8 @@ limitations under the License. #include "xla/hlo/ir/hlo_computation.h" #include "xla/hlo/ir/hlo_instruction.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/hlo_module_config.h" -#include "xla/service/hlo_parser.h" #include "xla/service/pattern_matcher.h" #include "xla/service/pattern_matcher_gmock.h" #include "xla/test.h" diff --git a/xla/service/batchnorm_expander_test.cc b/xla/service/batchnorm_expander_test.cc index 9f497942b55bcf..25cfa87004be01 100644 --- a/xla/service/batchnorm_expander_test.cc +++ b/xla/service/batchnorm_expander_test.cc @@ -22,7 +22,7 @@ limitations under the License. #include "xla/hlo/ir/hlo_computation.h" #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_opcode.h" -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/shape.h" #include "xla/shape_util.h" #include "xla/test.h" diff --git a/xla/service/buffer_assignment_test.cc b/xla/service/buffer_assignment_test.cc index 353c4c6bac1c19..75a1ef3cb90153 100644 --- a/xla/service/buffer_assignment_test.cc +++ b/xla/service/buffer_assignment_test.cc @@ -36,6 +36,7 @@ limitations under the License. #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" #include "xla/hlo/ir/hlo_schedule.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/literal.h" #include "xla/literal_util.h" #include "xla/service/buffer_value.h" @@ -47,7 +48,6 @@ limitations under the License. #include "xla/service/hlo_buffer.h" #include "xla/service/hlo_memory_scheduler.h" #include "xla/service/hlo_ordering.h" -#include "xla/service/hlo_parser.h" #include "xla/service/hlo_value.h" #include "xla/service/logical_buffer.h" #include "xla/service/memory_space_assignment/memory_space_assignment.h" diff --git a/xla/service/call_inliner_test.cc b/xla/service/call_inliner_test.cc index ad6ee73eb14e8a..77b13be5e8ba87 100644 --- a/xla/service/call_inliner_test.cc +++ b/xla/service/call_inliner_test.cc @@ -23,10 +23,10 @@ limitations under the License. #include "absl/strings/string_view.h" #include "xla/hlo/ir/hlo_computation.h" #include "xla/hlo/ir/hlo_instruction.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_matchers.h" #include "xla/literal.h" #include "xla/literal_util.h" -#include "xla/service/hlo_parser.h" #include "xla/shape.h" #include "xla/shape_util.h" #include "xla/test.h" diff --git a/xla/service/collective_ops_utils_test.cc b/xla/service/collective_ops_utils_test.cc index eaa2941b47ea4f..6ec2cf7bb742cc 100644 --- a/xla/service/collective_ops_utils_test.cc +++ b/xla/service/collective_ops_utils_test.cc @@ -28,9 +28,9 @@ limitations under the License. #include "absl/strings/string_view.h" #include "xla/hlo/ir/hlo_computation.h" #include "xla/hlo/ir/hlo_instruction.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/computation_placer.h" #include "xla/service/global_device_id.h" -#include "xla/service/hlo_parser.h" #include "xla/shape_util.h" #include "xla/tsl/lib/core/status_test_util.h" #include "xla/xla_data.pb.h" diff --git a/xla/service/collective_permute_decomposer_test.cc b/xla/service/collective_permute_decomposer_test.cc index eac5ab0707418a..9426ad01b7094f 100644 --- a/xla/service/collective_permute_decomposer_test.cc +++ b/xla/service/collective_permute_decomposer_test.cc @@ -22,11 +22,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/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_matchers.h" #include "xla/hlo/utils/hlo_query.h" #include "xla/service/collective_ops_utils.h" #include "xla/service/gpu/backend_configs.pb.h" -#include "xla/service/hlo_parser.h" #include "xla/tests/hlo_test_base.h" namespace xla { diff --git a/xla/service/collective_pipeliner.cc b/xla/service/collective_pipeliner.cc index 8b04e10f492868..c5ec5b56501002 100644 --- a/xla/service/collective_pipeliner.cc +++ b/xla/service/collective_pipeliner.cc @@ -48,6 +48,7 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction_utils.h" #include "xla/hlo/ir/hlo_instructions.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_query.h" #include "xla/literal.h" #include "xla/literal_util.h" @@ -57,7 +58,6 @@ limitations under the License. #include "xla/service/collective_ops_utils.h" #include "xla/service/constant_value.h" #include "xla/service/hlo_dce.h" -#include "xla/service/hlo_parser.h" #include "xla/service/tuple_points_to_analysis.h" #include "xla/service/value_range.h" #include "xla/shape.h" diff --git a/xla/service/collective_pipeliner_test.cc b/xla/service/collective_pipeliner_test.cc index 9b3f9c9a54233a..7a660342281ca6 100644 --- a/xla/service/collective_pipeliner_test.cc +++ b/xla/service/collective_pipeliner_test.cc @@ -36,10 +36,10 @@ limitations under the License. #include "xla/hlo/ir/hlo_instructions.h" #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/pass/hlo_pass_pipeline.h" #include "xla/hlo/utils/hlo_matchers.h" #include "xla/service/hlo_module_config.h" -#include "xla/service/hlo_parser.h" #include "xla/service/hlo_verifier.h" #include "xla/service/host_memory_offload_annotations.h" #include "xla/test_helpers.h" diff --git a/xla/service/conditional_canonicalizer_test.cc b/xla/service/conditional_canonicalizer_test.cc index beba61a5a67832..b499e01bd7d868 100644 --- a/xla/service/conditional_canonicalizer_test.cc +++ b/xla/service/conditional_canonicalizer_test.cc @@ -19,8 +19,8 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_matchers.h" -#include "xla/service/hlo_parser.h" #include "xla/shape_util.h" #include "xla/tests/hlo_test_base.h" #include "xla/tests/literal_test_util.h" diff --git a/xla/service/copy_insertion_test.cc b/xla/service/copy_insertion_test.cc index 5250e9842895df..8225064c41f3c9 100644 --- a/xla/service/copy_insertion_test.cc +++ b/xla/service/copy_insertion_test.cc @@ -30,12 +30,12 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_matchers.h" #include "xla/layout.h" #include "xla/layout_util.h" #include "xla/literal_util.h" #include "xla/service/hlo_module_config.h" -#include "xla/service/hlo_parser.h" #include "xla/shape.h" #include "xla/shape_util.h" #include "xla/test.h" diff --git a/xla/service/cpu/BUILD b/xla/service/cpu/BUILD index d3420cf0491b3a..88446626c411d5 100644 --- a/xla/service/cpu/BUILD +++ b/xla/service/cpu/BUILD @@ -685,10 +685,10 @@ xla_cc_test( ":ir_function", ":target_machine_features_fake", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/service:buffer_assignment", "//xla/service:hlo_module_config", "//xla/service:hlo_ordering", - "//xla/service:hlo_parser", "//xla/service:logical_buffer", "//xla/tests:hlo_test_base", "@llvm-project//llvm:Core", @@ -710,10 +710,10 @@ xla_cc_test( "//xla:shape_util", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/service:buffer_assignment", "//xla/service:hlo_module_config", "//xla/service:hlo_ordering", - "//xla/service:hlo_parser", "//xla/service:logical_buffer", "//xla/service/llvm_ir:ir_array", "//xla/service/llvm_ir:llvm_util", @@ -1041,10 +1041,10 @@ cc_library( "//xla:types", "//xla:util", "//xla:xla_data_proto_cc", + "//xla/hlo/parser:hlo_parser", "//xla/service:collective_ops_utils", "//xla/service:computation_placer", "//xla/service:global_device_id", - "//xla/service:hlo_parser", "//xla/stream_executor", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/base:core_headers", diff --git a/xla/service/cpu/benchmarks/BUILD b/xla/service/cpu/benchmarks/BUILD index 657eddc8b1adee..a325a46f98942c 100644 --- a/xla/service/cpu/benchmarks/BUILD +++ b/xla/service/cpu/benchmarks/BUILD @@ -23,11 +23,11 @@ cc_library( "//xla:literal", "//xla/client:xla_computation", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/pjrt:pjrt_client", "//xla/pjrt:pjrt_executable", "//xla/pjrt/cpu:cpu_client", "//xla/service:hlo_module_config", - "//xla/service:hlo_parser", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:span", diff --git a/xla/service/cpu/benchmarks/hlo_benchmark_runner.cc b/xla/service/cpu/benchmarks/hlo_benchmark_runner.cc index ed6aac57504c41..e2548ba6e4240e 100644 --- a/xla/service/cpu/benchmarks/hlo_benchmark_runner.cc +++ b/xla/service/cpu/benchmarks/hlo_benchmark_runner.cc @@ -24,12 +24,12 @@ limitations under the License. #include "absl/types/span.h" #include "xla/client/xla_computation.h" #include "xla/hlo/ir/hlo_module.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/literal.h" #include "xla/pjrt/cpu/cpu_client.h" #include "xla/pjrt/pjrt_client.h" #include "xla/pjrt/pjrt_executable.h" #include "xla/service/hlo_module_config.h" -#include "xla/service/hlo_parser.h" #include "tsl/platform/errors.h" #include "tsl/platform/statusor.h" #include "tsl/platform/test_benchmark.h" diff --git a/xla/service/cpu/cpu_runtime.cc b/xla/service/cpu/cpu_runtime.cc index d4f9119043a610..db8660c811eec4 100644 --- a/xla/service/cpu/cpu_runtime.cc +++ b/xla/service/cpu/cpu_runtime.cc @@ -39,6 +39,7 @@ limitations under the License. #include "absl/time/time.h" #include "absl/types/span.h" #include "xla/executable_run_options.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/layout_util.h" #include "xla/service/collective_ops_utils.h" #include "xla/service/computation_placer.h" @@ -47,7 +48,6 @@ limitations under the License. #include "xla/service/cpu/in_process_collectives.h" #include "xla/service/cpu/xfeed_manager.h" #include "xla/service/global_device_id.h" -#include "xla/service/hlo_parser.h" #include "xla/shape_util.h" #include "xla/stream_executor/device_memory.h" #include "xla/stream_executor/stream_executor.h" diff --git a/xla/service/cpu/ir_emitter2_test.cc b/xla/service/cpu/ir_emitter2_test.cc index 13e9ee64880273..cbfb20e949caf8 100644 --- a/xla/service/cpu/ir_emitter2_test.cc +++ b/xla/service/cpu/ir_emitter2_test.cc @@ -30,12 +30,12 @@ limitations under the License. #include "llvm/IR/Type.h" #include "xla/cpu_function_runtime.h" #include "xla/hlo/ir/hlo_instruction.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/buffer_assignment.h" #include "xla/service/cpu/ir_emitter.h" #include "xla/service/cpu/target_machine_features_fake.h" #include "xla/service/hlo_module_config.h" #include "xla/service/hlo_ordering.h" -#include "xla/service/hlo_parser.h" #include "xla/service/llvm_ir/ir_array.h" #include "xla/service/llvm_ir/llvm_util.h" #include "xla/service/logical_buffer.h" diff --git a/xla/service/cpu/ir_emitter_test.cc b/xla/service/cpu/ir_emitter_test.cc index 7102d20421df4b..dc4df4438ff8aa 100644 --- a/xla/service/cpu/ir_emitter_test.cc +++ b/xla/service/cpu/ir_emitter_test.cc @@ -29,12 +29,12 @@ limitations under the License. #include "llvm/IR/LLVMContext.h" #include "llvm/Support/Casting.h" #include "xla/hlo/ir/hlo_instruction.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/buffer_assignment.h" #include "xla/service/cpu/ir_function.h" #include "xla/service/cpu/target_machine_features_fake.h" #include "xla/service/hlo_module_config.h" #include "xla/service/hlo_ordering.h" -#include "xla/service/hlo_parser.h" #include "xla/service/logical_buffer.h" #include "xla/tests/hlo_test_base.h" #include "tsl/platform/statusor.h" diff --git a/xla/service/cpu_gpu_shape_verifier_test.cc b/xla/service/cpu_gpu_shape_verifier_test.cc index 56096e9703fb7e..7f3947fbb45960 100644 --- a/xla/service/cpu_gpu_shape_verifier_test.cc +++ b/xla/service/cpu_gpu_shape_verifier_test.cc @@ -20,7 +20,7 @@ limitations under the License. #include #include -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/hlo_verifier.h" #include "xla/tests/hlo_test_base.h" #include "xla/tsl/lib/core/status_test_util.h" diff --git a/xla/service/dot_dimension_merger_test.cc b/xla/service/dot_dimension_merger_test.cc index a41b904f5259a9..14c0927cae0f88 100644 --- a/xla/service/dot_dimension_merger_test.cc +++ b/xla/service/dot_dimension_merger_test.cc @@ -19,7 +19,7 @@ limitations under the License. #include #include -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/tests/hlo_test_base.h" #include "tsl/platform/statusor.h" diff --git a/xla/service/dump_test.cc b/xla/service/dump_test.cc index 6df547d96fdfce..384167e7c45ef2 100644 --- a/xla/service/dump_test.cc +++ b/xla/service/dump_test.cc @@ -20,8 +20,8 @@ limitations under the License. #include #include "absl/strings/match.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/hlo_module_config.h" -#include "xla/service/hlo_parser.h" #include "xla/tsl/lib/core/status_test_util.h" #include "xla/xla.pb.h" #include "tsl/platform/env.h" diff --git a/xla/service/dynamic_dimension_simplifier_test.cc b/xla/service/dynamic_dimension_simplifier_test.cc index 3b71fc4bf128ad..9d438b3156c855 100644 --- a/xla/service/dynamic_dimension_simplifier_test.cc +++ b/xla/service/dynamic_dimension_simplifier_test.cc @@ -25,11 +25,11 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_instructions.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/pass/hlo_pass_pipeline.h" #include "xla/layout_util.h" #include "xla/literal.h" #include "xla/service/hlo_creation_utils.h" -#include "xla/service/hlo_parser.h" #include "xla/service/pattern_matcher.h" #include "xla/service/pattern_matcher_gmock.h" #include "xla/service/shape_inference.h" diff --git a/xla/service/dynamic_padder_test.cc b/xla/service/dynamic_padder_test.cc index 972bc38ae8c40b..244caee8f39925 100644 --- a/xla/service/dynamic_padder_test.cc +++ b/xla/service/dynamic_padder_test.cc @@ -32,6 +32,7 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_matchers.h" #include "xla/literal.h" #include "xla/literal_util.h" @@ -39,7 +40,6 @@ limitations under the License. #include "xla/service/dynamic_dimension_inference.h" #include "xla/service/dynamic_dimension_simplifier.h" #include "xla/service/hlo_dce.h" -#include "xla/service/hlo_parser.h" #include "xla/service/pattern_matcher.h" #include "xla/service/pattern_matcher_gmock.h" #include "xla/service/tuple_simplifier.h" diff --git a/xla/service/dynamic_update_slice_test.cc b/xla/service/dynamic_update_slice_test.cc index eb8932a9478094..96298fb6437ffd 100644 --- a/xla/service/dynamic_update_slice_test.cc +++ b/xla/service/dynamic_update_slice_test.cc @@ -14,7 +14,7 @@ limitations under the License. ==============================================================================*/ #include "xla/execution_options_util.h" -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/status_macros.h" #include "xla/test.h" #include "xla/tests/client_library_test_base.h" diff --git a/xla/service/fusion_node_indexing_evaluation_test.cc b/xla/service/fusion_node_indexing_evaluation_test.cc index 5c3790e60c41ea..8becc665ecde1e 100644 --- a/xla/service/fusion_node_indexing_evaluation_test.cc +++ b/xla/service/fusion_node_indexing_evaluation_test.cc @@ -18,7 +18,7 @@ limitations under the License. #include "absl/container/flat_hash_map.h" #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_opcode.h" -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/instruction_fusion.h" #include "xla/tests/hlo_test_base.h" #include "tsl/platform/test.h" diff --git a/xla/service/gpu/BUILD b/xla/service/gpu/BUILD index c96c5955da8e8e..dccd67565cba26 100644 --- a/xla/service/gpu/BUILD +++ b/xla/service/gpu/BUILD @@ -724,7 +724,7 @@ xla_cc_test( deps = [ ":reduction_utils", "//xla/hlo/ir:hlo", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", # fixdeps: keep "@com_google_absl//absl/strings", @@ -977,7 +977,7 @@ xla_cc_test( "//xla:shape_util", "//xla:test", "//xla/hlo/ir:hlo", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", # build_cleaner: keep "@com_google_absl//absl/strings", @@ -1112,7 +1112,7 @@ xla_cc_test( ":gpu_device_info_for_tests", "//xla:test", "//xla/hlo/ir:hlo", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/service:pattern_matcher", "//xla/service:pattern_matcher_gmock", "//xla/tests:hlo_test_base", @@ -1149,7 +1149,7 @@ xla_cc_test( "//xla:test", "//xla:util", "//xla/hlo/ir:hlo", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/stream_executor:device_description", "//xla/tests:hlo_test_base", "//xla/tests:verified_hlo_module", @@ -2154,10 +2154,10 @@ cc_library( deps = [ "//xla:util", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/pass:hlo_pass_pipeline", "//xla/service:collective_ops_utils", "//xla/service:collective_pipeliner", - "//xla/service:hlo_parser", "@com_google_absl//absl/log:check", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", @@ -2173,9 +2173,9 @@ xla_cc_test( ":gpu_p2p_pipeliner", "//xla:util", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/pass:hlo_pass_pipeline", "//xla/service:hlo_module_config", - "//xla/service:hlo_parser", "//xla/service:hlo_verifier", "//xla/tests:filecheck", "//xla/tests:hlo_test_base", @@ -2230,10 +2230,10 @@ xla_cc_test( "//xla:util", "//xla/client:executable_build_options", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/pass:hlo_pass_pipeline", "//xla/service:algebraic_simplifier", "//xla/service:hlo_module_config", - "//xla/service:hlo_parser", "//xla/stream_executor:device_description", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", @@ -2517,7 +2517,7 @@ xla_cc_test( deps = [ ":gpu_fusible", "//xla/hlo/ir:hlo", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", "@com_google_absl//absl/strings", @@ -2717,7 +2717,7 @@ xla_cc_test( ], deps = [ ":hlo_fusion_stats", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", "//xla/tsl/lib/core:status_test_util", diff --git a/xla/service/gpu/cudnn_support_utils_test.cc b/xla/service/gpu/cudnn_support_utils_test.cc index 0cc170fb1a32f9..48ca7ef87579d3 100644 --- a/xla/service/gpu/cudnn_support_utils_test.cc +++ b/xla/service/gpu/cudnn_support_utils_test.cc @@ -29,7 +29,7 @@ limitations under the License. #include "xla/hlo/ir/hlo_casting_utils.h" #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_instructions.h" -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/shape.h" #include "xla/shape_util.h" #include "xla/stream_executor/device_description.h" diff --git a/xla/service/gpu/fusion_process_dump_test.cc b/xla/service/gpu/fusion_process_dump_test.cc index 37eb3bee29c836..fcaa298b4489db 100644 --- a/xla/service/gpu/fusion_process_dump_test.cc +++ b/xla/service/gpu/fusion_process_dump_test.cc @@ -20,9 +20,9 @@ limitations under the License. #include #include "absl/strings/string_view.h" #include "xla/hlo/ir/hlo_instruction.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/gpu/fusion_process_dump.pb.h" #include "xla/service/gpu/gpu_device_info_for_tests.h" -#include "xla/service/hlo_parser.h" #include "xla/service/pattern_matcher.h" #include "xla/service/pattern_matcher_gmock.h" #include "xla/test.h" diff --git a/xla/service/gpu/fusions/mlir/BUILD b/xla/service/gpu/fusions/mlir/BUILD index 29764a403dbd97..38d095e06796fc 100644 --- a/xla/service/gpu/fusions/mlir/BUILD +++ b/xla/service/gpu/fusions/mlir/BUILD @@ -118,8 +118,8 @@ xla_cc_test( ":elemental_hlo_to_mlir", "//xla:status_macros", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/mlir_hlo", - "//xla/service:hlo_parser", "//xla/service/gpu:launch_dimensions", "//xla/service/gpu/fusions/ir:xla_gpu", "//xla/service/gpu/model:indexing_analysis", diff --git a/xla/service/gpu/fusions/mlir/elemental_hlo_to_mlir_test.cc b/xla/service/gpu/fusions/mlir/elemental_hlo_to_mlir_test.cc index 522d2653153292..fff26b55878065 100644 --- a/xla/service/gpu/fusions/mlir/elemental_hlo_to_mlir_test.cc +++ b/xla/service/gpu/fusions/mlir/elemental_hlo_to_mlir_test.cc @@ -37,11 +37,11 @@ limitations under the License. #include "mlir/Pass/PassManager.h" #include "mlir/Transforms/Passes.h" #include "xla/hlo/ir/hlo_computation.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/mlir_hlo/mhlo/IR/hlo_ops.h" #include "xla/service/gpu/fusions/ir/xla_gpu_ops.h" #include "xla/service/gpu/fusions/mlir/computation_partitioner.h" #include "xla/service/gpu/model/indexing_map.h" -#include "xla/service/hlo_parser.h" #include "xla/service/llvm_ir/llvm_util.h" #include "xla/status_macros.h" #include "xla/tests/filecheck.h" diff --git a/xla/service/gpu/gpu_fusible_test.cc b/xla/service/gpu/gpu_fusible_test.cc index b86071a3484fbe..51af8693af2f30 100644 --- a/xla/service/gpu/gpu_fusible_test.cc +++ b/xla/service/gpu/gpu_fusible_test.cc @@ -22,7 +22,7 @@ limitations under the License. #include "absl/strings/str_cat.h" #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_opcode.h" -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/tests/hlo_test_base.h" #include "tsl/platform/statusor.h" diff --git a/xla/service/gpu/gpu_p2p_pipeliner.cc b/xla/service/gpu/gpu_p2p_pipeliner.cc index d097d1b6382517..9920fc93dacf33 100644 --- a/xla/service/gpu/gpu_p2p_pipeliner.cc +++ b/xla/service/gpu/gpu_p2p_pipeliner.cc @@ -27,10 +27,10 @@ limitations under the License. #include "absl/strings/str_join.h" #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/pass/hlo_pass_pipeline.h" #include "xla/service/collective_ops_utils.h" #include "xla/service/collective_pipeliner.h" -#include "xla/service/hlo_parser.h" #include "xla/util.h" namespace xla { diff --git a/xla/service/gpu/gpu_p2p_pipeliner_test.cc b/xla/service/gpu/gpu_p2p_pipeliner_test.cc index df46055ce0d7e5..c3e603d055f4e4 100644 --- a/xla/service/gpu/gpu_p2p_pipeliner_test.cc +++ b/xla/service/gpu/gpu_p2p_pipeliner_test.cc @@ -29,9 +29,9 @@ limitations under the License. #include "xla/hlo/ir/hlo_instructions.h" #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/pass/hlo_pass_pipeline.h" #include "xla/service/hlo_module_config.h" -#include "xla/service/hlo_parser.h" #include "xla/service/hlo_verifier.h" #include "xla/tests/filecheck.h" #include "xla/tests/hlo_test_base.h" diff --git a/xla/service/gpu/gpu_spmd_pipeline_test.cc b/xla/service/gpu/gpu_spmd_pipeline_test.cc index c0a7d68ebc3af5..aed59fd6d8ace2 100644 --- a/xla/service/gpu/gpu_spmd_pipeline_test.cc +++ b/xla/service/gpu/gpu_spmd_pipeline_test.cc @@ -25,10 +25,10 @@ limitations under the License. #include "absl/log/log.h" #include "xla/client/executable_build_options.h" #include "xla/hlo/ir/hlo_instruction.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/pass/hlo_pass_pipeline.h" #include "xla/service/algebraic_simplifier.h" #include "xla/service/hlo_module_config.h" -#include "xla/service/hlo_parser.h" #include "xla/shape_util.h" #include "xla/stream_executor/device_description.h" #include "xla/tests/hlo_test_base.h" diff --git a/xla/service/gpu/hlo_fusion_stats_test.cc b/xla/service/gpu/hlo_fusion_stats_test.cc index c2d33da7fcf408..abc10887f3f8e7 100644 --- a/xla/service/gpu/hlo_fusion_stats_test.cc +++ b/xla/service/gpu/hlo_fusion_stats_test.cc @@ -19,7 +19,7 @@ limitations under the License. #include #include "absl/strings/match.h" -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/tests/hlo_test_base.h" #include "xla/tsl/lib/core/status_test_util.h" diff --git a/xla/service/gpu/matmul_utils_test.cc b/xla/service/gpu/matmul_utils_test.cc index c3ccdb517438b7..01f95a8d7d0ce5 100644 --- a/xla/service/gpu/matmul_utils_test.cc +++ b/xla/service/gpu/matmul_utils_test.cc @@ -21,7 +21,7 @@ limitations under the License. #include "absl/strings/string_view.h" #include "xla/hlo/ir/hlo_module.h" -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/shape.h" #include "xla/test.h" #include "xla/tests/hlo_test_base.h" diff --git a/xla/service/gpu/model/BUILD b/xla/service/gpu/model/BUILD index 12258a56542c0d..cb32d19e42d9b7 100644 --- a/xla/service/gpu/model/BUILD +++ b/xla/service/gpu/model/BUILD @@ -86,7 +86,7 @@ xla_cc_test( srcs = ["fusion_analysis_cache_test.cc"], deps = [ ":fusion_analysis_cache", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/service/gpu:gpu_device_info_for_tests", "//xla/service/gpu:hlo_fusion_analysis", "//xla/stream_executor:device_description", diff --git a/xla/service/gpu/model/fusion_analysis_cache_test.cc b/xla/service/gpu/model/fusion_analysis_cache_test.cc index 1750c38c3c41ae..820d9925ab3193 100644 --- a/xla/service/gpu/model/fusion_analysis_cache_test.cc +++ b/xla/service/gpu/model/fusion_analysis_cache_test.cc @@ -18,9 +18,9 @@ limitations under the License. #include #include #include "absl/strings/string_view.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/gpu/gpu_device_info_for_tests.h" #include "xla/service/gpu/hlo_fusion_analysis.h" -#include "xla/service/hlo_parser.h" #include "xla/stream_executor/device_description.h" #include "xla/tests/hlo_test_base.h" #include "tsl/platform/statusor.h" diff --git a/xla/service/gpu/reduction_utils_test.cc b/xla/service/gpu/reduction_utils_test.cc index 11868007c4631e..4a7db5677f79ef 100644 --- a/xla/service/gpu/reduction_utils_test.cc +++ b/xla/service/gpu/reduction_utils_test.cc @@ -19,7 +19,7 @@ limitations under the License. #include #include "absl/strings/str_cat.h" #include "xla/hlo/ir/hlo_instruction.h" -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/tests/hlo_test_base.h" namespace xla { diff --git a/xla/service/gpu/runtime/BUILD b/xla/service/gpu/runtime/BUILD index 9d7200485f3005..a66144e363daae 100644 --- a/xla/service/gpu/runtime/BUILD +++ b/xla/service/gpu/runtime/BUILD @@ -948,8 +948,8 @@ cc_library( "//xla:status_macros", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/service:collective_ops_utils", - "//xla/service:hlo_parser", "//xla/stream_executor:stream_executor_h", "@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/container:flat_hash_map", diff --git a/xla/service/gpu/runtime/nccl_p2p_thunk_common.cc b/xla/service/gpu/runtime/nccl_p2p_thunk_common.cc index 6da04e4370c6f4..494fde4a32850a 100644 --- a/xla/service/gpu/runtime/nccl_p2p_thunk_common.cc +++ b/xla/service/gpu/runtime/nccl_p2p_thunk_common.cc @@ -28,9 +28,9 @@ limitations under the License. #include "mlir/IR/BuiltinAttributes.h" #include "xla/executable_run_options.h" #include "xla/hlo/ir/hlo_instructions.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/collective_ops_utils.h" #include "xla/service/gpu/runtime/nccl_clique_key.h" -#include "xla/service/hlo_parser.h" #include "xla/shape.h" #include "xla/status_macros.h" #include "xla/stream_executor/stream_executor.h" diff --git a/xla/service/gpu/tests/BUILD b/xla/service/gpu/tests/BUILD index f0eb7f9481a148..1554c098bc89c1 100644 --- a/xla/service/gpu/tests/BUILD +++ b/xla/service/gpu/tests/BUILD @@ -224,7 +224,7 @@ xla_test( deps = [ ":gpu_codegen_test", "//xla:error_spec", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/stream_executor:device_description", "@com_google_absl//absl/strings", "@tsl//tsl/platform:statusor", diff --git a/xla/service/gpu/tests/reduction_vectorization_test.cc b/xla/service/gpu/tests/reduction_vectorization_test.cc index 680391c2fa7db6..2bd823cd787d7d 100644 --- a/xla/service/gpu/tests/reduction_vectorization_test.cc +++ b/xla/service/gpu/tests/reduction_vectorization_test.cc @@ -19,8 +19,8 @@ limitations under the License. #include "absl/strings/str_replace.h" #include "xla/error_spec.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/gpu/tests/gpu_codegen_test.h" -#include "xla/service/hlo_parser.h" #include "xla/stream_executor/device_description.h" #include "tsl/platform/statusor.h" #include "tsl/platform/test.h" diff --git a/xla/service/gpu/transforms/BUILD b/xla/service/gpu/transforms/BUILD index 22a97478a4f70e..24f3db4b192cc9 100644 --- a/xla/service/gpu/transforms/BUILD +++ b/xla/service/gpu/transforms/BUILD @@ -346,10 +346,10 @@ cc_library( "//xla:util", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/pass:hlo_pass", "//xla/hlo/utils:hlo_query", "//xla/service:collective_ops_utils", - "//xla/service:hlo_parser", "//xla/service/gpu:backend_configs_cc", "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/log:check", @@ -367,7 +367,7 @@ xla_cc_test( deps = [ ":collective_permute_cycle_decomposer", "//xla/hlo/ir:hlo", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/tests:filecheck", "//xla/tests:hlo_test_base", "//xla/tests:test_utils", @@ -483,7 +483,7 @@ xla_test( deps = [ ":command_buffer_scheduling", "//xla/hlo/ir:hlo", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/service/gpu:gpu_device_info_for_tests", "//xla/service/gpu:gpu_executable", "//xla/stream_executor:device_description", @@ -878,12 +878,12 @@ xla_test( "//xla:util", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/service:algebraic_simplifier", "//xla/service:computation_layout", "//xla/service:hlo_cse", "//xla/service:hlo_dce", "//xla/service:hlo_module_config", - "//xla/service:hlo_parser", "//xla/service:hlo_verifier", "//xla/service:layout_normalization", "//xla/service:pattern_matcher", @@ -1057,7 +1057,7 @@ xla_cc_test( srcs = ["cudnn_pad_for_convolutions_test.cc"], deps = [ ":cudnn_pad_for_convolutions", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/service:pattern_matcher", "//xla/service:pattern_matcher_gmock", "//xla/service/gpu:cublas_cudnn", @@ -1161,8 +1161,8 @@ xla_cc_test( deps = [ ":cudnn_vectorize_convolutions", "//xla:util", + "//xla/hlo/parser:hlo_parser", "//xla/service:call_inliner", - "//xla/service:hlo_parser", "//xla/service:pattern_matcher", "//xla/service:pattern_matcher_gmock", "//xla/service/gpu:backend_configs_cc", @@ -1377,11 +1377,11 @@ cc_library( "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", "//xla/hlo/ir:hlo_instruction_utils", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/pass:hlo_pass", "//xla/hlo/utils:hlo_query", "//xla/service:collective_ops_utils", "//xla/service:flatten_call_graph", - "//xla/service:hlo_parser", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/container:flat_hash_map", "@com_google_absl//absl/container:flat_hash_set", @@ -1885,10 +1885,10 @@ xla_test( "//xla:shape_util", "//xla:test", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/pass:hlo_pass", "//xla/hlo/pass:hlo_pass_pipeline", "//xla/service:hlo_dce", - "//xla/service:hlo_parser", "//xla/service:pattern_matcher", "//xla/service:pattern_matcher_gmock", "//xla/service/gpu:gpu_device_info_for_tests", @@ -1993,8 +1993,8 @@ xla_cc_test( "//xla:shape_util", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/service:computation_layout", - "//xla/service:hlo_parser", "//xla/service:pattern_matcher", "//xla/service:pattern_matcher_gmock", "//xla/service/gpu:stream_executor_util", @@ -2444,7 +2444,7 @@ xla_cc_test( "//xla:shape_util", "//xla:test", "//xla/hlo/ir:hlo", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/service:pattern_matcher", "//xla/service:pattern_matcher_gmock", "//xla/tests:hlo_test_base", @@ -2588,7 +2588,7 @@ xla_cc_test( ":schedule_postprocessing", "//xla:util", "//xla/hlo/ir:hlo", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/service/gpu:backend_configs_cc", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", @@ -3096,7 +3096,7 @@ xla_cc_test( "//xla:util", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/service:pattern_matcher", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", diff --git a/xla/service/gpu/transforms/collective_permute_cycle_decomposer.cc b/xla/service/gpu/transforms/collective_permute_cycle_decomposer.cc index 4bd671f0e1ac96..a8462e252d0866 100644 --- a/xla/service/gpu/transforms/collective_permute_cycle_decomposer.cc +++ b/xla/service/gpu/transforms/collective_permute_cycle_decomposer.cc @@ -32,11 +32,11 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_instructions.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_query.h" #include "xla/literal_util.h" #include "xla/service/collective_ops_utils.h" #include "xla/service/gpu/backend_configs.pb.h" -#include "xla/service/hlo_parser.h" #include "xla/shape.h" #include "xla/shape_util.h" #include "xla/util.h" diff --git a/xla/service/gpu/transforms/collective_permute_cycle_decomposer_test.cc b/xla/service/gpu/transforms/collective_permute_cycle_decomposer_test.cc index 98f53fd5be7070..544015b4f637ee 100644 --- a/xla/service/gpu/transforms/collective_permute_cycle_decomposer_test.cc +++ b/xla/service/gpu/transforms/collective_permute_cycle_decomposer_test.cc @@ -25,7 +25,7 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_instructions.h" #include "xla/hlo/ir/hlo_module.h" -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/tests/filecheck.h" #include "xla/tests/hlo_test_base.h" #include "xla/tests/test_utils.h" diff --git a/xla/service/gpu/transforms/command_buffer_scheduling_test.cc b/xla/service/gpu/transforms/command_buffer_scheduling_test.cc index 383a4f7e479f1d..9fe1dfad727583 100644 --- a/xla/service/gpu/transforms/command_buffer_scheduling_test.cc +++ b/xla/service/gpu/transforms/command_buffer_scheduling_test.cc @@ -23,9 +23,9 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_opcode.h" #include "xla/hlo/ir/hlo_schedule.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/gpu/gpu_device_info_for_tests.h" #include "xla/service/gpu/gpu_executable.h" -#include "xla/service/hlo_parser.h" #include "xla/stream_executor/device_description.h" #include "xla/tests/filecheck.h" #include "xla/tests/hlo_test_base.h" diff --git a/xla/service/gpu/transforms/cudnn_fused_mha_rewriter_test.cc b/xla/service/gpu/transforms/cudnn_fused_mha_rewriter_test.cc index a64fd0624bea62..ecfc11f5c1110d 100644 --- a/xla/service/gpu/transforms/cudnn_fused_mha_rewriter_test.cc +++ b/xla/service/gpu/transforms/cudnn_fused_mha_rewriter_test.cc @@ -26,6 +26,7 @@ limitations under the License. #include "absl/strings/string_view.h" #include "xla/error_spec.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/algebraic_simplifier.h" #include "xla/service/computation_layout.h" #include "xla/service/gpu/backend_configs.pb.h" @@ -34,7 +35,6 @@ limitations under the License. #include "xla/service/hlo_cse.h" #include "xla/service/hlo_dce.h" #include "xla/service/hlo_module_config.h" -#include "xla/service/hlo_parser.h" #include "xla/service/hlo_verifier.h" #include "xla/service/layout_normalization.h" #include "xla/service/pattern_matcher.h" diff --git a/xla/service/gpu/transforms/cudnn_pad_for_convolutions_test.cc b/xla/service/gpu/transforms/cudnn_pad_for_convolutions_test.cc index 7cee2c54f166e7..8c1cd26e228389 100644 --- a/xla/service/gpu/transforms/cudnn_pad_for_convolutions_test.cc +++ b/xla/service/gpu/transforms/cudnn_pad_for_convolutions_test.cc @@ -17,8 +17,8 @@ limitations under the License. #include #include +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/gpu/cublas_cudnn.h" -#include "xla/service/hlo_parser.h" #include "xla/service/pattern_matcher.h" #include "xla/service/pattern_matcher_gmock.h" #include "xla/tests/hlo_test_base.h" diff --git a/xla/service/gpu/transforms/cudnn_vectorize_convolutions_test.cc b/xla/service/gpu/transforms/cudnn_vectorize_convolutions_test.cc index 7528870af4c605..b955f6f0f1b325 100644 --- a/xla/service/gpu/transforms/cudnn_vectorize_convolutions_test.cc +++ b/xla/service/gpu/transforms/cudnn_vectorize_convolutions_test.cc @@ -23,10 +23,10 @@ limitations under the License. #include #include "absl/algorithm/container.h" #include "absl/status/statusor.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/call_inliner.h" #include "xla/service/gpu/backend_configs.pb.h" #include "xla/service/gpu/cublas_cudnn.h" -#include "xla/service/hlo_parser.h" #include "xla/service/pattern_matcher.h" #include "xla/service/pattern_matcher_gmock.h" #include "xla/stream_executor/device_description.h" diff --git a/xla/service/gpu/transforms/double_buffer_loop_unrolling.cc b/xla/service/gpu/transforms/double_buffer_loop_unrolling.cc index 0c25e2bf4691e4..bd72929e47abd1 100644 --- a/xla/service/gpu/transforms/double_buffer_loop_unrolling.cc +++ b/xla/service/gpu/transforms/double_buffer_loop_unrolling.cc @@ -38,10 +38,10 @@ limitations under the License. #include "xla/hlo/ir/hlo_instructions.h" #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_query.h" #include "xla/service/collective_ops_utils.h" #include "xla/service/flatten_call_graph.h" -#include "xla/service/hlo_parser.h" #include "xla/status_macros.h" #include "xla/util.h" #include "xla/xla_data.pb.h" diff --git a/xla/service/gpu/transforms/horizontal_loop_fusion_test.cc b/xla/service/gpu/transforms/horizontal_loop_fusion_test.cc index d3fb82e9d4b05f..ac0d1c74066d4a 100644 --- a/xla/service/gpu/transforms/horizontal_loop_fusion_test.cc +++ b/xla/service/gpu/transforms/horizontal_loop_fusion_test.cc @@ -26,12 +26,12 @@ limitations under the License. #include "xla/hlo/ir/hlo_computation.h" #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/pass/hlo_pass_fix.h" #include "xla/hlo/pass/hlo_pass_pipeline.h" #include "xla/service/gpu/gpu_device_info_for_tests.h" #include "xla/service/gpu/transforms/instruction_fusion.h" #include "xla/service/hlo_dce.h" -#include "xla/service/hlo_parser.h" #include "xla/service/pattern_matcher.h" #include "xla/service/pattern_matcher_gmock.h" #include "xla/shape.h" diff --git a/xla/service/gpu/transforms/layout_assignment_test.cc b/xla/service/gpu/transforms/layout_assignment_test.cc index a6b8f07e41065b..a0324839cd014c 100644 --- a/xla/service/gpu/transforms/layout_assignment_test.cc +++ b/xla/service/gpu/transforms/layout_assignment_test.cc @@ -25,11 +25,11 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/layout.h" #include "xla/layout_util.h" #include "xla/service/computation_layout.h" #include "xla/service/gpu/stream_executor_util.h" -#include "xla/service/hlo_parser.h" #include "xla/service/pattern_matcher.h" #include "xla/service/pattern_matcher_gmock.h" #include "xla/shape.h" diff --git a/xla/service/gpu/transforms/reduction_splitter_test.cc b/xla/service/gpu/transforms/reduction_splitter_test.cc index 4b9f6fb130ed0f..be773fbdb225f5 100644 --- a/xla/service/gpu/transforms/reduction_splitter_test.cc +++ b/xla/service/gpu/transforms/reduction_splitter_test.cc @@ -19,7 +19,7 @@ limitations under the License. #include #include "xla/hlo/ir/hlo_instruction.h" -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/pattern_matcher.h" #include "xla/service/pattern_matcher_gmock.h" #include "xla/shape_util.h" diff --git a/xla/service/gpu/transforms/schedule_postprocessing_test.cc b/xla/service/gpu/transforms/schedule_postprocessing_test.cc index 0c9c6e675e1fa7..01659a11f6e66d 100644 --- a/xla/service/gpu/transforms/schedule_postprocessing_test.cc +++ b/xla/service/gpu/transforms/schedule_postprocessing_test.cc @@ -22,8 +22,8 @@ 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/parser/hlo_parser.h" #include "xla/service/gpu/backend_configs.pb.h" -#include "xla/service/hlo_parser.h" #include "xla/tests/hlo_test_base.h" #include "xla/util.h" #include "tsl/platform/statusor.h" diff --git a/xla/service/gpu/transforms/variadic_op_splitter_test.cc b/xla/service/gpu/transforms/variadic_op_splitter_test.cc index 1d726136a3a8ee..7d1101091f0d87 100644 --- a/xla/service/gpu/transforms/variadic_op_splitter_test.cc +++ b/xla/service/gpu/transforms/variadic_op_splitter_test.cc @@ -21,8 +21,8 @@ limitations under the License. #include #include "xla/hlo/ir/hlo_computation.h" #include "xla/hlo/ir/hlo_instruction.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/literal_util.h" -#include "xla/service/hlo_parser.h" #include "xla/service/pattern_matcher.h" #include "xla/shape_util.h" #include "xla/tests/hlo_test_base.h" diff --git a/xla/service/heap_simulator/BUILD b/xla/service/heap_simulator/BUILD index 6cfa52a5348bbf..89e2f73e06dbf7 100644 --- a/xla/service/heap_simulator/BUILD +++ b/xla/service/heap_simulator/BUILD @@ -77,11 +77,11 @@ xla_cc_test( "//xla:shape_util", "//xla:xla_data_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/service:buffer_value", "//xla/service:hlo_alias_analysis", "//xla/service:hlo_dataflow_analysis", "//xla/service:hlo_module_config", - "//xla/service:hlo_parser", "//xla/service:hlo_value", "//xla/tests:hlo_test_base", "//xla/tests:xla_internal_test_main", diff --git a/xla/service/heap_simulator/heap_simulator_test.cc b/xla/service/heap_simulator/heap_simulator_test.cc index 8e11953de05c51..fc58a3d51d3c8a 100644 --- a/xla/service/heap_simulator/heap_simulator_test.cc +++ b/xla/service/heap_simulator/heap_simulator_test.cc @@ -34,13 +34,13 @@ limitations under the License. #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" #include "xla/hlo/ir/hlo_schedule.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/literal_util.h" #include "xla/service/buffer_value.h" #include "xla/service/heap_simulator/allocation_block.h" #include "xla/service/hlo_alias_analysis.h" #include "xla/service/hlo_dataflow_analysis.h" #include "xla/service/hlo_module_config.h" -#include "xla/service/hlo_parser.h" #include "xla/service/hlo_value.h" #include "xla/shape.h" #include "xla/shape_util.h" diff --git a/xla/service/hlo_computation_test.cc b/xla/service/hlo_computation_test.cc index 87b09dbc4ce28d..d46996dd3accd5 100644 --- a/xla/service/hlo_computation_test.cc +++ b/xla/service/hlo_computation_test.cc @@ -30,9 +30,9 @@ limitations under the License. #include "xla/hlo/ir/hlo_clone_context.h" #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_matchers.h" #include "xla/literal_util.h" -#include "xla/service/hlo_parser.h" #include "xla/service/pattern_matcher.h" #include "xla/service/pattern_matcher_gmock.h" #include "xla/shape.h" diff --git a/xla/service/hlo_constant_folding_test.cc b/xla/service/hlo_constant_folding_test.cc index 255012f734a5f1..c4f39e7b33b93e 100644 --- a/xla/service/hlo_constant_folding_test.cc +++ b/xla/service/hlo_constant_folding_test.cc @@ -24,13 +24,13 @@ limitations under the License. #include "absl/types/span.h" #include "xla/hlo/ir/hlo_computation.h" #include "xla/hlo/ir/hlo_instruction.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_matchers.h" #include "xla/layout_util.h" #include "xla/literal.h" #include "xla/literal_util.h" #include "xla/permutation_util.h" #include "xla/primitive_util.h" -#include "xla/service/hlo_parser.h" #include "xla/service/pattern_matcher.h" #include "xla/service/pattern_matcher_gmock.h" #include "xla/shape.h" diff --git a/xla/service/hlo_cost_analysis_test.cc b/xla/service/hlo_cost_analysis_test.cc index 4bac5768a2d54e..0bbb304e34233e 100644 --- a/xla/service/hlo_cost_analysis_test.cc +++ b/xla/service/hlo_cost_analysis_test.cc @@ -29,7 +29,7 @@ limitations under the License. #include "xla/client/xla_computation.h" #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_module.h" -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/local_service.h" #include "xla/service/service.h" #include "xla/shape_util.h" diff --git a/xla/service/hlo_cse_test.cc b/xla/service/hlo_cse_test.cc index f6378353b8d507..00364bbfd74c50 100644 --- a/xla/service/hlo_cse_test.cc +++ b/xla/service/hlo_cse_test.cc @@ -25,10 +25,10 @@ limitations under the License. #include "xla/hlo/ir/hlo_computation.h" #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_matchers.h" #include "xla/layout_util.h" #include "xla/literal.h" -#include "xla/service/hlo_parser.h" #include "xla/service/pattern_matcher.h" #include "xla/service/pattern_matcher_gmock.h" #include "xla/shape_util.h" diff --git a/xla/service/hlo_domain_test.cc b/xla/service/hlo_domain_test.cc index 13f80fdf6b441b..e0603cff03bd27 100644 --- a/xla/service/hlo_domain_test.cc +++ b/xla/service/hlo_domain_test.cc @@ -20,11 +20,11 @@ limitations under the License. #include "xla/debug_options_flags.h" #include "xla/hlo/ir/hlo_domain_metadata.h" #include "xla/hlo/ir/hlo_sharding_metadata.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/call_inliner.h" #include "xla/service/hlo_domain_isolator.h" #include "xla/service/hlo_domain_remover.h" #include "xla/service/hlo_domain_verifier.h" -#include "xla/service/hlo_parser.h" #include "xla/service/sharding_propagation.h" #include "xla/test.h" #include "xla/tests/hlo_test_base.h" diff --git a/xla/service/hlo_runner.cc b/xla/service/hlo_runner.cc index 35f03cf3535960..16a3e4a0ac601a 100644 --- a/xla/service/hlo_runner.cc +++ b/xla/service/hlo_runner.cc @@ -23,10 +23,10 @@ limitations under the License. #include "unsupported/Eigen/CXX11/Tensor" #include "xla/hlo/ir/hlo_module_group.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/layout_util.h" #include "xla/service/executable.h" #include "xla/service/hlo_module_util.h" -#include "xla/service/hlo_parser.h" #include "xla/service/transfer_manager.h" #include "xla/shape.h" #include "xla/shape_util.h" diff --git a/xla/service/hlo_runner_interface.cc b/xla/service/hlo_runner_interface.cc index bf0076071ad95f..f3f3303851952a 100644 --- a/xla/service/hlo_runner_interface.cc +++ b/xla/service/hlo_runner_interface.cc @@ -15,7 +15,7 @@ limitations under the License. #include "xla/service/hlo_runner_interface.h" -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" namespace xla { diff --git a/xla/service/hlo_sharding_test.cc b/xla/service/hlo_sharding_test.cc index 9dc0014208ea96..b6db61bc9d31cc 100644 --- a/xla/service/hlo_sharding_test.cc +++ b/xla/service/hlo_sharding_test.cc @@ -22,8 +22,8 @@ limitations under the License. #include #include "absl/hash/hash.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/protobuf_util.h" -#include "xla/service/hlo_parser.h" #include "xla/shape_util.h" #include "xla/test.h" #include "xla/test_helpers.h" diff --git a/xla/service/hlo_verifier_test.cc b/xla/service/hlo_verifier_test.cc index cfa7a48eaf1d0e..431c384c57cfbd 100644 --- a/xla/service/hlo_verifier_test.cc +++ b/xla/service/hlo_verifier_test.cc @@ -35,10 +35,10 @@ limitations under the License. #include "xla/hlo/ir/hlo_computation.h" #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/layout.h" #include "xla/literal_util.h" #include "xla/service/hlo_module_config.h" -#include "xla/service/hlo_parser.h" #include "xla/service/layout_assignment.h" #include "xla/shape.h" #include "xla/shape_util.h" diff --git a/xla/service/instruction_fusion_test.cc b/xla/service/instruction_fusion_test.cc index 0fe695f8a11caa..d75c9a4fe29d86 100644 --- a/xla/service/instruction_fusion_test.cc +++ b/xla/service/instruction_fusion_test.cc @@ -21,8 +21,8 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_matchers.h" -#include "xla/service/hlo_parser.h" #include "xla/shape_util.h" #include "xla/tests/hlo_test_base.h" #include "xla/xla_data.pb.h" diff --git a/xla/service/layout_assignment_test.cc b/xla/service/layout_assignment_test.cc index 0b294c46ddef17..371b3b200a1902 100644 --- a/xla/service/layout_assignment_test.cc +++ b/xla/service/layout_assignment_test.cc @@ -28,13 +28,13 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/layout.h" #include "xla/layout_util.h" #include "xla/literal.h" #include "xla/literal_util.h" #include "xla/service/algebraic_simplifier.h" #include "xla/service/computation_layout.h" -#include "xla/service/hlo_parser.h" #include "xla/service/logical_buffer.h" #include "xla/service/pattern_matcher.h" #include "xla/service/pattern_matcher_gmock.h" diff --git a/xla/service/logistic_expander_test.cc b/xla/service/logistic_expander_test.cc index 57fce48fc8a325..b74965c68843b1 100644 --- a/xla/service/logistic_expander_test.cc +++ b/xla/service/logistic_expander_test.cc @@ -21,8 +21,8 @@ limitations under the License. #include "xla/hlo/ir/hlo_computation.h" #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/dynamic_padder.h" -#include "xla/service/hlo_parser.h" #include "xla/service/pattern_matcher.h" #include "xla/service/pattern_matcher_gmock.h" #include "xla/test.h" diff --git a/xla/service/memory_space_propagation_test.cc b/xla/service/memory_space_propagation_test.cc index 98ae47c8b164f2..2dec99be32322f 100644 --- a/xla/service/memory_space_propagation_test.cc +++ b/xla/service/memory_space_propagation_test.cc @@ -15,7 +15,7 @@ limitations under the License. #include "xla/service/memory_space_propagation.h" -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/tests/hlo_test_base.h" #include "xla/tsl/lib/core/status_test_util.h" diff --git a/xla/service/p2p_schedule_preparation_test.cc b/xla/service/p2p_schedule_preparation_test.cc index b1127c586fe032..828ca209972823 100644 --- a/xla/service/p2p_schedule_preparation_test.cc +++ b/xla/service/p2p_schedule_preparation_test.cc @@ -25,7 +25,7 @@ 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/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/tests/hlo_test_base.h" #include "xla/util.h" #include "tsl/platform/statusor.h" diff --git a/xla/service/pattern_matcher.h b/xla/service/pattern_matcher.h index 76979f097ef1f9..1d6dc409072ddb 100644 --- a/xla/service/pattern_matcher.h +++ b/xla/service/pattern_matcher.h @@ -46,10 +46,10 @@ limitations under the License. #include "xla/hlo/ir/hlo_opcode.h" #include "xla/hlo/ir/hlo_sharding.h" #include "xla/hlo/ir/ptrvec.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/layout.h" #include "xla/layout_util.h" #include "xla/literal.h" -#include "xla/service/hlo_parser.h" #include "xla/shape.h" #include "xla/shape_util.h" #include "xla/util.h" diff --git a/xla/service/pattern_matcher_test.cc b/xla/service/pattern_matcher_test.cc index 73da06ae7c1eea..c8ecfe16029189 100644 --- a/xla/service/pattern_matcher_test.cc +++ b/xla/service/pattern_matcher_test.cc @@ -24,10 +24,10 @@ limitations under the License. #include "xla/comparison_util.h" #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/layout.h" #include "xla/layout_util.h" #include "xla/literal_util.h" -#include "xla/service/hlo_parser.h" #include "xla/shape.h" #include "xla/shape_util.h" #include "xla/test.h" diff --git a/xla/service/reduce_decomposer_test.cc b/xla/service/reduce_decomposer_test.cc index 54d290ec9e4418..4348135b9a42ef 100644 --- a/xla/service/reduce_decomposer_test.cc +++ b/xla/service/reduce_decomposer_test.cc @@ -18,7 +18,7 @@ limitations under the License. #include #include -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/test.h" #include "xla/test_helpers.h" #include "xla/tests/filecheck.h" diff --git a/xla/service/reshape_decomposer_test.cc b/xla/service/reshape_decomposer_test.cc index 94d135e8b15b0d..d21dbe127b4607 100644 --- a/xla/service/reshape_decomposer_test.cc +++ b/xla/service/reshape_decomposer_test.cc @@ -17,7 +17,7 @@ limitations under the License. #include #include -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/test.h" #include "xla/test_helpers.h" #include "xla/tests/filecheck.h" diff --git a/xla/service/scatter_simplifier_test.cc b/xla/service/scatter_simplifier_test.cc index 919a68620fee42..994dc76d2c2d51 100644 --- a/xla/service/scatter_simplifier_test.cc +++ b/xla/service/scatter_simplifier_test.cc @@ -18,9 +18,9 @@ limitations under the License. #include #include "xla/hlo/ir/hlo_casting_utils.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/pass/hlo_pass_fix.h" #include "xla/hlo/pass/hlo_pass_pipeline.h" -#include "xla/service/hlo_parser.h" #include "xla/tests/hlo_test_base.h" namespace xla { diff --git a/xla/service/shape_inference_test.cc b/xla/service/shape_inference_test.cc index 6c2cf78ab0245c..14d728fbb4eb3a 100644 --- a/xla/service/shape_inference_test.cc +++ b/xla/service/shape_inference_test.cc @@ -33,7 +33,7 @@ limitations under the License. #include "xla/client/padding.h" #include "xla/hlo/ir/hlo_instructions.h" #include "xla/hlo/ir/hlo_opcode.h" -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/shape.h" #include "xla/shape_util.h" #include "xla/test.h" diff --git a/xla/service/sharding_propagation_test.cc b/xla/service/sharding_propagation_test.cc index f46e4e1a04c1c6..5ae037ef49f749 100644 --- a/xla/service/sharding_propagation_test.cc +++ b/xla/service/sharding_propagation_test.cc @@ -33,11 +33,11 @@ limitations under the License. #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_op_metadata.h" #include "xla/hlo/ir/hlo_sharding.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/transforms/hlo_constant_splitter.h" #include "xla/hlo/utils/hlo_matchers.h" #include "xla/protobuf_util.h" #include "xla/service/hlo_dce.h" -#include "xla/service/hlo_parser.h" #include "xla/tests/hlo_test_base.h" #include "xla/util.h" #include "xla/xla_data.pb.h" diff --git a/xla/service/sharding_remover_test.cc b/xla/service/sharding_remover_test.cc index 86b52d32013cad..3c9b49cc9afd32 100644 --- a/xla/service/sharding_remover_test.cc +++ b/xla/service/sharding_remover_test.cc @@ -18,8 +18,8 @@ limitations under the License. #include #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_matchers.h" -#include "xla/service/hlo_parser.h" #include "xla/status_macros.h" #include "xla/tests/hlo_test_base.h" diff --git a/xla/service/slice_sinker_test.cc b/xla/service/slice_sinker_test.cc index 413710bd6a225b..cc08cc39f53627 100644 --- a/xla/service/slice_sinker_test.cc +++ b/xla/service/slice_sinker_test.cc @@ -22,10 +22,10 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/layout_util.h" #include "xla/literal_util.h" #include "xla/service/hlo_dce.h" -#include "xla/service/hlo_parser.h" #include "xla/service/pattern_matcher.h" #include "xla/service/pattern_matcher_gmock.h" #include "xla/shape_util.h" diff --git a/xla/service/sort_simplifier_test.cc b/xla/service/sort_simplifier_test.cc index 678ce7c37eb905..b2f57553401257 100644 --- a/xla/service/sort_simplifier_test.cc +++ b/xla/service/sort_simplifier_test.cc @@ -15,8 +15,8 @@ limitations under the License. #include "xla/service/sort_simplifier.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_matchers.h" -#include "xla/service/hlo_parser.h" #include "xla/service/pattern_matcher.h" #include "xla/service/pattern_matcher_gmock.h" #include "xla/test.h" diff --git a/xla/service/spmd/BUILD b/xla/service/spmd/BUILD index 6c2a9321819535..2c9f191056f138 100644 --- a/xla/service/spmd/BUILD +++ b/xla/service/spmd/BUILD @@ -51,6 +51,7 @@ cc_library( "//xla/hlo/ir:hlo", "//xla/hlo/ir:hlo_reachability", "//xla/hlo/ir:tile_assignment", + "//xla/hlo/parser:hlo_lexer", "//xla/hlo/pass:hlo_pass", "//xla/hlo/pass:hlo_pass_pipeline", "//xla/hlo/utils:hlo_query", @@ -63,7 +64,6 @@ cc_library( "//xla/service:flatten_call_graph", "//xla/service:hlo_cse", "//xla/service:hlo_dce", - "//xla/service:hlo_lexer", "//xla/service:hlo_module_config", "//xla/service:host_memory_offload_annotations_hdr", "//xla/service:pattern_matcher", diff --git a/xla/service/spmd/custom_call_handler.cc b/xla/service/spmd/custom_call_handler.cc index dab26f5985a0c5..76a32f8a7adf8c 100644 --- a/xla/service/spmd/custom_call_handler.cc +++ b/xla/service/spmd/custom_call_handler.cc @@ -40,10 +40,10 @@ limitations under the License. #include "xla/hlo/ir/hlo_instructions.h" #include "xla/hlo/ir/hlo_opcode.h" #include "xla/hlo/ir/hlo_sharding.h" +#include "xla/hlo/parser/hlo_lexer.h" #include "xla/hlo/utils/hlo_sharding_util.h" #include "xla/literal_util.h" #include "xla/service/custom_call_sharding_helper.h" -#include "xla/service/hlo_lexer.h" #include "xla/service/hlo_module_config.h" #include "xla/service/host_memory_offload_annotations.h" #include "xla/service/spmd/spmd_partitioner.h" diff --git a/xla/service/stable_sort_expander_test.cc b/xla/service/stable_sort_expander_test.cc index 83ba193ede5aef..91b3ff97efb1ad 100644 --- a/xla/service/stable_sort_expander_test.cc +++ b/xla/service/stable_sort_expander_test.cc @@ -15,9 +15,9 @@ limitations under the License. #include "xla/service/stable_sort_expander.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_matchers.h" #include "xla/service/algebraic_simplifier.h" -#include "xla/service/hlo_parser.h" #include "xla/service/pattern_matcher.h" #include "xla/service/pattern_matcher_gmock.h" #include "xla/test.h" diff --git a/xla/service/stochastic_convert_decomposer_test.cc b/xla/service/stochastic_convert_decomposer_test.cc index 48ac6e61ce8e9c..cebc18a8495f4d 100644 --- a/xla/service/stochastic_convert_decomposer_test.cc +++ b/xla/service/stochastic_convert_decomposer_test.cc @@ -20,8 +20,8 @@ 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/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_matchers.h" -#include "xla/service/hlo_parser.h" #include "xla/tests/hlo_test_base.h" namespace xla { diff --git a/xla/service/tuple_util_test.cc b/xla/service/tuple_util_test.cc index 2956e6edfbac86..4e1e5cac504ec4 100644 --- a/xla/service/tuple_util_test.cc +++ b/xla/service/tuple_util_test.cc @@ -18,9 +18,9 @@ limitations under the License. #include #include +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_matchers.h" #include "xla/service/hlo_module_config.h" -#include "xla/service/hlo_parser.h" #include "xla/shape_util.h" #include "xla/test.h" #include "xla/tests/hlo_test_base.h" diff --git a/xla/service/value_range_test.cc b/xla/service/value_range_test.cc index d95f044c6c5ead..1f98c489edc373 100644 --- a/xla/service/value_range_test.cc +++ b/xla/service/value_range_test.cc @@ -19,8 +19,8 @@ limitations under the License. #include #include "absl/container/flat_hash_map.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/hlo_module_config.h" -#include "xla/service/hlo_parser.h" #include "xla/tests/hlo_test_base.h" namespace xla { diff --git a/xla/service/while_loop_expensive_invariant_code_motion_test.cc b/xla/service/while_loop_expensive_invariant_code_motion_test.cc index 9aa7a15876f969..fdf3164a4db5a7 100644 --- a/xla/service/while_loop_expensive_invariant_code_motion_test.cc +++ b/xla/service/while_loop_expensive_invariant_code_motion_test.cc @@ -20,8 +20,8 @@ limitations under the License. #include "xla/hlo/ir/hlo_computation.h" #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_matchers.h" -#include "xla/service/hlo_parser.h" #include "xla/tests/hlo_test_base.h" #include "xla/util.h" #include "tsl/platform/statusor.h" diff --git a/xla/service/while_loop_invariant_code_motion_test.cc b/xla/service/while_loop_invariant_code_motion_test.cc index 7d311df3546e65..eadb19462118f4 100644 --- a/xla/service/while_loop_invariant_code_motion_test.cc +++ b/xla/service/while_loop_invariant_code_motion_test.cc @@ -21,9 +21,9 @@ limitations under the License. #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" #include "xla/hlo/ir/hlo_sharding.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_matchers.h" #include "xla/literal_util.h" -#include "xla/service/hlo_parser.h" #include "xla/shape.h" #include "xla/shape_util.h" #include "xla/test.h" diff --git a/xla/service/while_loop_simplifier_test.cc b/xla/service/while_loop_simplifier_test.cc index 494271c2023ceb..683b016d3cb795 100644 --- a/xla/service/while_loop_simplifier_test.cc +++ b/xla/service/while_loop_simplifier_test.cc @@ -24,10 +24,10 @@ limitations under the License. #include "absl/strings/str_replace.h" #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/utils/hlo_matchers.h" #include "xla/literal_util.h" #include "xla/service/hlo_dce.h" -#include "xla/service/hlo_parser.h" #include "xla/service/tuple_simplifier.h" #include "xla/shape.h" #include "xla/shape_util.h" diff --git a/xla/sharding_op_util.cc b/xla/sharding_op_util.cc index 40154c61f45c63..16a26e4a5b8e09 100644 --- a/xla/sharding_op_util.cc +++ b/xla/sharding_op_util.cc @@ -23,7 +23,7 @@ limitations under the License. #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" #include "absl/types/span.h" -#include "xla/service/hlo_lexer.h" +#include "xla/hlo/parser/hlo_lexer.h" #include "xla/status_macros.h" #include "xla/util.h" diff --git a/xla/stream_executor/tpu/BUILD b/xla/stream_executor/tpu/BUILD index 3e5a9786889d68..acf3db56a08e2d 100644 --- a/xla/stream_executor/tpu/BUILD +++ b/xla/stream_executor/tpu/BUILD @@ -93,8 +93,8 @@ xla_cc_test( "//xla:xla_data_proto_cc", "//xla:xla_proto_cc", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/service:hlo_module_config", - "//xla/service:hlo_parser", "//xla/service:hlo_proto_cc", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", diff --git a/xla/stream_executor/tpu/c_api_conversions_test.cc b/xla/stream_executor/tpu/c_api_conversions_test.cc index 196a6b004c96c6..015536525c64fc 100644 --- a/xla/stream_executor/tpu/c_api_conversions_test.cc +++ b/xla/stream_executor/tpu/c_api_conversions_test.cc @@ -27,10 +27,10 @@ limitations under the License. #include "absl/types/span.h" #include "xla/executable_run_options.h" #include "xla/hlo/ir/hlo_module.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/layout.h" #include "xla/service/hlo.pb.h" #include "xla/service/hlo_module_config.h" -#include "xla/service/hlo_parser.h" #include "xla/shape.h" #include "xla/shape_util.h" #include "xla/stream_executor/tpu/c_api_decl.h" diff --git a/xla/tests/BUILD b/xla/tests/BUILD index 20532e8286d32d..dafecfbc9fbf73 100644 --- a/xla/tests/BUILD +++ b/xla/tests/BUILD @@ -121,8 +121,8 @@ cc_library( "//xla:types", "//xla:util", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/service:hlo_module_config", - "//xla/service:hlo_parser", "//xla/service:hlo_verifier", "@com_google_absl//absl/status", "@com_google_absl//absl/strings", @@ -354,9 +354,9 @@ cc_library( "//xla/client:client_library", "//xla/client:local_client", "//xla/hlo/builder:xla_computation", + "//xla/hlo/parser:hlo_parser", "//xla/service:computation_placer", "//xla/service:hlo_module_config", - "//xla/service:hlo_parser", "//xla/service:local_service", "//xla/service:platform_util", "//xla/service:shaped_buffer", @@ -953,8 +953,8 @@ xla_test( "//xla/hlo/builder:xla_builder", "//xla/hlo/builder/lib:arithmetic", "//xla/hlo/builder/lib:matrix", + "//xla/hlo/parser:hlo_parser", "//xla/service", - "//xla/service:hlo_parser", "//xla/service:platform_util", "//xla/service:shaped_buffer", "//xla/stream_executor:device_description", @@ -1004,7 +1004,7 @@ xla_test( "//xla/hlo/builder:xla_builder", "//xla/hlo/builder/lib:arithmetic", "//xla/hlo/builder/lib:matrix", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/stream_executor:stream_executor_memory_allocator", "@com_google_absl//absl/strings", "@tsl//tsl/platform:ml_dtypes", @@ -1050,7 +1050,7 @@ xla_test( "//xla/hlo/builder:xla_builder", "//xla/hlo/builder/lib:arithmetic", "//xla/hlo/builder/lib:matrix", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/stream_executor:stream_executor_memory_allocator", "@com_google_absl//absl/strings", "@tsl//tsl/platform:ml_dtypes", @@ -1135,7 +1135,7 @@ xla_test( "//xla/hlo/builder:xla_builder", "//xla/hlo/builder/lib:arithmetic", "//xla/hlo/builder/lib:matrix", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/stream_executor:stream_executor_memory_allocator", "@com_google_absl//absl/strings", "@tsl//tsl/platform:ml_dtypes", @@ -1635,7 +1635,7 @@ xla_test( "//xla/client:local_client", "//xla/hlo/builder:xla_builder", "//xla/hlo/builder:xla_computation", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/tsl/lib/core:status_test_util", "@com_google_absl//absl/status:statusor", "@tsl//tsl/platform:test", @@ -2428,10 +2428,10 @@ xla_test( "//xla:error_spec", "//xla:util", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/pass:hlo_pass_pipeline", "//xla/service:collective_pipeliner", "//xla/service:hlo_dce", - "//xla/service:hlo_parser", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings:string_view", "@com_google_googletest//:gtest_main", @@ -2964,8 +2964,8 @@ xla_test( "//xla:shape_util", "//xla:types", "//xla:xla_data_proto_cc", + "//xla/hlo/parser:hlo_parser", "//xla/service:generic_transfer_manager", - "//xla/service:hlo_parser", "//xla/service:shaped_buffer", "//xla/service:stream_pool", "//xla/stream_executor", @@ -3026,7 +3026,7 @@ xla_test( ":xla_internal_test_main", "//xla:shape_util", "//xla/hlo/builder:xla_builder", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/tsl/lib/core:status_test_util", "@com_google_absl//absl/base", "@com_google_absl//absl/container:flat_hash_set", diff --git a/xla/tests/collective_pipeliner_execution_test.cc b/xla/tests/collective_pipeliner_execution_test.cc index b9a0588e9ec649..f79d95f008dadb 100644 --- a/xla/tests/collective_pipeliner_execution_test.cc +++ b/xla/tests/collective_pipeliner_execution_test.cc @@ -26,10 +26,10 @@ limitations under the License. #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/pass/hlo_pass_pipeline.h" #include "xla/service/collective_pipeliner.h" #include "xla/service/hlo_dce.h" -#include "xla/service/hlo_parser.h" #include "xla/tests/hlo_test_base.h" #include "xla/util.h" diff --git a/xla/tests/dot_operation_test.cc b/xla/tests/dot_operation_test.cc index 86f49187824133..b890b6a3b2b1f9 100644 --- a/xla/tests/dot_operation_test.cc +++ b/xla/tests/dot_operation_test.cc @@ -25,9 +25,9 @@ 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/parser/hlo_parser.h" #include "xla/primitive_util.h" #include "xla/reference_util.h" -#include "xla/service/hlo_parser.h" #include "xla/shape_util.h" #include "xla/stream_executor/stream_executor_memory_allocator.h" #include "xla/tests/client_library_test_base.h" diff --git a/xla/tests/local_client_test_base.cc b/xla/tests/local_client_test_base.cc index 7e52c8fe7f7d55..0f4750132889ba 100644 --- a/xla/tests/local_client_test_base.cc +++ b/xla/tests/local_client_test_base.cc @@ -24,9 +24,9 @@ limitations under the License. #include "unsupported/Eigen/CXX11/Tensor" #include "xla/client/local_client.h" #include "xla/hlo/builder/xla_computation.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/map_util.h" #include "xla/service/hlo_module_config.h" -#include "xla/service/hlo_parser.h" #include "xla/shape_util.h" #include "xla/status_macros.h" #include "xla/stream_executor/stream_executor_memory_allocator.h" diff --git a/xla/tests/test_utils_test.cc b/xla/tests/test_utils_test.cc index d3a1850976939c..8368cfe01582dc 100644 --- a/xla/tests/test_utils_test.cc +++ b/xla/tests/test_utils_test.cc @@ -20,7 +20,7 @@ limitations under the License. #include "absl/base/casts.h" #include "absl/container/flat_hash_set.h" #include "xla/hlo/builder/xla_builder.h" -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/shape_util.h" #include "xla/tests/local_client_test_base.h" #include "xla/tests/test_macros.h" diff --git a/xla/tests/transfer_manager_test.cc b/xla/tests/transfer_manager_test.cc index b290dfea6ef92e..2478ec08171208 100644 --- a/xla/tests/transfer_manager_test.cc +++ b/xla/tests/transfer_manager_test.cc @@ -18,10 +18,10 @@ limitations under the License. #include #include "absl/status/statusor.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/layout_util.h" #include "xla/literal.h" #include "xla/service/generic_transfer_manager.h" -#include "xla/service/hlo_parser.h" #include "xla/service/shaped_buffer.h" #include "xla/service/stream_pool.h" #include "xla/shape_util.h" diff --git a/xla/tests/tuple_test.cc b/xla/tests/tuple_test.cc index 1ba26d6d4b5165..5cc7f7b1bb9d18 100644 --- a/xla/tests/tuple_test.cc +++ b/xla/tests/tuple_test.cc @@ -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/hlo/parser/hlo_parser.h" #include "xla/literal_util.h" -#include "xla/service/hlo_parser.h" #include "xla/shape_util.h" #include "xla/test_helpers.h" #include "xla/tests/client_library_test_base.h" diff --git a/xla/tests/verified_hlo_module.cc b/xla/tests/verified_hlo_module.cc index 9c9f1f2a21bd05..8d52426acfedb1 100644 --- a/xla/tests/verified_hlo_module.cc +++ b/xla/tests/verified_hlo_module.cc @@ -17,7 +17,7 @@ limitations under the License. #include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" -#include "xla/service/hlo_parser.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/status_macros.h" #include "xla/util.h" #include "tsl/platform/errors.h" diff --git a/xla/text_literal_reader.cc b/xla/text_literal_reader.cc index bcbba1b9ca354c..7b627e5b9d1b1f 100644 --- a/xla/text_literal_reader.cc +++ b/xla/text_literal_reader.cc @@ -30,8 +30,8 @@ limitations under the License. #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" #include "absl/strings/strip.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/literal.h" -#include "xla/service/hlo_parser.h" #include "xla/shape.h" #include "xla/shape_util.h" #include "xla/tsl/lib/io/buffered_inputstream.h" diff --git a/xla/tools/BUILD b/xla/tools/BUILD index 933a36a568472f..5392c4ae8a917f 100644 --- a/xla/tools/BUILD +++ b/xla/tools/BUILD @@ -473,8 +473,8 @@ cc_library( ":run_hlo_module_proto_cc", "//xla:debug_options_flags", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/service:hlo_module_config", - "//xla/service:hlo_parser", "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", "@com_googlesource_code_re2//:re2", @@ -662,7 +662,7 @@ xla_cc_test( "//xla:literal", "//xla:literal_util", "//xla/hlo/ir:hlo", - "//xla/service:hlo_parser", + "//xla/hlo/parser:hlo_parser", "//xla/tsl/lib/core:status_test_util", "@com_google_absl//absl/log", "@com_google_absl//absl/strings", diff --git a/xla/tools/hlo_bisect/BUILD b/xla/tools/hlo_bisect/BUILD index 5355ebe7731a40..8b2f8a87b77953 100644 --- a/xla/tools/hlo_bisect/BUILD +++ b/xla/tools/hlo_bisect/BUILD @@ -84,8 +84,8 @@ cc_library( "//xla:protobuf_util", "//xla:util", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/service:dump", - "//xla/service:hlo_parser", "//xla/service:hlo_proto_cc", "//xla/service:hlo_proto_util", "//xla/service:hlo_runner", diff --git a/xla/tools/hlo_bisect/hlo_bisect_utils.cc b/xla/tools/hlo_bisect/hlo_bisect_utils.cc index d4e6d0d60e70fa..f25be607e81610 100644 --- a/xla/tools/hlo_bisect/hlo_bisect_utils.cc +++ b/xla/tools/hlo_bisect/hlo_bisect_utils.cc @@ -24,10 +24,10 @@ limitations under the License. #include "absl/cleanup/cleanup.h" #include "xla/error_spec.h" #include "xla/hlo/ir/hlo_instruction.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/protobuf_util.h" #include "xla/service/dump.h" #include "xla/service/hlo.pb.h" -#include "xla/service/hlo_parser.h" #include "xla/service/hlo_proto_util.h" #include "xla/service/hlo_runner.h" #include "xla/service/hlo_verifier.h" diff --git a/xla/tools/hlo_module_loader.cc b/xla/tools/hlo_module_loader.cc index 85c1effb10732a..81f8167e56f596 100644 --- a/xla/tools/hlo_module_loader.cc +++ b/xla/tools/hlo_module_loader.cc @@ -30,8 +30,8 @@ limitations under the License. #include "xla/debug_options_flags.h" #include "xla/hlo/ir/hlo_computation.h" #include "xla/hlo/ir/hlo_instruction.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/service/hlo_module_config.h" -#include "xla/service/hlo_parser.h" #include "tsl/platform/env.h" #include "tsl/platform/logging.h" #include "tsl/platform/path.h" diff --git a/xla/tools/multihost_hlo_runner/BUILD b/xla/tools/multihost_hlo_runner/BUILD index 77f6422f8598fa..71a680112ce2cd 100644 --- a/xla/tools/multihost_hlo_runner/BUILD +++ b/xla/tools/multihost_hlo_runner/BUILD @@ -137,6 +137,7 @@ cc_library( "//xla/client:executable_build_options", "//xla/client:xla_computation", "//xla/hlo/ir:hlo", + "//xla/hlo/parser:hlo_parser", "//xla/hlo/pass:hlo_pass_pipeline", "//xla/pjrt:host_memory_spaces", "//xla/pjrt:pjrt_client", @@ -147,7 +148,6 @@ cc_library( "//xla/service:computation_layout", "//xla/service:computation_placer_hdr", "//xla/service:hlo_module_config", - "//xla/service:hlo_parser", "//xla/service:hlo_proto_cc", "//xla/tests:test_utils", "//xla/tools:hlo_control_flow_flattening", diff --git a/xla/tools/multihost_hlo_runner/functional_hlo_runner.cc b/xla/tools/multihost_hlo_runner/functional_hlo_runner.cc index c20ba23e4f0919..06aaf3fb64dd16 100644 --- a/xla/tools/multihost_hlo_runner/functional_hlo_runner.cc +++ b/xla/tools/multihost_hlo_runner/functional_hlo_runner.cc @@ -42,6 +42,7 @@ limitations under the License. #include "xla/hlo/ir/hlo_input_output_alias_config.h" #include "xla/hlo/ir/hlo_module.h" #include "xla/hlo/ir/hlo_sharding.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/hlo/pass/hlo_pass_pipeline.h" #include "xla/layout.h" #include "xla/literal.h" @@ -57,7 +58,6 @@ limitations under the License. #include "xla/service/computation_placer.h" #include "xla/service/hlo.pb.h" #include "xla/service/hlo_module_config.h" -#include "xla/service/hlo_parser.h" #include "xla/shape_util.h" #include "xla/status_macros.h" #include "xla/tests/test_utils.h" diff --git a/xla/tools/run_hlo_module_bin_test.cc b/xla/tools/run_hlo_module_bin_test.cc index 9b6138f45e7246..3421516ee41213 100644 --- a/xla/tools/run_hlo_module_bin_test.cc +++ b/xla/tools/run_hlo_module_bin_test.cc @@ -21,9 +21,9 @@ limitations under the License. #include "absl/log/log.h" #include "absl/strings/str_cat.h" #include "xla/hlo/ir/hlo_module.h" +#include "xla/hlo/parser/hlo_parser.h" #include "xla/literal.h" #include "xla/literal_util.h" -#include "xla/service/hlo_parser.h" #include "xla/tsl/lib/core/status_test_util.h" #include "tsl/platform/env.h" #include "tsl/platform/path.h"