From 54d9f96a28125ddc8771d68b5f63b3995f5d68d7 Mon Sep 17 00:00:00 2001 From: xla authors Date: Wed, 23 Oct 2024 03:02:54 -0700 Subject: [PATCH] Automated Code Change PiperOrigin-RevId: 688890247 --- xla/hlo/ir/BUILD | 10 ++++++++++ xla/hlo/ir/collective_device_list.cc | 1 + xla/hlo/ir/collective_device_list.h | 1 + xla/hlo/ir/dfs_hlo_visitor.cc | 3 ++- xla/hlo/ir/hlo_computation.cc | 9 +++++++++ xla/hlo/ir/hlo_input_output_alias_config.cc | 4 ++++ xla/hlo/ir/hlo_instruction_utils.cc | 3 +++ xla/hlo/ir/hlo_module.cc | 1 + xla/hlo/ir/hlo_module_group.cc | 9 +++++++++ xla/hlo/ir/hlo_module_group.h | 2 ++ xla/hlo/ir/hlo_module_metadata.cc | 4 ++++ xla/hlo/ir/hlo_module_metadata.h | 3 +++ xla/hlo/ir/hlo_op_metadata.cc | 1 + xla/hlo/ir/hlo_opcode.cc | 2 ++ xla/hlo/ir/hlo_original_value.cc | 1 + xla/hlo/ir/hlo_original_value.h | 1 + xla/hlo/ir/hlo_schedule.cc | 8 ++++++++ xla/hlo/ir/hlo_schedule.h | 4 ++++ xla/hlo/ir/hlo_sharding.cc | 7 +++++++ xla/hlo/ir/hlo_sharding.h | 3 +++ xla/hlo/ir/hlo_sharding_metadata.cc | 12 ++++++++++++ xla/hlo/ir/hlo_sharding_metadata.h | 4 ++++ xla/hlo/ir/tile_assignment.cc | 3 +++ xla/hlo/ir/tile_assignment.h | 3 +++ 24 files changed, 98 insertions(+), 1 deletion(-) diff --git a/xla/hlo/ir/BUILD b/xla/hlo/ir/BUILD index 38fa11601d994..b792f00428c00 100644 --- a/xla/hlo/ir/BUILD +++ b/xla/hlo/ir/BUILD @@ -68,6 +68,7 @@ cc_library( "//xla:literal_util", "//xla:printer", "//xla:protobuf_util", + "//xla:shape_layout", "//xla:shape_tree", "//xla:shape_util", "//xla:sort_json", @@ -94,6 +95,7 @@ cc_library( "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/container:inlined_vector", "@com_google_absl//absl/functional:function_ref", + "@com_google_absl//absl/hash", "@com_google_absl//absl/log", "@com_google_absl//absl/log:check", "@com_google_absl//absl/memory", @@ -169,9 +171,13 @@ cc_library( hdrs = ["hlo_module_group.h"], deps = [ ":hlo", + "//xla:status_macros", + "//xla/service:hlo_module_config", "//xla/service:hlo_proto_cc", + "@com_google_absl//absl/status:statusor", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:span", + "@tsl//tsl/platform:statusor", ], ) @@ -181,7 +187,9 @@ cc_library( hdrs = ["hlo_instruction_utils.h"], deps = [ ":hlo", + "//xla:xla_data_proto_cc", "@com_google_absl//absl/algorithm:container", + "@com_google_absl//absl/strings", ], ) @@ -232,7 +240,9 @@ cc_library( "//xla:util", "@com_google_absl//absl/algorithm:container", "@com_google_absl//absl/container:inlined_vector", + "@com_google_absl//absl/functional:function_ref", "@com_google_absl//absl/log:check", + "@com_google_absl//absl/status", "@com_google_absl//absl/types:span", ], ) diff --git a/xla/hlo/ir/collective_device_list.cc b/xla/hlo/ir/collective_device_list.cc index efa009c72fefa..2b43177051239 100644 --- a/xla/hlo/ir/collective_device_list.cc +++ b/xla/hlo/ir/collective_device_list.cc @@ -26,6 +26,7 @@ limitations under the License. #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" #include "absl/types/span.h" +#include "xla/service/hlo.pb.h" #include "xla/xla_data.pb.h" #include "tsl/platform/logging.h" // IWYU pragma: keep #include "tsl/platform/protobuf.h" diff --git a/xla/hlo/ir/collective_device_list.h b/xla/hlo/ir/collective_device_list.h index 66d898e2ccaa4..06228143b5cdf 100644 --- a/xla/hlo/ir/collective_device_list.h +++ b/xla/hlo/ir/collective_device_list.h @@ -23,6 +23,7 @@ limitations under the License. #include #include "absl/types/span.h" +#include "xla/array.h" #include "xla/hlo/ir/tile_assignment.h" #include "xla/service/hlo.pb.h" #include "xla/xla_data.pb.h" diff --git a/xla/hlo/ir/dfs_hlo_visitor.cc b/xla/hlo/ir/dfs_hlo_visitor.cc index b89eb721ac117..d0f6bfb6fe135 100644 --- a/xla/hlo/ir/dfs_hlo_visitor.cc +++ b/xla/hlo/ir/dfs_hlo_visitor.cc @@ -17,8 +17,9 @@ limitations under the License. #include +#include "absl/status/status.h" #include "xla/hlo/ir/hlo_instruction.h" -#include "xla/types.h" +#include "xla/hlo/ir/hlo_opcode.h" #include "xla/util.h" #include "tsl/platform/logging.h" diff --git a/xla/hlo/ir/hlo_computation.cc b/xla/hlo/ir/hlo_computation.cc index 92b1b1eef6598..fe34bf20072a3 100644 --- a/xla/hlo/ir/hlo_computation.cc +++ b/xla/hlo/ir/hlo_computation.cc @@ -34,9 +34,13 @@ limitations under the License. #include "absl/container/inlined_vector.h" #include "absl/functional/function_ref.h" #include "absl/memory/memory.h" +#include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" +#include "absl/strings/string_view.h" +#include "absl/types/span.h" +#include "xla/hlo/ir/dfs_hlo_visitor.h" #include "xla/hlo/ir/hlo_clone_context.h" #include "xla/hlo/ir/hlo_input_output_alias_config.h" #include "xla/hlo/ir/hlo_instruction.h" @@ -46,9 +50,13 @@ limitations under the License. #include "xla/hlo/ir/ptrvec.h" #include "xla/map_util.h" #include "xla/printer.h" +#include "xla/service/hlo.pb.h" +#include "xla/service/hlo_module_config.h" #include "xla/service/mapped_ptr_container_sorter.h" #include "xla/service/name_uniquer.h" #include "xla/shape.h" +#include "xla/shape_layout.h" +#include "xla/shape_tree.h" #include "xla/shape_util.h" #include "xla/status_macros.h" #include "xla/tsl/lib/gtl/iterator_range.h" @@ -57,6 +65,7 @@ limitations under the License. #include "tsl/platform/errors.h" #include "tsl/platform/logging.h" #include "tsl/platform/status.h" +#include "tsl/platform/statusor.h" namespace xla { diff --git a/xla/hlo/ir/hlo_input_output_alias_config.cc b/xla/hlo/ir/hlo_input_output_alias_config.cc index c54af5675f4a7..c31d7388b7b00 100644 --- a/xla/hlo/ir/hlo_input_output_alias_config.cc +++ b/xla/hlo/ir/hlo_input_output_alias_config.cc @@ -22,17 +22,21 @@ limitations under the License. #include #include +#include "absl/functional/function_ref.h" #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" #include "xla/hlo/ir/hlo_computation.h" +#include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_module.h" #include "xla/layout_util.h" #include "xla/service/hlo.pb.h" #include "xla/shape.h" +#include "xla/shape_tree.h" #include "xla/shape_util.h" #include "xla/status_macros.h" +#include "xla/util.h" #include "tsl/platform/errors.h" #include "tsl/platform/logging.h" // IWYU pragma: keep diff --git a/xla/hlo/ir/hlo_instruction_utils.cc b/xla/hlo/ir/hlo_instruction_utils.cc index 52eac784f085d..c500b0ccd079c 100644 --- a/xla/hlo/ir/hlo_instruction_utils.cc +++ b/xla/hlo/ir/hlo_instruction_utils.cc @@ -18,8 +18,11 @@ limitations under the License. #include #include "absl/algorithm/container.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_join.h" #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_opcode.h" +#include "xla/xla_data.pb.h" namespace xla { namespace hlo_instruction_utils { diff --git a/xla/hlo/ir/hlo_module.cc b/xla/hlo/ir/hlo_module.cc index 77624a96e265c..f2b70cc9d3e92 100644 --- a/xla/hlo/ir/hlo_module.cc +++ b/xla/hlo/ir/hlo_module.cc @@ -58,6 +58,7 @@ limitations under the License. #include "xla/status_macros.h" #include "xla/tsl/lib/gtl/map_util.h" #include "xla/util.h" +#include "xla/xla.pb.h" #include "xla/xla_data.pb.h" #include "tsl/platform/env.h" #include "tsl/platform/errors.h" diff --git a/xla/hlo/ir/hlo_module_group.cc b/xla/hlo/ir/hlo_module_group.cc index c5623e45aea58..6d57d496a4f74 100644 --- a/xla/hlo/ir/hlo_module_group.cc +++ b/xla/hlo/ir/hlo_module_group.cc @@ -22,6 +22,15 @@ limitations under the License. #include #include +#include "absl/status/statusor.h" +#include "absl/strings/string_view.h" +#include "absl/types/span.h" +#include "xla/hlo/ir/hlo_module.h" +#include "xla/service/hlo.pb.h" +#include "xla/service/hlo_module_config.h" +#include "xla/status_macros.h" +#include "tsl/platform/statusor.h" + namespace xla { HloModuleGroup::HloModuleGroup(std::unique_ptr module) diff --git a/xla/hlo/ir/hlo_module_group.h b/xla/hlo/ir/hlo_module_group.h index 753e8bc61c62d..68c2253b0e187 100644 --- a/xla/hlo/ir/hlo_module_group.h +++ b/xla/hlo/ir/hlo_module_group.h @@ -21,10 +21,12 @@ limitations under the License. #include #include +#include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/span.h" #include "xla/hlo/ir/hlo_module.h" #include "xla/service/hlo.pb.h" +#include "xla/service/hlo_module_config.h" namespace xla { diff --git a/xla/hlo/ir/hlo_module_metadata.cc b/xla/hlo/ir/hlo_module_metadata.cc index 79cad36763f6e..bf19f043396a8 100644 --- a/xla/hlo/ir/hlo_module_metadata.cc +++ b/xla/hlo/ir/hlo_module_metadata.cc @@ -18,10 +18,14 @@ limitations under the License. #include #include "absl/container/flat_hash_set.h" +#include "absl/functional/function_ref.h" #include "absl/log/log.h" +#include "absl/status/status.h" +#include "xla/service/hlo.pb.h" #include "xla/util.h" #include "tsl/platform/env.h" #include "tsl/platform/protobuf.h" +#include "tsl/platform/statusor.h" namespace xla { diff --git a/xla/hlo/ir/hlo_module_metadata.h b/xla/hlo/ir/hlo_module_metadata.h index 7f115f042d139..e6b4050db526f 100644 --- a/xla/hlo/ir/hlo_module_metadata.h +++ b/xla/hlo/ir/hlo_module_metadata.h @@ -21,6 +21,9 @@ limitations under the License. #include #include +#include "absl/functional/function_ref.h" +#include "absl/status/status.h" +#include "absl/status/statusor.h" #include "xla/service/hlo.pb.h" #include "xla/status_macros.h" #include "xla/util.h" diff --git a/xla/hlo/ir/hlo_op_metadata.cc b/xla/hlo/ir/hlo_op_metadata.cc index 5370eed46e376..30b1d2c3cfc6a 100644 --- a/xla/hlo/ir/hlo_op_metadata.cc +++ b/xla/hlo/ir/hlo_op_metadata.cc @@ -21,6 +21,7 @@ limitations under the License. #include "absl/strings/escaping.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_join.h" +#include "xla/xla_data.pb.h" namespace xla { diff --git a/xla/hlo/ir/hlo_opcode.cc b/xla/hlo/ir/hlo_opcode.cc index dcdf9c1933c82..cc12b39873a86 100644 --- a/xla/hlo/ir/hlo_opcode.cc +++ b/xla/hlo/ir/hlo_opcode.cc @@ -19,6 +19,8 @@ limitations under the License. #include #include "absl/container/flat_hash_map.h" +#include "absl/status/statusor.h" +#include "absl/strings/string_view.h" #include "xla/util.h" namespace xla { diff --git a/xla/hlo/ir/hlo_original_value.cc b/xla/hlo/ir/hlo_original_value.cc index 111297ebc879c..915069a8c2a3e 100644 --- a/xla/hlo/ir/hlo_original_value.cc +++ b/xla/hlo/ir/hlo_original_value.cc @@ -23,6 +23,7 @@ limitations under the License. #include "absl/strings/str_cat.h" #include "xla/shape.h" #include "xla/shape_util.h" +#include "xla/xla_data.pb.h" namespace xla { diff --git a/xla/hlo/ir/hlo_original_value.h b/xla/hlo/ir/hlo_original_value.h index 70d46a8734ac5..eca98ef3d0bc3 100644 --- a/xla/hlo/ir/hlo_original_value.h +++ b/xla/hlo/ir/hlo_original_value.h @@ -21,6 +21,7 @@ limitations under the License. #include "xla/shape_tree.h" #include "xla/shape_util.h" +#include "xla/xla_data.pb.h" namespace xla { // Stores information of original values. diff --git a/xla/hlo/ir/hlo_schedule.cc b/xla/hlo/ir/hlo_schedule.cc index 6a472b5590402..ddd2aaf4cffef 100644 --- a/xla/hlo/ir/hlo_schedule.cc +++ b/xla/hlo/ir/hlo_schedule.cc @@ -26,15 +26,23 @@ limitations under the License. #include "absl/algorithm/container.h" #include "absl/container/flat_hash_map.h" #include "absl/container/flat_hash_set.h" +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/status/status.h" +#include "absl/status/statusor.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" +#include "absl/types/span.h" #include "xla/hlo/ir/hlo_instruction.h" #include "xla/hlo/ir/hlo_module.h" #include "xla/map_util.h" +#include "xla/service/hlo.pb.h" #include "xla/status_macros.h" #include "xla/tsl/lib/gtl/map_util.h" #include "xla/util.h" +#include "tsl/platform/errors.h" namespace xla { diff --git a/xla/hlo/ir/hlo_schedule.h b/xla/hlo/ir/hlo_schedule.h index b3d8cf0f61e11..37cbff34856a9 100644 --- a/xla/hlo/ir/hlo_schedule.h +++ b/xla/hlo/ir/hlo_schedule.h @@ -23,11 +23,15 @@ limitations under the License. #include "absl/algorithm/container.h" #include "absl/container/flat_hash_map.h" +#include "absl/container/flat_hash_set.h" +#include "absl/log/check.h" #include "absl/status/status.h" +#include "absl/status/statusor.h" #include "absl/strings/string_view.h" #include "absl/types/span.h" #include "xla/hlo/ir/hlo_computation.h" #include "xla/hlo/ir/hlo_instruction.h" +#include "xla/service/hlo.pb.h" namespace xla { diff --git a/xla/hlo/ir/hlo_sharding.cc b/xla/hlo/ir/hlo_sharding.cc index 71520e196c071..a24fdb72f54c5 100644 --- a/xla/hlo/ir/hlo_sharding.cc +++ b/xla/hlo/ir/hlo_sharding.cc @@ -29,19 +29,26 @@ limitations under the License. #include #include "absl/algorithm/container.h" +#include "absl/base/optimization.h" #include "absl/container/flat_hash_set.h" #include "absl/container/inlined_vector.h" #include "absl/log/check.h" +#include "absl/status/status.h" #include "absl/strings/str_cat.h" #include "absl/types/span.h" +#include "xla/array.h" #include "xla/hlo/ir/hlo_op_metadata.h" #include "xla/overflow_util.h" #include "xla/printer.h" +#include "xla/shape.h" +#include "xla/shape_tree.h" +#include "xla/shape_util.h" #include "xla/status_macros.h" #include "xla/util.h" #include "xla/xla_data.pb.h" #include "tsl/platform/errors.h" #include "tsl/platform/protobuf.h" +#include "tsl/platform/statusor.h" namespace xla { namespace { diff --git a/xla/hlo/ir/hlo_sharding.h b/xla/hlo/ir/hlo_sharding.h index 5a7c49e926589..f8740ba4d223f 100644 --- a/xla/hlo/ir/hlo_sharding.h +++ b/xla/hlo/ir/hlo_sharding.h @@ -34,7 +34,10 @@ limitations under the License. #include "absl/types/span.h" #include "xla/array.h" #include "xla/hlo/ir/tile_assignment.h" // IWYU pragma: export +#include "xla/printer.h" +#include "xla/shape.h" #include "xla/shape_tree.h" +#include "xla/shape_util.h" #include "xla/xla_data.pb.h" namespace xla { diff --git a/xla/hlo/ir/hlo_sharding_metadata.cc b/xla/hlo/ir/hlo_sharding_metadata.cc index 5bc48d8ee29e5..b578408ed9dd8 100644 --- a/xla/hlo/ir/hlo_sharding_metadata.cc +++ b/xla/hlo/ir/hlo_sharding_metadata.cc @@ -21,9 +21,21 @@ limitations under the License. #include #include +#include "absl/log/check.h" +#include "absl/log/log.h" +#include "absl/status/status.h" +#include "absl/status/statusor.h" +#include "absl/types/span.h" #include "xla/hlo/ir/hlo_computation.h" +#include "xla/hlo/ir/hlo_domain_metadata.h" +#include "xla/hlo/ir/hlo_instruction.h" +#include "xla/hlo/ir/hlo_opcode.h" +#include "xla/hlo/ir/hlo_sharding.h" #include "xla/shape_tree.h" #include "xla/shape_util.h" +#include "xla/status_macros.h" +#include "tsl/platform/errors.h" +#include "tsl/platform/statusor.h" namespace xla { diff --git a/xla/hlo/ir/hlo_sharding_metadata.h b/xla/hlo/ir/hlo_sharding_metadata.h index 689a1d2869447..5d963e931d96b 100644 --- a/xla/hlo/ir/hlo_sharding_metadata.h +++ b/xla/hlo/ir/hlo_sharding_metadata.h @@ -21,6 +21,10 @@ limitations under the License. #include #include "absl/container/flat_hash_map.h" +#include "absl/hash/hash.h" +#include "absl/status/status.h" +#include "absl/status/statusor.h" +#include "absl/strings/string_view.h" #include "absl/types/span.h" #include "xla/hlo/ir/hlo_domain_metadata.h" #include "xla/hlo/ir/hlo_instruction.h" diff --git a/xla/hlo/ir/tile_assignment.cc b/xla/hlo/ir/tile_assignment.cc index 7620ab685e65a..c3518bbe0ed15 100644 --- a/xla/hlo/ir/tile_assignment.cc +++ b/xla/hlo/ir/tile_assignment.cc @@ -22,10 +22,13 @@ limitations under the License. #include #include +#include "absl/algorithm/container.h" #include "absl/container/inlined_vector.h" +#include "absl/functional/function_ref.h" #include "absl/log/check.h" #include "absl/types/span.h" #include "xla/array.h" +#include "xla/printer.h" #include "xla/util.h" namespace xla { diff --git a/xla/hlo/ir/tile_assignment.h b/xla/hlo/ir/tile_assignment.h index 4d9caed9b0acb..7adc5ab50b2d7 100644 --- a/xla/hlo/ir/tile_assignment.h +++ b/xla/hlo/ir/tile_assignment.h @@ -23,6 +23,9 @@ limitations under the License. #include #include "absl/algorithm/container.h" +#include "absl/functional/function_ref.h" +#include "absl/log/check.h" +#include "absl/status/status.h" #include "absl/types/span.h" #include "xla/array.h" #include "xla/printer.h"