-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
[core][experimental] Avoid false positives in deadlock detection #47912
Merged
jjyao
merged 2 commits into
ray-project:master
from
kevin85421:update-deadlock-detection
Oct 8, 2024
Merged
[core][experimental] Avoid false positives in deadlock detection #47912
jjyao
merged 2 commits into
ray-project:master
from
kevin85421:update-deadlock-detection
Oct 8, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kevin85421
commented
Oct 6, 2024
@@ -746,28 +745,6 @@ def test_torch_tensor_nccl_nested_dynamic(ray_start_regular): | |||
compiled_dag.teardown() | |||
|
|||
|
|||
@pytest.mark.parametrize("ray_start_regular", [{"num_cpus": 4}], indirect=True) |
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.
This has already been covered by tests in test_detect_deadlock_dag.py
.
ruisearch42
approved these changes
Oct 7, 2024
ujjawal-khare
pushed a commit
to ujjawal-khare-27/ray
that referenced
this pull request
Oct 15, 2024
…-project#47912) Signed-off-by: Kai-Hsun Chen <kaihsun@anyscale.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
ujjawal-khare
pushed a commit
to ujjawal-khare-27/ray
that referenced
this pull request
Oct 15, 2024
…-project#47912) Signed-off-by: Kai-Hsun Chen <kaihsun@anyscale.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
ujjawal-khare
pushed a commit
to ujjawal-khare-27/ray
that referenced
this pull request
Oct 15, 2024
…-project#47912) Signed-off-by: Kai-Hsun Chen <kaihsun@anyscale.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
ujjawal-khare
pushed a commit
to ujjawal-khare-27/ray
that referenced
this pull request
Oct 15, 2024
…-project#47912) Signed-off-by: Kai-Hsun Chen <kaihsun@anyscale.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
ujjawal-khare
pushed a commit
to ujjawal-khare-27/ray
that referenced
this pull request
Oct 15, 2024
…-project#47912) Signed-off-by: Kai-Hsun Chen <kaihsun@anyscale.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
ujjawal-khare
pushed a commit
to ujjawal-khare-27/ray
that referenced
this pull request
Oct 15, 2024
…-project#47912) Signed-off-by: Kai-Hsun Chen <kaihsun@anyscale.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
ujjawal-khare
pushed a commit
to ujjawal-khare-27/ray
that referenced
this pull request
Oct 15, 2024
…-project#47912) Signed-off-by: Kai-Hsun Chen <kaihsun@anyscale.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
ujjawal-khare
pushed a commit
to ujjawal-khare-27/ray
that referenced
this pull request
Oct 15, 2024
…-project#47912) Signed-off-by: Kai-Hsun Chen <kaihsun@anyscale.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
ujjawal-khare
pushed a commit
to ujjawal-khare-27/ray
that referenced
this pull request
Oct 15, 2024
…-project#47912) Signed-off-by: Kai-Hsun Chen <kaihsun@anyscale.com> Signed-off-by: ujjawal-khare <ujjawal.khare@dream11.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
Initially, the deadlock detection mechanism was designed based on a DAGNode-based execution schedule, meaning the read, compute, and write operations belonging to the same DAGNode will be executed consecutively.
Then, #46911 changes the execution schedule from DAGNode-based to operation-based to avoid deadlocks caused by NCCL operations. Therefore, there are some false positives for the old deadlock detection mechanism.
With this PR, the deadlock detection focuses only on NCCL operations where both the reader and writer belong to the same actor.
Future works: Avoid false negatives
In this case,
actor1.f1
andactor1.f2
have control dependencies between them. Ifactor2.f1
readsactor1.f2
first and thenactor1.f1
, there will be a deadlock. However, this deadlock is not detectable until we have a more granular execution schedule.Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.