Skip to content

Commit 7b84693

Browse files
sdasgup3tensorflower-gardener
authored andcommitted
[HLO Componentization] Create hlo/analysis sub-component (Phase II).
This CL takes care of 1. Migrating external projects dependencies from xla/service --> xla/hlo/analysis Phase I takes care of 1. Migrating xla/service/<analysis-passes> --> xla/hlo/analysis/<analysis-passes> 2. Setting up build aliases in xla/service ensuring external dependencies are still satisfied. PiperOrigin-RevId: 687936257
1 parent 9539c3c commit 7b84693

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

third_party/xla/xla/hlo/experimental/auto_sharding/BUILD

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ cc_library(
4949
"//xla:status_macros",
5050
"//xla:util",
5151
"//xla:xla_data_proto_cc",
52+
"//xla/hlo/analysis:hlo_alias_analysis",
5253
"//xla/hlo/ir:hlo",
5354
"//xla/hlo/pass:hlo_pass",
5455
"//xla/hlo/transforms:hlo_constant_splitter",
@@ -62,7 +63,6 @@ cc_library(
6263
"//xla/service:computation_layout",
6364
"//xla/service:dot_as_convolution_util",
6465
"//xla/service:dump",
65-
"//xla/service:hlo_alias_analysis",
6666
"//xla/service:hlo_buffer",
6767
"//xla/service:hlo_cost_analysis",
6868
"//xla/service:hlo_value",
@@ -295,14 +295,14 @@ cc_library(
295295
"//xla:shape_util",
296296
"//xla:util",
297297
"//xla:xla_data_proto_cc",
298+
"//xla/hlo/analysis:while_loop_analysis",
298299
"//xla/hlo/ir:hlo",
299300
"//xla/hlo/ir:ptrvec",
300301
"//xla/hlo/ir:tile_assignment",
301302
"//xla/hlo/utils:hlo_sharding_util",
302303
"//xla/service:call_graph",
303304
"//xla/service:computation_layout",
304305
"//xla/service:sharding_propagation",
305-
"//xla/service:while_loop_analysis",
306306
"@com_google_absl//absl/algorithm:container",
307307
"@com_google_absl//absl/container:btree",
308308
"@com_google_absl//absl/container:flat_hash_map",
@@ -382,14 +382,14 @@ xla_cc_test(
382382
":auto_sharding_option",
383383
":auto_sharding_strategy",
384384
":auto_sharding_util",
385+
"//xla/hlo/analysis:hlo_alias_analysis",
385386
"//xla/hlo/ir:hlo",
386387
"//xla/hlo/parser:hlo_parser",
387388
"//xla/hlo/testlib:verified_hlo_module",
388389
"//xla/hlo/transforms:hlo_memory_scheduler",
389390
"//xla/hlo/utils:hlo_live_range",
390391
"//xla/hlo/utils:hlo_matchers",
391392
"//xla/service:buffer_value",
392-
"//xla/service:hlo_alias_analysis",
393393
"//xla/service:hlo_value",
394394
"//xla/tests:hlo_test_base",
395395
"//xla/tests:xla_internal_test_main",

third_party/xla/xla/hlo/experimental/auto_sharding/auto_sharding.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ limitations under the License.
4848
#include "absl/time/clock.h"
4949
#include "absl/time/time.h"
5050
#include "absl/types/span.h"
51+
#include "xla/hlo/analysis/hlo_alias_analysis.h"
5152
#include "xla/hlo/experimental/auto_sharding/auto_sharding_cost_graph.h"
5253
#include "xla/hlo/experimental/auto_sharding/auto_sharding_device_mesh.h"
5354
#include "xla/hlo/experimental/auto_sharding/auto_sharding_memory.h"
@@ -78,7 +79,6 @@ limitations under the License.
7879
#include "xla/service/call_graph.h"
7980
#include "xla/service/computation_layout.h"
8081
#include "xla/service/dump.h"
81-
#include "xla/service/hlo_alias_analysis.h"
8282
#include "xla/service/hlo_buffer.h"
8383
#include "xla/service/hlo_cost_analysis.h"
8484
#include "xla/service/hlo_value.h"

third_party/xla/xla/hlo/experimental/auto_sharding/auto_sharding.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ limitations under the License.
3232
#include "absl/status/statusor.h"
3333
#include "absl/strings/string_view.h"
3434
#include "absl/types/span.h"
35+
#include "xla/hlo/analysis/hlo_alias_analysis.h"
3536
#include "xla/hlo/experimental/auto_sharding/auto_sharding_cost_graph.h"
3637
#include "xla/hlo/experimental/auto_sharding/auto_sharding_device_mesh.h"
3738
#include "xla/hlo/experimental/auto_sharding/auto_sharding_option.h"
@@ -44,7 +45,6 @@ limitations under the License.
4445
#include "xla/hlo/pass/hlo_pass_interface.h"
4546
#include "xla/hlo/utils/hlo_live_range.h"
4647
#include "xla/service/call_graph.h"
47-
#include "xla/service/hlo_alias_analysis.h"
4848
#include "xla/service/hlo_cost_analysis.h"
4949
#include "xla/shape.h"
5050

third_party/xla/xla/hlo/experimental/auto_sharding/auto_sharding_option.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ struct AutoShardingOption {
165165
// Static estimate for iteration count of a while loop, used in the cost
166166
// model. This estimate is used when we cannot infer an upper bound on the
167167
// number of iterations in the loop (as implemented in
168-
// third_party/tensorflow/compiler/xla/service/while_loop_analysis.h)
168+
// third_party/tensorflow/compiler/xla/hlo/analysis/while_loop_analysis.h)
169169
int64_t loop_iteration_count_estimate = 100;
170170

171171
// Allows the conversion of aliases to followers if their pairwise strategy

third_party/xla/xla/hlo/experimental/auto_sharding/auto_sharding_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ limitations under the License.
3131
#include "absl/status/status.h"
3232
#include "absl/status/statusor.h"
3333
#include "absl/strings/string_view.h"
34+
#include "xla/hlo/analysis/hlo_alias_analysis.h"
3435
#include "xla/hlo/experimental/auto_sharding/auto_sharding_cost_graph.h"
3536
#include "xla/hlo/experimental/auto_sharding/auto_sharding_device_mesh.h"
3637
#include "xla/hlo/experimental/auto_sharding/auto_sharding_option.h"
@@ -48,7 +49,6 @@ limitations under the License.
4849
#include "xla/hlo/utils/hlo_live_range.h"
4950
#include "xla/hlo/utils/hlo_matchers.h"
5051
#include "xla/service/buffer_value.h"
51-
#include "xla/service/hlo_alias_analysis.h"
5252
#include "xla/service/hlo_value.h"
5353
#include "xla/tests/hlo_test_base.h"
5454
#include "xla/tsl/lib/core/status_test_util.h"

third_party/xla/xla/hlo/experimental/auto_sharding/auto_sharding_util.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ limitations under the License.
4141
#include "absl/types/span.h"
4242
#include "json/json.h"
4343
#include "xla/array.h"
44+
#include "xla/hlo/analysis/while_loop_analysis.h"
4445
#include "xla/hlo/experimental/auto_sharding/auto_sharding_device_mesh.h"
4546
#include "xla/hlo/experimental/auto_sharding/auto_sharding_strategy.h"
4647
#include "xla/hlo/ir/hlo_computation.h"
@@ -55,7 +56,6 @@ limitations under the License.
5556
#include "xla/service/call_graph.h"
5657
#include "xla/service/computation_layout.h"
5758
#include "xla/service/sharding_propagation.h"
58-
#include "xla/service/while_loop_analysis.h"
5959
#include "xla/shape.h"
6060
#include "xla/shape_layout.h"
6161
#include "xla/shape_tree.h"

0 commit comments

Comments
 (0)