Skip to content

Commit 9322e67

Browse files
authored
Revert "Intra-node shared memory (SHM) optimizations for CPU primitives (#458)" (#490)
This reverts commit 5994546.
1 parent f834c75 commit 9322e67

10 files changed

Lines changed: 2 additions & 634 deletions

File tree

gloo/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,6 @@ list(APPEND GLOO_HDRS
5151
"${CMAKE_CURRENT_SOURCE_DIR}/types.h"
5252
)
5353

54-
if(NOT MSVC AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm)")
55-
list(APPEND GLOO_SRCS "${CMAKE_CURRENT_SOURCE_DIR}/allreduce_shm.cc")
56-
list(APPEND GLOO_HDRS "${CMAKE_CURRENT_SOURCE_DIR}/allreduce_shm.h")
57-
endif()
58-
5954
if(USE_CUDA)
6055
file(GLOB GLOO_CUDA_SRCS
6156
"${CMAKE_CURRENT_SOURCE_DIR}/cuda*.cc"

gloo/allreduce.cc

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@
1212
#include <array>
1313
#include <cstring>
1414

15-
#if !defined(_WIN32) && !defined(__aarch64__) && !defined(__arm__)
16-
#include "gloo/allreduce_shm.h"
17-
#endif
1815
#include "gloo/common/logging.h"
1916
#include "gloo/math.h"
20-
#include "gloo/transport/device.h"
2117
#include "gloo/types.h"
2218

2319
namespace gloo {
@@ -135,27 +131,14 @@ void allreduce(const detail::AllreduceOptionsImpl& opts) {
135131
return;
136132
}
137133

138-
auto algorithm = opts.algorithm;
139-
140-
#if !defined(_WIN32) && !defined(__aarch64__) && !defined(__arm__)
141-
if (context->isIntraNode() && !context->getDevice()->hasGPUDirect()) {
142-
algorithm = detail::AllreduceOptionsImpl::SHM;
143-
}
144-
#endif
145-
146-
switch (algorithm) {
134+
switch (opts.algorithm) {
147135
case detail::AllreduceOptionsImpl::UNSPECIFIED:
148136
case detail::AllreduceOptionsImpl::RING:
149137
ring(opts, reduceInputs, broadcastOutputs);
150138
break;
151139
case detail::AllreduceOptionsImpl::BCUBE:
152140
bcube(opts, reduceInputs, broadcastOutputs);
153141
break;
154-
#if !defined(_WIN32) && !defined(__aarch64__) && !defined(__arm__)
155-
case detail::AllreduceOptionsImpl::SHM:
156-
shm(opts);
157-
break;
158-
#endif
159142
default:
160143
GLOO_ENFORCE(false, "Algorithm not handled.");
161144
}

gloo/allreduce.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ struct AllreduceOptionsImpl {
3939
UNSPECIFIED = 0,
4040
RING = 1,
4141
BCUBE = 2,
42-
SHM = 3,
4342
};
4443

4544
explicit AllreduceOptionsImpl(const std::shared_ptr<Context>& context)

0 commit comments

Comments
 (0)