mirror of
https://github.com/microsoft/mscclpp.git
synced 2026-05-12 09:17:06 +00:00
Remove Setuppable
This commit is contained in:
committed by
Saeed Maleki
parent
8cb63a7d1a
commit
6b39fd9a54
1
.gitignore
vendored
1
.gitignore
vendored
@@ -6,3 +6,4 @@ __pycache__
|
||||
.*.swp
|
||||
.idea/
|
||||
*.so
|
||||
.venv/
|
||||
|
||||
@@ -523,21 +523,6 @@ class Context {
|
||||
friend class Endpoint;
|
||||
};
|
||||
|
||||
/// A base class for objects that can be set up during @ref Communicator::setup().
|
||||
struct Setuppable {
|
||||
/// Called inside @ref Communicator::setup() before any call to @ref endSetup() of any @ref Setuppable object that is
|
||||
/// being set up within the same @ref Communicator::setup() call.
|
||||
///
|
||||
/// @param bootstrap A shared pointer to the bootstrap implementation.
|
||||
virtual void beginSetup(std::shared_ptr<Bootstrap> bootstrap);
|
||||
|
||||
/// Called inside @ref Communicator::setup() after all calls to @ref beginSetup() of all @ref Setuppable objects that
|
||||
/// are being set up within the same @ref Communicator::setup() call.
|
||||
///
|
||||
/// @param bootstrap A shared pointer to the bootstrap implementation.
|
||||
virtual void endSetup(std::shared_ptr<Bootstrap> bootstrap);
|
||||
};
|
||||
|
||||
/// A class that sets up all registered memories and connections between processes.
|
||||
///
|
||||
/// A typical way to use this class:
|
||||
|
||||
@@ -89,10 +89,6 @@ const TransportFlags AllIBTransports = Transport::IB0 | Transport::IB1 | Transpo
|
||||
|
||||
const TransportFlags AllTransports = AllIBTransports | Transport::CudaIpc;
|
||||
|
||||
void Setuppable::beginSetup(std::shared_ptr<Bootstrap>) {}
|
||||
|
||||
void Setuppable::endSetup(std::shared_ptr<Bootstrap>) {}
|
||||
|
||||
} // namespace mscclpp
|
||||
|
||||
namespace std {
|
||||
|
||||
@@ -22,7 +22,6 @@ struct Communicator::Impl {
|
||||
std::shared_ptr<Bootstrap> bootstrap_;
|
||||
std::shared_ptr<Context> context_;
|
||||
std::unordered_map<const Connection*, ConnectionInfo> connectionInfos_;
|
||||
std::vector<std::shared_ptr<Setuppable>> toSetup_;
|
||||
|
||||
Impl(std::shared_ptr<Bootstrap> bootstrap, std::shared_ptr<Context> context);
|
||||
|
||||
|
||||
@@ -18,12 +18,6 @@ class LocalCommunicatorTest : public ::testing::Test {
|
||||
std::shared_ptr<mscclpp::Communicator> comm;
|
||||
};
|
||||
|
||||
class MockSetuppable : public mscclpp::Setuppable {
|
||||
public:
|
||||
MOCK_METHOD(void, beginSetup, (std::shared_ptr<mscclpp::Bootstrap> bootstrap), (override));
|
||||
MOCK_METHOD(void, endSetup, (std::shared_ptr<mscclpp::Bootstrap> bootstrap), (override));
|
||||
};
|
||||
|
||||
TEST_F(LocalCommunicatorTest, RegisterMemory) {
|
||||
int dummy[42];
|
||||
auto memory = comm->registerMemory(&dummy, sizeof(dummy), mscclpp::NoTransports);
|
||||
|
||||
Reference in New Issue
Block a user