Repository navigation
Wire symmetric memory operations to the distributed watchdog - #193834
thisisatharva-rh wants to merge 8 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/193834
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 5 Unrelated FailuresAs of commit cb0cafa with merge base ed7b350 ( NEW FAILURE - The following job has failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
CRCR (non-blocking) - The following CRCR downstream CI jobs failed but are non-blocking:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
|
|
The following ciflow label(s) have been added but CI has not been triggered yet because the workflows are awaiting approval:
Once a maintainer approves the workflows (scroll to the bottom of the PR page), the corresponding CI jobs will be triggered automatically. Please ping one of the reviewers if you do not have access to approve and run workflows. |
fd10ee7 to
1613bca
Compare
| stream_timeout(_watchdog_timeout) | ||
|
|
||
|
|
||
| def wait_signal(hdl: _SymmetricMemory, peer: int) -> None: |
There was a problem hiding this comment.
would be good to add explicit per op timeout fields as well
| group_name, | ||
| ) | ||
| _group_name_to_workspace_tensor[group_name] = tensor | ||
| if _watchdog_timeout is not None: |
There was a problem hiding this comment.
can we gate these to not run if we're capturing for cudagraphs right now? cc @dolpm
There was a problem hiding this comment.
idt you even need to gate it - it'd just be a no-op for replay anyway
There was a problem hiding this comment.
i'm having a hard time understanding why we don't use external events here, which would work for both cases tho.
There was a problem hiding this comment.
i'm fairly new to cudagraphs, not using external events was a bad choice. i'll switch that
There was a problem hiding this comment.
@dolpm could you clarify a couple of things to me (and sorry if they are n00b questions)
- when you say external events would work for both cases, do you mean watchdog should catch a hang in the replayed graph or it shouldn't misbehave during capture. what's got me confused is that the cpu-side deadline is when
stream_timeoutruns and under capture that's at capture time. under replay, when the op runs, the timer's clock and the ops lifetime would be at different points in time. - according to what i understand, external events need to stay valid for the graphs lifetime. the watchdog currently destroys the event once the monitor retires. so i would assume cleanup be tied to the graphs lifetime, or is there a simpler pattern here?
| stream_timeout(_watchdog_timeout) | ||
|
|
||
|
|
||
| def wait_signal(hdl: _SymmetricMemory, peer: int) -> None: |
Signed-off-by: thisisatharva-rh <[email protected]>
Signed-off-by: thisisatharva-rh <[email protected]>
Signed-off-by: thisisatharva-rh <[email protected]>
Signed-off-by: thisisatharva-rh <[email protected]>
Signed-off-by: thisisatharva-rh <[email protected]>
0e59775 to
d62f7da
Compare
Signed-off-by: thisisatharva-rh <[email protected]>
Signed-off-by: thisisatharva-rh <[email protected]>
|
@pytorchbot label "topic: not user facing" |
|
@pytorchmergebot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
@pytorchbot revert -m 'Sorry for reverting your PR but the tests are failing internally' -c ghfirst The agent analysis: |
|
@pytorchbot successfully started a revert job. Check the current status here. |
…193834)" This reverts commit 6dd4bb6. Reverted #193834 on behalf of https://github.com/huydhn due to Sorry for reverting your PR but the tests are failing internally ([comment](#193834 (comment)))
|
@thisisatharva-rh your PR has been successfully reverted. |
This PR was reopened (likely due to being reverted), so your approval was removed. Please request another review.
Signed-off-by: thisisatharva-rh <[email protected]>
…#193834) ### Summary Integrates the `torch.distributed._watchdog` timeout machinery into symmetric memory's blocking and stream-based operations so that hangs in multi-process rendezvous or one-sided NCCL ops are detected and surfaced instead of blocking silently. ### Test Plan ``` python test/distributed/test_symmetric_memory.py -k SymmMemWatchdogUnitTest torchrun --nproc_per_node=2 test/distributed/test_nccl.py -k NCCLSymmMemWatchdogTest ``` Authored with AI assistance Pull Request resolved: pytorch#193834 Approved by: https://github.com/d4l3k
…ytorch#193834)" This reverts commit 6dd4bb6. Reverted pytorch#193834 on behalf of https://github.com/huydhn due to Sorry for reverting your PR but the tests are failing internally ([comment](pytorch#193834 (comment)))
…#193834) ### Summary Integrates the `torch.distributed._watchdog` timeout machinery into symmetric memory's blocking and stream-based operations so that hangs in multi-process rendezvous or one-sided NCCL ops are detected and surfaced instead of blocking silently. ### Test Plan ``` python test/distributed/test_symmetric_memory.py -k SymmMemWatchdogUnitTest torchrun --nproc_per_node=2 test/distributed/test_nccl.py -k NCCLSymmMemWatchdogTest ``` Authored with AI assistance Pull Request resolved: pytorch#193834 Approved by: https://github.com/d4l3k
…ytorch#193834)" This reverts commit 6dd4bb6. Reverted pytorch#193834 on behalf of https://github.com/huydhn due to Sorry for reverting your PR but the tests are failing internally ([comment](pytorch#193834 (comment)))
|
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
Summary
Integrates the
torch.distributed._watchdogtimeout machinery into symmetric memory's blocking and stream-based operations so that hangs in multi-process rendezvous or one-sided NCCL ops are detected and surfaced instead of blocking silently.Test Plan
Authored with AI assistance