Skip to content

Commit

Permalink
Refactor spmd_partitioner.cc. Merge PatternMatchMergeSharding and Pat…
Browse files Browse the repository at this point in the history
…ternMatchUnmergeSharding into one unified function PatternMatchMergeOrSplitSharding.

PiperOrigin-RevId: 587160141
  • Loading branch information
ZixuanJiang authored and tensorflower-gardener committed Dec 2, 2023
1 parent 2326e80 commit 7052d20
Show file tree
Hide file tree
Showing 2 changed files with 134 additions and 207 deletions.
11 changes: 10 additions & 1 deletion third_party/xla/xla/service/spmd/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Description: SPMD partitioning pass.

load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library")
load("//xla:xla.bzl", "xla_cc_test")
load("@local_tsl//tsl/platform:rules_cc.bzl", "cc_library")

package(
default_visibility = ["//visibility:public"],
Expand Down Expand Up @@ -34,12 +34,16 @@ cc_library(
],
visibility = ["//visibility:public"],
deps = [
"//xla:array",
"//xla:comparison_util",
"//xla:literal",
"//xla:literal_util",
"//xla:protobuf_util",
"//xla:shape_util",
"//xla:status",
"//xla:status_macros",
"//xla:statusor",
"//xla:types",
"//xla:util",
"//xla:window_util",
"//xla:xla_data_proto_cc",
Expand All @@ -50,12 +54,14 @@ cc_library(
"//xla/hlo/utils:hlo_query",
"//xla/hlo/utils:hlo_sharding_util",
"//xla/service:call_graph",
"//xla/service:computation_layout",
"//xla/service:custom_call_sharding_helper",
"//xla/service:dot_as_convolution_util",
"//xla/service:flatten_call_graph",
"//xla/service:hlo_cse",
"//xla/service:hlo_dce",
"//xla/service:hlo_lexer",
"//xla/service:hlo_module_config",
"//xla/service:hlo_pass",
"//xla/service:hlo_pass_pipeline",
"//xla/service:pattern_matcher",
Expand All @@ -69,8 +75,11 @@ cc_library(
"@com_google_absl//absl/container:inlined_vector",
"@com_google_absl//absl/container:node_hash_map",
"@com_google_absl//absl/functional:function_ref",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
"@local_tsl//tsl/platform:errors",
"@local_tsl//tsl/platform:numbers",
"@local_tsl//tsl/platform:statusor",
],
Expand Down
Loading

0 comments on commit 7052d20

Please sign in to comment.