diff --git a/CHANGELOG.md b/CHANGELOG.md index a44cb3e608..fea59f95fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added -- Added `hvd.reducescatter()` operation with implementations in NCCL, MPI, and Gloo. ([#3299](https://github.com/horovod/horovod/pull/3299)) +- Added `hvd.reducescatter()` operation with implementations in NCCL, MPI, and Gloo. ([#3299](https://github.com/horovod/horovod/pull/3299), [#3574](https://github.com/horovod/horovod/pull/3574)) - Spark: expose random seed as an optional parameter. ([#3517](https://github.com/horovod/horovod/pull/3517)) diff --git a/horovod/common/controller.h b/horovod/common/controller.h index 00bff4b5d9..8278d8de58 100644 --- a/horovod/common/controller.h +++ b/horovod/common/controller.h @@ -42,6 +42,8 @@ class Controller : public std::enable_shared_from_this { Controller(const Controller&) = delete; + virtual ~Controller() = default; + void Initialize(); virtual int GetTypeSize(DataType dtype) = 0; diff --git a/horovod/common/mpi/mpi_controller.h b/horovod/common/mpi/mpi_controller.h index 5b645ca0ad..3397351d0f 100644 --- a/horovod/common/mpi/mpi_controller.h +++ b/horovod/common/mpi/mpi_controller.h @@ -36,8 +36,6 @@ class MPIController : public Controller { LOG(DEBUG) << "MPI Controller constructed."; } - virtual ~MPIController()=default; - int GetTypeSize(DataType dtype) override; void CrossRankBitwiseAnd(std::vector& bitvector, diff --git a/horovod/common/nvtx_op_range.cc b/horovod/common/nvtx_op_range.cc index 9c87cc7ca7..9dd62f81f0 100644 --- a/horovod/common/nvtx_op_range.cc +++ b/horovod/common/nvtx_op_range.cc @@ -14,6 +14,7 @@ NvtxOpsHandle::NvtxOpsHandle() noexcept REGISTER_STRING(HorovodAllgather); REGISTER_STRING(HorovodBroadcast); REGISTER_STRING(HorovodAlltoall); + REGISTER_STRING(HorovodReducescatter); #undef REGISTER_STRING } diff --git a/horovod/common/nvtx_op_range.h b/horovod/common/nvtx_op_range.h index 8c47351a6b..dbcde5b972 100644 --- a/horovod/common/nvtx_op_range.h +++ b/horovod/common/nvtx_op_range.h @@ -16,7 +16,8 @@ enum class RegisteredNvtxOp { HorovodBroadcast, HorovodAlltoall, HorovodReducescatter, - // Insert new enum values above this line + // Insert values for new ops above this line. Also add corresponding + // REGISTER_STRING lines in the constructor NvtxOpsHandle::NvtxOpsHandle(). END, }; diff --git a/horovod/common/operations.cc b/horovod/common/operations.cc index c67b2a146b..5ab38dd5f9 100644 --- a/horovod/common/operations.cc +++ b/horovod/common/operations.cc @@ -629,7 +629,7 @@ void BackgroundThreadLoop(HorovodGlobalState& state) { int id; GetProcessSetOrAddUnitialized(process_set_ranks, id); } - int32_t initialized_count; + int32_t initialized_count = 0; #if HAVE_MPI if (state.control_operation == LibType::MPI) { initialized_count = diff --git a/horovod/common/ops/gloo_operations.h b/horovod/common/ops/gloo_operations.h index 7d1c577efd..7f58a1a81b 100644 --- a/horovod/common/ops/gloo_operations.h +++ b/horovod/common/ops/gloo_operations.h @@ -43,14 +43,14 @@ class IGlooAlgorithms { std::vector& recvcounts) = 0; virtual int ElementSize() const = 0; + + virtual ~IGlooAlgorithms() = default; }; template class GlooAlgorithms : public IGlooAlgorithms { public: explicit GlooAlgorithms(GlooContext* gloo_context); - ~GlooAlgorithms() = default; - void Allreduce(void* buffer_data, int num_elements) override; void Allgather(void* buffer_data, void* buffer_out, int* recvcounts, @@ -74,8 +74,6 @@ class GlooAllreduce : public AllreduceOp { public: explicit GlooAllreduce(HorovodGlobalState* global_state); - virtual ~GlooAllreduce() = default; - Status Execute(std::vector& entries, const Response& response) override;