-
Notifications
You must be signed in to change notification settings - Fork 76
Support Synchronous Initialization for Proxy Service #679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for synchronous initialization of the proxy service by introducing a mechanism to wait for the proxy thread to fully start and initialize before proceeding. This ensures that operations depending on the proxy being ready can safely proceed.
- Adds a new
isStarted()method toProxyandProxyServiceclasses that blocks until the proxy thread has started - Introduces an
atomic_bool threadStartedflag to track the proxy thread initialization state - Integrates the synchronous wait in the Executor initialization to ensure the proxy is ready before use
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/proxy.cc | Adds threadStarted flag and isStarted() method implementing busy-wait synchronization |
| include/mscclpp/proxy.hpp | Declares new isStarted() method in Proxy class |
| src/port_channel.cc | Adds isStarted() wrapper method in ProxyService |
| include/mscclpp/port_channel.hpp | Declares new isStarted() method in ProxyService class |
| src/executor/executor.cc | Calls isStarted() after starting proxy to ensure initialization completes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
src/proxy.cc:49
- The new blocking parameter is used in
executor.ccbut there is no test coverage for the blocking behavior ofProxy::start(). Consider adding a test that verifies the proxy thread is fully initialized afterstart(true)returns, similar to the existing proxy tests intest/unit/local_channel_tests.cuortest/mp_unit/port_channel_tests.cu.
auto initFunc = [cudaDevice, deviceNumaNode]() {
MSCCLPP_CUDATHROW(cudaSetDevice(cudaDevice));
if (deviceNumaNode >= 0) {
numaBind(deviceNumaNode);
}
};
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ad2d756 to
8e89715
Compare
No description provided.