Skip to content

Commit

Permalink
[xla:collectives] NFC: Remove unused NcclApi CommFinalize function
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 702551491
  • Loading branch information
ezhulenev authored and Google-ML-Automation committed Dec 4, 2024
1 parent 5ad6651 commit 41910db
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
7 changes: 0 additions & 7 deletions xla/service/gpu/runtime/nccl_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,6 @@ class DefaultNcclApi final : public NcclApi {
absl::Span<const Communicator* const> comms, int32_t color,
absl::Span<const RankId> keys, std::optional<Config> config) final;

absl::Status CommFinalize(Communicator* comm) final;

absl::StatusOr<int32_t> CommCount(Communicator* comm) final;

absl::Status GroupStart() final;
Expand Down Expand Up @@ -480,11 +478,6 @@ DefaultNcclApi::CommSplit(absl::Span<const Communicator* const> 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<int32_t> DefaultNcclApi::CommCount(Communicator* comm) {
VLOG(5) << "Get the number of ranks in NCCL communicator: " << comm;
int32_t count;
Expand Down
5 changes: 0 additions & 5 deletions xla/service/gpu/runtime/nccl_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,6 @@ class NcclApi : public GpuCollectives {
absl::Span<const Communicator* const> comms, int32_t color,
absl::Span<const RankId> keys, std::optional<Config> 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
Expand Down
4 changes: 0 additions & 4 deletions xla/service/gpu/runtime/nccl_api_stub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ class NcclApiStub final : public NcclApi {
return UnimplementedError();
}

absl::Status CommFinalize(Communicator*) final {
return UnimplementedError();
}

absl::StatusOr<int32_t> CommCount(Communicator*) final {
return UnimplementedError();
}
Expand Down

0 comments on commit 41910db

Please sign in to comment.