Skip to content

Commit

Permalink
[XLA:Runtime] Moved the nccl_clique target to runtime folder.
Browse files Browse the repository at this point in the history
This is part of an effort to move runtime targets to the runtime folder. #5758

PiperOrigin-RevId: 621605191
  • Loading branch information
tensorflower-gardener authored and copybara-github committed Apr 4, 2024
1 parent c2cc020 commit eb7a889
Show file tree
Hide file tree
Showing 9 changed files with 49 additions and 49 deletions.
41 changes: 3 additions & 38 deletions xla/service/gpu/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -897,41 +897,6 @@ xla_cc_test(
],
)

cc_library(
name = "nccl_clique",
srcs = ["nccl_clique.cc"],
hdrs = ["nccl_clique.h"],
deps = [
":nccl_clique_key",
"//xla:debug_options_flags",
"//xla:executable_run_options",
"//xla:status_macros",
"//xla/service:global_device_id",
"//xla/service:lockable",
"//xla/service:rendezvous",
"//xla/service/gpu/runtime:nccl_api",
"//xla/stream_executor",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:btree",
"@com_google_absl//absl/container:node_hash_map",
"@com_google_absl//absl/functional:function_ref",
"@com_google_absl//absl/hash",
"@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",
"@tsl//tsl/platform:env",
"@tsl//tsl/platform:errors",
"@tsl//tsl/platform:hash",
"@tsl//tsl/platform:logging",
"@tsl//tsl/platform:statusor",
],
)

cuda_library(
name = "sleep_kernel",
srcs = if_cuda_is_configured(["sleep_kernel.cu.cc"]),
Expand Down Expand Up @@ -1019,7 +984,6 @@ cc_library(
":gpu_executable_run_options",
":mock_nccl_xml_google",
":nccl_clique_key",
":nccl_clique",
":sleep_kernel",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/base:core_headers",
Expand Down Expand Up @@ -1048,6 +1012,7 @@ cc_library(
"//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",
Expand All @@ -1073,7 +1038,6 @@ cc_library(
deps = if_gpu_is_configured([
":gpu_executable_run_options",
":nccl_clique_key",
":nccl_clique",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
"@com_google_absl//absl/strings:str_format",
Expand All @@ -1083,6 +1047,7 @@ cc_library(
"//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",
Expand Down Expand Up @@ -1121,7 +1086,6 @@ cc_library(
":gpu_constants",
":gpu_executable_run_options",
":ir_emission_utils",
":nccl_clique",
":nccl_clique_key",
":stream_executor_util",
"//xla:executable_run_options",
Expand All @@ -1143,6 +1107,7 @@ cc_library(
"//xla/service:stream_pool",
"//xla/service:xla_debug_info_manager",
"//xla/service/gpu/runtime:annotation",
"//xla/service/gpu/runtime:nccl_clique",
"//xla/service/gpu/runtime:thunk",
"//xla/stream_executor",
"//xla/stream_executor:device_description",
Expand Down
2 changes: 1 addition & 1 deletion xla/service/gpu/gpu_executable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ limitations under the License.
#include "xla/service/gpu/buffer_allocations.h"
#include "xla/service/gpu/gpu_constants.h"
#include "xla/service/gpu/gpu_executable_run_options.h"
#include "xla/service/gpu/nccl_clique.h"
#include "xla/service/gpu/nccl_clique_key.h"
#include "xla/service/gpu/runtime/annotation.h"
#include "xla/service/gpu/runtime/nccl_clique.h"
#include "xla/service/gpu/runtime/thunk.h"
#include "xla/service/gpu/stream_executor_util.h"
#include "xla/service/hlo_execution_profile.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/service/gpu/mock_nccl_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ limitations under the License.
#include "xla/service/gpu/gpu_executable_run_options.h"
#include "xla/service/gpu/mock_nccl_topo_config.h"
#include "xla/service/gpu/mock_nccl_xml.h"
#include "xla/service/gpu/nccl_clique.h"
#include "xla/service/gpu/nccl_clique_key.h"
#include "xla/service/gpu/runtime/nccl_api.h"
#include "xla/service/gpu/runtime/nccl_clique.h"
#include "xla/service/gpu/runtime/nccl_collective_thunk.h"
#include "xla/service/gpu/runtime/nccl_p2p_thunk_common.h"
#include "xla/service/gpu/runtime/thunk.h"
Expand Down
39 changes: 37 additions & 2 deletions xla/service/gpu/runtime/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,41 @@ cc_library(
],
)

cc_library(
name = "nccl_clique",
srcs = ["nccl_clique.cc"],
hdrs = ["nccl_clique.h"],
deps = [
":nccl_api",
"//xla:debug_options_flags",
"//xla:executable_run_options",
"//xla:status_macros",
"//xla/service:global_device_id",
"//xla/service:lockable",
"//xla/service:rendezvous",
"//xla/service/gpu:nccl_clique_key",
"//xla/stream_executor",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/base:core_headers",
"@com_google_absl//absl/container:btree",
"@com_google_absl//absl/container:node_hash_map",
"@com_google_absl//absl/functional:function_ref",
"@com_google_absl//absl/hash",
"@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",
"@tsl//tsl/platform:env",
"@tsl//tsl/platform:errors",
"@tsl//tsl/platform:hash",
"@tsl//tsl/platform:logging",
"@tsl//tsl/platform:statusor",
],
)

#===-------------------------------------------------------------------------------------------===//
# XLA Thunks Runtime
#===-------------------------------------------------------------------------------------------===//
Expand Down Expand Up @@ -818,6 +853,7 @@ cc_library(
]),
deps = [
":nccl_api",
":nccl_clique",
"//xla:debug_options_flags",
"//xla:shape_util",
"//xla:status",
Expand All @@ -831,7 +867,6 @@ cc_library(
"//xla/service:rendezvous",
"//xla/service/gpu:buffer_allocations",
"//xla/service/gpu:ir_emission_utils",
"//xla/service/gpu:nccl_clique",
"//xla/service/gpu:nccl_clique_key",
"//xla/service/gpu/runtime:thunk",
"//xla/service/llvm_ir:llvm_util",
Expand Down Expand Up @@ -1035,6 +1070,7 @@ cc_library(
hdrs = ["thunk.h"],
deps = [
":nccl_api",
":nccl_clique",
"//xla:executable_run_options",
"//xla/hlo/ir:hlo",
"//xla/service:buffer_assignment",
Expand All @@ -1043,7 +1079,6 @@ cc_library(
"//xla/service/gpu:backend_configs_cc",
"//xla/service/gpu:buffer_allocations",
"//xla/service/gpu:gpu_executable_run_options",
"//xla/service/gpu:nccl_clique",
"//xla/service/gpu:nccl_clique_key",
"//xla/stream_executor",
"//xla/translate/mhlo_to_hlo:location_exporter",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include "xla/service/gpu/nccl_clique.h"
#include "xla/service/gpu/runtime/nccl_clique.h"

#include <cstdint>
#include <cstdlib>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#ifndef XLA_SERVICE_GPU_NCCL_CLIQUE_H_
#define XLA_SERVICE_GPU_NCCL_CLIQUE_H_
#ifndef XLA_SERVICE_GPU_RUNTIME_NCCL_CLIQUE_H_
#define XLA_SERVICE_GPU_RUNTIME_NCCL_CLIQUE_H_

#include <cstddef>
#include <cstdint>
Expand Down Expand Up @@ -142,4 +142,4 @@ absl::StatusOr<std::shared_ptr<NcclClique::Lock>> AcquireNcclClique(

} // namespace xla::gpu

#endif // XLA_SERVICE_GPU_NCCL_CLIQUE_H_
#endif // XLA_SERVICE_GPU_RUNTIME_NCCL_CLIQUE_H_
2 changes: 1 addition & 1 deletion xla/service/gpu/runtime/nccl_collective_thunk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ limitations under the License.
#include "xla/service/global_device_id.h"
#include "xla/service/gpu/buffer_allocations.h"
#include "xla/service/gpu/ir_emission_utils.h"
#include "xla/service/gpu/nccl_clique.h"
#include "xla/service/gpu/nccl_clique_key.h"
#include "xla/service/gpu/runtime/nccl_api.h"
#include "xla/service/gpu/runtime/nccl_clique.h"
#include "xla/service/gpu/runtime/thunk.h"
#include "xla/service/rendezvous.h"
#include "xla/shape.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/service/gpu/runtime/thunk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ limitations under the License.
#include "xla/service/gpu/backend_configs.pb.h"
#include "xla/service/gpu/buffer_allocations.h"
#include "xla/service/gpu/gpu_executable_run_options.h"
#include "xla/service/gpu/nccl_clique.h"
#include "xla/service/gpu/nccl_clique_key.h"
#include "xla/service/gpu/runtime/nccl_api.h"
#include "xla/service/gpu/runtime/nccl_clique.h"
#include "xla/service/service_executable_run_options.h"
#include "xla/stream_executor/stream.h"
#include "xla/translate/mhlo_to_hlo/location_exporter.h"
Expand Down
2 changes: 1 addition & 1 deletion xla/service/gpu/runtime/thunk.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ limitations under the License.
#include "xla/service/buffer_assignment.h"
#include "xla/service/global_device_id.h"
#include "xla/service/gpu/buffer_allocations.h"
#include "xla/service/gpu/nccl_clique.h"
#include "xla/service/gpu/nccl_clique_key.h"
#include "xla/service/gpu/runtime/nccl_api.h"
#include "xla/service/gpu/runtime/nccl_clique.h"
#include "xla/service/service_executable_run_options.h"
#include "xla/stream_executor/stream.h"
#include "xla/stream_executor/stream_executor.h"
Expand Down

0 comments on commit eb7a889

Please sign in to comment.