diff --git a/xla/BUILD b/xla/BUILD index 44459e0e6df7d..f9566782a6c5a 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 af1ea7f3d6cfc..5d3c560a65e82 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 293f24d634f67..089dba93f216a 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 ade737608da33..78768755fe104 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 e82bf2a5e3175..753bc8a70d54a 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 55d53e34619a8..c78d8df717f3d 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 dfaa413716d4a..b13714fbee45e 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 c0fec2434de50..652a08c5e75a6 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 4932aa3b3a832..192293a647c69 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 5ef86e33ef946..df7b0188077f6 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 b14cd6dc2a8a4..f95f4ff4c67bd 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 c7ebf8459502e..28d3310865e9f 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 7a63a6319d3c2..acf1a3d05fcc2 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 ec89c29cafa0a..7d8c5897f689b 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 d894c99ae97d0..7460c8d2024ca 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 cd1f3f36d58a6..0246563c455a1 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 9b201f946ccaa..fe7add3ecc5c1 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 10d9358e44bf5..f94a3e3b45713 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 17f3294156bca..200973872bfe7 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 1f715ad681528..3a741a8fdaf28 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 f443bdf46d1b9..b5c446f4422d9 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 67ad036a155cc..200af6f367871 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 c341df9e82f32..ae7ef1e52df5a 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 7c928106ee92a..d45d198fccd6f 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 d0b634f17b552..b51c81004db97 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 6c4548f3d5cbf..74ededb2bd5aa 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 359b621349a9e..6098969ff6624 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 8457055929504..4e7478bf62e1e 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 1b630342bf133..76d0703cb7e9d 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 84758c6ef7e29..08877724052ac 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 cdaadf57295ca..fbcf1a9f3116b 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 e9c01b36c1fed..eea9b86169086 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 2e946459fbebd..16c9f3aa183f5 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 5387b8986ad0d..66196b1d41ca2 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 e61585b61cccd..3f07730efc96a 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 5f1c0407d99fd..16daad0bf11aa 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 430f445d7fa8c..d34deffadbfa6 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 214134648a7ea..b857ce032959f 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 5b07e61447ce3..322c5c2ee0f8e 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 9f497942b55bc..25cfa87004be0 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 353c4c6bac1c1..75a1ef3cb9015 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 ad6ee73eb14e8..77b13be5e8ba8 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 eaa2941b47ea4..6ec2cf7bb742c 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 eac5ab0707418..9426ad01b7094 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 8b04e10f49286..c5ec5b5650100 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 9b3f9c9a54233..7a660342281ca 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 beba61a5a6783..b499e01bd7d86 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 5250e9842895d..8225064c41f3c 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 d3420cf0491b3..88446626c411d 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 657eddc8b1ade..a325a46f98942 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 ed6aac57504c4..e2548ba6e4240 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 d4f9119043a61..db8660c811eec 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 13e9ee6488027..cbfb20e949caf 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 7102d20421df4..dc4df4438ff8a 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 56096e9703fb7..7f3947fbb4596 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 a41b904f5259a..14c0927cae0f8 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 6df547d96fdfc..384167e7c45ef 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 3b71fc4bf128a..9d438b3156c85 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 972bc38ae8c40..244caee8f3992 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 eb8932a947809..96298fb6437ff 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 5c3790e60c41e..8becc665ecde1 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 f6f1f41d5544e..e37722b6d4ddc 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", @@ -2155,10 +2155,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", @@ -2174,9 +2174,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", @@ -2231,10 +2231,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", @@ -2518,7 +2518,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", @@ -2718,7 +2718,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 0cc170fb1a32f..48ca7ef87579d 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 37eb3bee29c83..fcaa298b4489d 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 29764a403dbd9..38d095e06796f 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 522d265315329..fff26b5587806 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 b86071a3484fb..51af8693af2f3 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 d097d1b638251..9920fc93dacf3 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 df46055ce0d7e..c3e603d055f4e 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 c0a7d68ebc3af..aed59fd6d8ace 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 c2d33da7fcf40..abc10887f3f8e 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 c3ccdb517438b..01f95a8d7d0ce 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 756a7a3330440..baef2d1542e2b 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 1750c38c3c41a..820d9925ab319 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 11868007c4631..4a7db5677f79e 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 9d7200485f300..a66144e363daa 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 6da04e4370c6f..494fde4a32850 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 f0eb7f9481a14..1554c098bc89c 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 680391c2fa7db..2bd823cd787d7 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 b085316bce802..07e8b1210793b 100644 --- a/xla/service/gpu/transforms/BUILD +++ b/xla/service/gpu/transforms/BUILD @@ -402,10 +402,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", @@ -423,7 +423,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", @@ -539,7 +539,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", @@ -934,12 +934,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", @@ -1113,7 +1113,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", @@ -1217,8 +1217,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", @@ -1433,11 +1433,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", @@ -1941,10 +1941,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", @@ -2049,8 +2049,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", @@ -2500,7 +2500,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", @@ -2644,7 +2644,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", @@ -3152,7 +3152,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 4bd671f0e1ac9..a8462e252d086 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 98f53fd5be707..544015b4f637e 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 383a4f7e479f1..9fe1dfad72758 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 a64fd0624bea6..ecfc11f5c1110 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 7cee2c54f166e..8c1cd26e22838 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 7528870af4c60..b955f6f0f1b32 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 0c25e2bf4691e..bd72929e47abd 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 d3fb82e9d4b05..ac0d1c74066d4 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 a6b8f07e41065..a0324839cd014 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 4b9f6fb130ed0..be773fbdb225f 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 0c9c6e675e1fa..01659a11f6e66 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 1d726136a3a8e..7d1101091f0d8 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 6cfa52a5348bb..89e2f73e06dbf 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 8e11953de05c5..fc58a3d51d3c8 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 87b09dbc4ce28..d46996dd3accd 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 255012f734a5f..c4f39e7b33b93 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 4bac5768a2d54..0bbb304e34233 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 f6378353b8d50..00364bbfd74c5 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 13f80fdf6b441..e0603cff03bd2 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 35f03cf353596..16a3e4a0ac601 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 bf0076071ad95..f3f3303851952 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 9dc0014208ea9..b6db61bc9d31c 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 cfa7a48eaf1d0..431c384c57cfb 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 0fe695f8a11ca..d75c9a4fe29d8 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 0b294c46ddef1..371b3b200a190 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 57fce48fc8a32..b74965c68843b 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 98ae47c8b164f..2dec99be32322 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 b1127c586fe03..828ca20997282 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 76979f097ef1f..1d6dc409072dd 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 73da06ae7c1ee..c8ecfe1602918 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 54d290ec9e441..4348135b9a42e 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 94d135e8b15b0..d21dbe127b460 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 919a68620fee4..994dc76d2c2d5 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 6c2cf78ab0245..14d728fbb4eb3 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 f46e4e1a04c1c..5ae037ef49f74 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 86b52d32013ca..3c9b49cc9afd3 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 413710bd6a225..cc08cc39f5362 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 678ce7c37eb90..b2f5755340125 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 6c2a932181953..2c9f191056f13 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 dab26f5985a0c..76a32f8a7adf8 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 83ba193ede5ae..91b3ff97efb1a 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 48ac6e61ce8e9..cebc18a8495f4 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 2956e6edfbac8..4e1e5cac504ec 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 d95f044c6c5ea..1f98c489edc37 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 9aa7a15876f96..fdf3164a4db5a 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 7d311df3546e6..eadb19462118f 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 494271c2023ce..683b016d3cb79 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 40154c61f45c6..16a26e4a5b8e0 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 3e5a9786889d6..acf3db56a08e2 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 196a6b004c96c..015536525c64f 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 34f124c69fb64..7fd1f9ed2dd14 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", @@ -2431,10 +2431,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", @@ -2967,8 +2967,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", @@ -3029,7 +3029,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 b9a0588e9ec64..f79d95f008dad 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 86f4918782413..b890b6a3b2b1f 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 7e52c8fe7f7d5..0f4750132889b 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 d3a1850976939..8368cfe01582d 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 b290dfea6ef92..2478ec0817120 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 1ba26d6d4b516..5cc7f7b1bb9d1 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 9c9f1f2a21bd0..8d52426acfedb 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 bcbba1b9ca354..7b627e5b9d1b1 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 933a36a568472..5392c4ae8a917 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 5355ebe7731a4..8b2f8a87b7795 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 d4e6d0d60e70f..f25be607e8161 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 85c1effb10732..81f8167e56f59 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 77f6422f8598f..71a680112ce2c 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 c20ba23e4f091..06aaf3fb64dd1 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 9b6138f45e724..3421516ee4121 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"