Remove Setuppable

This commit is contained in:
Olli Saarikivi
2023-09-12 19:29:46 +00:00
committed by Saeed Maleki
parent 8cb63a7d1a
commit 6b39fd9a54
5 changed files with 1 additions and 26 deletions

1
.gitignore vendored
View File

@@ -6,3 +6,4 @@ __pycache__
.*.swp
.idea/
*.so
.venv/

View File

@@ -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:

View File

@@ -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 {

View File

@@ -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);

View File

@@ -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);