From 41910dbf5051817e3a5aa8645906cd75e42c11c7 Mon Sep 17 00:00:00 2001 From: Eugene Zhulenev Date: Tue, 3 Dec 2024 19:24:32 -0800 Subject: [PATCH] [xla:collectives] NFC: Remove unused NcclApi CommFinalize function PiperOrigin-RevId: 702551491 --- xla/service/gpu/runtime/nccl_api.cc | 7 ------- xla/service/gpu/runtime/nccl_api.h | 5 ----- xla/service/gpu/runtime/nccl_api_stub.cc | 4 ---- 3 files changed, 16 deletions(-) diff --git a/xla/service/gpu/runtime/nccl_api.cc b/xla/service/gpu/runtime/nccl_api.cc index b2e4dd1164ad3..68a28a8418dd0 100644 --- a/xla/service/gpu/runtime/nccl_api.cc +++ b/xla/service/gpu/runtime/nccl_api.cc @@ -302,8 +302,6 @@ class DefaultNcclApi final : public NcclApi { absl::Span comms, int32_t color, absl::Span keys, std::optional config) final; - absl::Status CommFinalize(Communicator* comm) final; - absl::StatusOr CommCount(Communicator* comm) final; absl::Status GroupStart() final; @@ -480,11 +478,6 @@ DefaultNcclApi::CommSplit(absl::Span comms, #endif // !defined(TENSORFLOW_USE_ROCM) || TF_ROCM_VERSION >= 60000 } -absl::Status DefaultNcclApi::CommFinalize(Communicator* comm) { - VLOG(1) << "Finalize NCCL communicator: " << comm; - return XLA_NCCL_STATUS(ncclCommFinalize(Cast(comm))); -} - absl::StatusOr DefaultNcclApi::CommCount(Communicator* comm) { VLOG(5) << "Get the number of ranks in NCCL communicator: " << comm; int32_t count; diff --git a/xla/service/gpu/runtime/nccl_api.h b/xla/service/gpu/runtime/nccl_api.h index 4b033c5189789..1293ffab01e2e 100644 --- a/xla/service/gpu/runtime/nccl_api.h +++ b/xla/service/gpu/runtime/nccl_api.h @@ -161,11 +161,6 @@ class NcclApi : public GpuCollectives { absl::Span comms, int32_t color, absl::Span keys, std::optional config) = 0; - // Finalize a communicator object comm. - // - // https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api/comms.html#ncclcommdestroy - virtual absl::Status CommFinalize(Communicator* comm) = 0; - // Returns the number of ranks in the NCCL communicator comm. // // https://docs.nvidia.com/deeplearning/nccl/user-guide/docs/api/comms.html#ncclcommcount diff --git a/xla/service/gpu/runtime/nccl_api_stub.cc b/xla/service/gpu/runtime/nccl_api_stub.cc index feaaf226d20ed..78501bd1d72f5 100644 --- a/xla/service/gpu/runtime/nccl_api_stub.cc +++ b/xla/service/gpu/runtime/nccl_api_stub.cc @@ -100,10 +100,6 @@ class NcclApiStub final : public NcclApi { return UnimplementedError(); } - absl::Status CommFinalize(Communicator*) final { - return UnimplementedError(); - } - absl::StatusOr CommCount(Communicator*) final { return UnimplementedError(); }