Skip to content

Commit

Permalink
Add explicit includes to fix Kokoro compile issues.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 677916620
  • Loading branch information
toli-y authored and Google-ML-Automation committed Sep 28, 2024
1 parent 683725f commit e911ef4
Show file tree
Hide file tree
Showing 14 changed files with 158 additions and 34 deletions.
7 changes: 4 additions & 3 deletions xla/hlo/utils/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,17 @@ xla_cc_test(
srcs = ["hlo_live_range_test.cc"],
deps = [
":hlo_live_range",
"//xla:literal",
"//xla:status_macros",
"//xla:comparison_util",
"//xla:literal_util",
"//xla:shape_util",
"//xla/hlo/ir:hlo",
"//xla/service:hlo_alias_analysis",
"//xla/service:hlo_ordering",
"//xla/service:hlo_value",
"//xla/tests:hlo_test_base",
"//xla/tests:xla_internal_test_main",
"//xla/tsl/lib/core:status_test_util",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_googletest//:gtest_main",
"@tsl//tsl/platform:statusor",
],
)
Expand Down
7 changes: 7 additions & 0 deletions xla/hlo/utils/hlo_live_range_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,26 @@ limitations under the License.
==============================================================================*/
#include "xla/hlo/utils/hlo_live_range.h"

#include <cstddef>
#include <cstdint>
#include <memory>
#include <string>
#include <utility>
#include <vector>

#include <gtest/gtest.h>
#include "absl/container/flat_hash_map.h"
#include "xla/comparison_util.h"
#include "xla/hlo/ir/hlo_computation.h"
#include "xla/hlo/ir/hlo_instruction.h"
#include "xla/hlo/ir/hlo_module.h"
#include "xla/hlo/ir/hlo_opcode.h"
#include "xla/hlo/ir/hlo_schedule.h"
#include "xla/literal_util.h"
#include "xla/service/hlo_alias_analysis.h"
#include "xla/service/hlo_value.h"
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/tsl/lib/core/status_test_util.h"
#include "tsl/platform/statusor.h"
Expand Down
36 changes: 35 additions & 1 deletion xla/service/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,11 @@ xla_cc_test(
srcs = ["collective_pipeliner_test.cc"],
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/pass:hlo_pass_pipeline",
Expand Down Expand Up @@ -1062,12 +1065,16 @@ xla_cc_test(
name = "hlo_dfs_reachability_test",
srcs = ["hlo_dfs_reachability_test.cc"],
deps = [
":computation_placer_hdr",
":hlo_module_config",
"//xla:literal_util",
"//xla:shape_util",
"//xla:test",
"//xla/hlo/ir:hlo",
"//xla/hlo/ir:hlo_dfs_reachability",
"//xla/tests:hlo_test_base",
"//xla/tests:xla_internal_test_main",
"@com_google_absl//absl/random",
"@tsl//tsl/platform:status",
"@tsl//tsl/platform:test_benchmark",
],
)
Expand All @@ -1077,13 +1084,17 @@ xla_cc_test(
srcs = ["hlo_reachability_test.cc"],
deps = [
":computation_placer",
":hlo_module_config",
"//xla:literal_util",
"//xla:shape_util",
"//xla:test",
"//xla:test_helpers",
"//xla/hlo/ir:hlo",
"//xla/hlo/ir:hlo_reachability",
"//xla/tests:hlo_test_base",
"//xla/tests:xla_internal_test_main",
"@com_google_absl//absl/random",
"@tsl//tsl/platform:status",
"@tsl//tsl/platform:test_benchmark",
],
)
Expand Down Expand Up @@ -2023,24 +2034,36 @@ xla_cc_test(
":cpu_plugin",
":flatten_call_graph",
":hlo_alias_analysis",
":hlo_buffer",
":hlo_dce",
":hlo_memory_scheduler",
":hlo_ordering",
":hlo_parser",
":hlo_proto_cc",
":hlo_proto_util",
":hlo_value",
":logical_buffer",
"//xla:comparison_util",
"//xla:literal",
"//xla:literal_util",
"//xla:shape_util",
"//xla:test",
"//xla:test_helpers",
"//xla:types",
"//xla:xla_data_proto_cc",
"//xla/hlo/ir:hlo",
"//xla/service/memory_space_assignment",
"//xla/tests:hlo_test_base",
"//xla/tests:xla_internal_test_main",
"//xla/tsl/lib/core:status_test_util",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/log",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
"@tsl//tsl/platform:status",
"@tsl//tsl/platform:statusor",
],
)
Expand Down Expand Up @@ -3888,10 +3911,13 @@ xla_cc_test(
deps = [
":defuser",
"//xla:literal",
"//xla:literal_util",
"//xla:shape_util",
"//xla/hlo/ir:hlo",
"//xla/hlo/utils:hlo_matchers",
"//xla/tests:hlo_test_base",
"//xla/tests:xla_internal_test_main",
"@com_google_googletest//:gtest_main",
],
)

Expand Down Expand Up @@ -5030,10 +5056,13 @@ xla_cc_test(
deps = [
":flatten_call_graph",
":hlo_alias_analysis",
":hlo_buffer",
":hlo_graph_dumper",
":hlo_ordering",
":hlo_value",
":instruction_fusion",
"//xla:literal",
"//xla:literal_util",
"//xla:shape_util",
"//xla:test",
"//xla:test_helpers",
Expand All @@ -5043,7 +5072,10 @@ xla_cc_test(
"//xla/tests:hlo_test_base",
"//xla/tests:xla_internal_test_main",
"//xla/tsl/lib/core:status_test_util",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/strings:string_view",
"@tsl//tsl/platform:logging",
"@tsl//tsl/platform:statusor",
"@tsl//tsl/platform:test",
],
)
Expand Down Expand Up @@ -5487,6 +5519,7 @@ cc_library(
testonly = 1,
hdrs = ["hlo_rematerialization_test_utils.h"],
deps = [
"//xla:literal_util",
"//xla:shape_util",
"//xla:xla_data_proto_cc",
"//xla/hlo/ir:hlo",
Expand All @@ -5502,6 +5535,7 @@ xla_cc_test(
":hlo_rematerialization_test_utils",
"//xla/hlo/ir:hlo",
"//xla/tests:xla_internal_test_main",
"@com_google_googletest//:gtest_main",
],
)

Expand Down
17 changes: 13 additions & 4 deletions xla/service/buffer_assignment_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,40 +15,49 @@ limitations under the License.

#include "xla/service/buffer_assignment.h"

#include <cstdint>
#include <memory>
#include <optional>
#include <set>
#include <string>
#include <utility>
#include <vector>

#include "absl/algorithm/container.h"
#include "absl/container/flat_hash_set.h"
#include "absl/log/log.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/string_view.h"
#include "absl/types/span.h"
#include "xla/comparison_util.h"
#include "xla/hlo/ir/dfs_hlo_visitor_with_default.h"
#include "xla/hlo/ir/hlo_computation.h"
#include "xla/hlo/ir/hlo_instruction.h"
#include "xla/hlo/ir/hlo_module.h"
#include "xla/hlo/ir/hlo_opcode.h"
#include "xla/hlo/ir/hlo_schedule.h"
#include "xla/literal.h"
#include "xla/literal_util.h"
#include "xla/service/buffer_value.h"
#include "xla/service/call_graph.h"
#include "xla/service/copy_insertion.h"
#include "xla/service/flatten_call_graph.h"
#include "xla/service/hlo.pb.h"
#include "xla/service/hlo_alias_analysis.h"
#include "xla/service/hlo_dce.h"
#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_proto_util.h"
#include "xla/service/hlo_value.h"
#include "xla/service/logical_buffer.h"
#include "xla/service/memory_space_assignment/memory_space_assignment.h"
#include "xla/shape_util.h"
#include "xla/test.h"
#include "xla/test_helpers.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/tsl/lib/core/status_test_util.h"
#include "xla/types.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/status.h"
#include "tsl/platform/statusor.h"

namespace xla {
Expand Down
3 changes: 3 additions & 0 deletions xla/service/collective_pipeliner_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ limitations under the License.
#include "xla/hlo/ir/hlo_opcode.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"
#include "xla/tests/filecheck.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/util.h"
Expand Down
8 changes: 8 additions & 0 deletions xla/service/defuser_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,16 @@ limitations under the License.

#include "xla/service/defuser.h"

#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "xla/hlo/ir/hlo_computation.h"
#include "xla/hlo/ir/hlo_instruction.h"
#include "xla/hlo/ir/hlo_module.h"
#include "xla/hlo/ir/hlo_opcode.h"
#include "xla/hlo/utils/hlo_matchers.h"
#include "xla/literal.h"
#include "xla/literal_util.h"
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/tests/hlo_test_base.h"

Expand Down
18 changes: 13 additions & 5 deletions xla/service/hlo_alias_analysis_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,30 @@ limitations under the License.

#include "xla/service/hlo_alias_analysis.h"

#include <map>
#include <memory>

#include <set>
#include <vector>

#include "absl/container/flat_hash_set.h"
#include "absl/strings/string_view.h"
#include "xla/hlo/ir/hlo_computation.h"
#include "xla/hlo/ir/hlo_instruction.h"
#include "xla/hlo/ir/hlo_module.h"
#include "xla/hlo/ir/hlo_opcode.h"
#include "xla/hlo/utils/hlo_matchers.h"
#include "xla/literal.h"
#include "xla/literal_util.h"
#include "xla/service/flatten_call_graph.h"
#include "xla/service/hlo_buffer.h"
#include "xla/service/hlo_ordering.h"
#include "xla/service/instruction_fusion.h"
#include "xla/service/hlo_value.h"
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/test.h"
#include "xla/test_helpers.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/tsl/lib/core/status_test_util.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/logging.h"
#include "tsl/platform/statusor.h"
#include "tsl/platform/test.h"

namespace xla {
Expand Down
11 changes: 9 additions & 2 deletions xla/service/hlo_dfs_reachability_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,21 @@ limitations under the License.
#include "xla/hlo/ir/hlo_dfs_reachability.h"

#include <cstddef>
#include <set>
#include <memory>
#include <string>
#include <string_view>

#include "absl/random/random.h"
#include "xla/hlo/ir/hlo_computation.h"
#include "xla/hlo/ir/hlo_instruction.h"
#include "xla/hlo/ir/hlo_opcode.h"
#include "xla/literal_util.h"
#include "xla/service/computation_placer.h"
#include "xla/service/hlo_module_config.h"
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/test.h"
#include "xla/tests/hlo_test_base.h"
#include "tsl/platform/status.h"
#include "tsl/platform/test_benchmark.h"

namespace xla {
Expand Down
7 changes: 7 additions & 0 deletions xla/service/hlo_reachability_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@ limitations under the License.

#include <memory>
#include <set>
#include <string>
#include <string_view>

#include "absl/random/random.h"
#include "xla/hlo/ir/hlo_instruction.h"
#include "xla/hlo/ir/hlo_opcode.h"
#include "xla/literal_util.h"
#include "xla/service/computation_placer.h"
#include "xla/service/hlo_module_config.h"
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/test.h"
#include "xla/test_helpers.h"
#include "xla/tests/hlo_test_base.h"
#include "tsl/platform/status.h"
#include "tsl/platform/test_benchmark.h"

namespace xla {
Expand Down
3 changes: 3 additions & 0 deletions xla/service/hlo_rematerialization_test_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ limitations under the License.
#ifndef XLA_SERVICE_HLO_REMATERIALIZATION_TEST_UTILS_H_
#define XLA_SERVICE_HLO_REMATERIALIZATION_TEST_UTILS_H_

#include <cstdint>
#include <memory>
#include <string>

#include "xla/hlo/ir/hlo_computation.h"
#include "xla/hlo/ir/hlo_instruction.h"
#include "xla/hlo/ir/hlo_opcode.h"
#include "xla/literal_util.h"
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/tests/hlo_test_base.h"
#include "xla/xla_data.pb.h"
Expand Down
2 changes: 2 additions & 0 deletions xla/service/hlo_rematerialization_test_utils_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ limitations under the License.
#include <memory>
#include <vector>

#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "xla/hlo/ir/hlo_computation.h"
#include "xla/hlo/ir/hlo_instruction.h"

Expand Down
Loading

0 comments on commit e911ef4

Please sign in to comment.