Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove mock_nccl collateral, as it no longer compiles, and is unused. #65424

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
160 changes: 0 additions & 160 deletions third_party/xla/xla/service/gpu/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ load("//xla/tests:build_defs.bzl", "xla_test")
load(
"//xla/tsl:tsl.bzl",
"if_google",
"if_nccl",
"internal_visibility",
"tsl_copts",
"tsl_gpu_library",
Expand Down Expand Up @@ -908,165 +907,6 @@ cuda_library(
deps = ["@local_config_cuda//cuda:cuda_headers"],
)

cc_library(
name = "mock_nccl_xml_google",
srcs = ["mock_nccl_xml.cc"],
hdrs = ["mock_nccl_xml.h"],
local_defines = if_cuda_is_configured(["GOOGLE_CUDA=1"]) + if_rocm_is_configured([
"TENSORFLOW_USE_ROCM=1",
]),
tags = ["manual"],
visibility = ["//visibility:private"],
deps = [
"//xla:status",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/container:flat_hash_set",
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings:str_format",
"@com_google_absl//absl/strings:string_view",
"@com_google_absl//absl/types:span",
"@local_tsl//tsl/platform:errors",
"@local_tsl//tsl/platform:regexp",
] + if_cuda_is_configured([
"@local_config_nccl//:nccl",
]) + if_rocm_is_configured([
"@local_config_rocm//rocm:rccl",
]),
)

xla_cc_test(
name = "mock_nccl_xml_test",
size = "small",
srcs = if_google(["mock_nccl_xml_test.cc"]),
local_defines = if_cuda_is_configured(["GOOGLE_CUDA=1"]) + if_rocm_is_configured([
"TENSORFLOW_USE_ROCM=1",
]),
tags = tf_cuda_tests_tags(),
deps = [
"//xla:status",
"@com_google_googletest//:gtest_main",
"@local_tsl//tsl/platform:test",
] + if_google([
":mock_nccl_xml_google",
]) + if_cuda_is_configured([
"@local_config_nccl//:nccl",
]) + if_rocm_is_configured([
"@local_config_rocm//rocm:rccl",
]),
)

# Empty library to implement nested dependency conditions.
cc_library(
name = "empty",
compatible_with = get_compatible_with_portable(),
)

alias(
name = "mock_nccl_utils",
actual = if_nccl(
if_google(":_mock_nccl_utils_google", ":_mock_nccl_utils_default"),
":empty",
),
)

# Do not build mock_nccl_utils.cc in OSS. It uses the nccl internal cost model to estimate the
# communication time of nccl collective calls. Only build it in Google builds.
# TODO(b/306073484): Stub out the cost model api used in mock nccl functions.
cc_library(
name = "_mock_nccl_utils_google",
srcs = if_cuda_is_configured(["mock_nccl_utils.cc"]),
hdrs = if_cuda_is_configured([
"mock_nccl_utils.h",
"mock_nccl_topo_config.h",
]),
# Override tsl_gpu_library()'s internal default value of ["//buildenv/target:gce"].
compatible_with = [],
tags = ["manual"],
visibility = ["//visibility:private"],
deps = if_cuda_is_configured([
":gpu_executable_run_options",
":mock_nccl_xml_google",
":nccl_clique_key",
":sleep_kernel",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:flat_hash_map",
"@com_google_absl//absl/container:node_hash_map",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
"@com_google_absl//absl/synchronization",
"@com_google_absl//absl/time",
"@com_google_absl//absl/types:span",
"@local_config_cuda//cuda:cuda_headers",
"@local_config_nccl//:nccl",
"//xla:debug_options_flags",
"//xla:executable_run_options",
"//xla:shape_util",
"//xla:status",
"//xla:status_macros",
"//xla:statusor",
"//xla:util",
"//xla/service:collective_ops_utils",
"//xla/service:global_device_id",
"//xla/service:rendezvous",
"//xla/service:lockable",
"//xla/service/gpu/runtime:nccl_api",
"//xla/service/gpu/runtime:nccl_clique",
"//xla/service/gpu/runtime:nccl_collective_thunk",
"//xla/service/gpu/runtime:nccl_p2p_thunk_common",
"//xla/service/gpu/runtime:thunk",
"//xla/stream_executor",
"//xla/stream_executor/gpu:gpu_activation",
"//xla/stream_executor/gpu:gpu_stream",
"//xla/stream_executor/gpu:gpu_types_header",
"@local_tsl//tsl/platform:env",
"@local_tsl//tsl/lib/gtl:int_type",
"@local_tsl//tsl/platform:errors",
"@local_tsl//tsl/platform:statusor",
]),
)

cc_library(
name = "_mock_nccl_utils_default",
srcs = if_gpu_is_configured(["mock_nccl_utils_default.cc"]),
hdrs = if_gpu_is_configured(["mock_nccl_utils.h"]),
# Override tsl_gpu_library()'s internal default value of ["//buildenv/target:gce"].
compatible_with = [],
tags = ["manual"],
visibility = ["//visibility:private"],
deps = if_gpu_is_configured([
":gpu_executable_run_options",
":nccl_clique_key",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings:str_format",
"@com_google_absl//absl/strings:string_view",
"//xla:executable_run_options",
"//xla:status",
"//xla:statusor",
"//xla:util",
"//xla/service/gpu/runtime:nccl_api",
"//xla/service/gpu/runtime:nccl_clique",
"//xla/service/gpu/runtime:nccl_collective_thunk",
"//xla/service/gpu/runtime:nccl_p2p_thunk_common",
"//xla/service/gpu/runtime:thunk",
"//xla/service:collective_ops_utils",
"//xla/service:global_device_id",
"//xla/service:lockable",
"//xla/stream_executor",
"@local_tsl//tsl/lib/gtl:int_type",
]) + if_cuda_is_configured([
"@local_config_nccl//:nccl",
]) + if_rocm_is_configured([
"@local_config_rocm//rocm:rccl",
]),
)

# TODO(b/244780257): Remove this config.
bool_flag(
name = "enable_xlir",
Expand Down