Skip to content
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

PyTorch: Release Python GIL when yielding in foreground thread #3353

Merged
merged 1 commit into from Jan 10, 2022

Conversation

maxhgerlach
Copy link
Collaborator

@maxhgerlach maxhgerlach commented Jan 7, 2022

Checklist before submitting

  • Did you read the contributor guide?
  • Did you update the docs?
  • Did you write any tests to validate this change?
  • Did you update the CHANGELOG, if this change affects users?

Description

Fixes #3352. I've run the test suite from tests/parallel/test_torch.py 15 times in the environment described in the issue and did not encounter any hang.

I hope releasing the GIL here is not unsafe in any way.

Signed-off-by: Max H. Gerlach <git@maxgerlach.de>
@github-actions
Copy link

Unit Test Results

     802 files   -   28       802 suites   - 28   9h 8m 17s ⏱️ - 9m 32s
     717 tests ±    0       672 ✔️ ±    0       45 💤 ±    0  0 ±0 
17 324 runs   - 664  12 238 ✔️  - 406  5 086 💤  - 258  0 ±0 

Results for commit dcf942c. ± Comparison against base commit 976a879.

@github-actions
Copy link

Unit Test Results (with flaky tests)

     902 files   -      54       902 suites   - 54   10h 34m 46s ⏱️ + 17m 57s
     717 tests ±       0       671 ✔️ +    2       45 💤 ±    0  1  - 2 
19 772 runs   - 1 060  13 846 ✔️  - 606  5 922 💤  - 454  4 ±0 

For more details on these failures, see this check.

Results for commit dcf942c. ± Comparison against base commit 976a879.

@maxhgerlach
Copy link
Collaborator Author

One of the GPU head test suites on Buildkite failed because of some Docker trouble; it does not look related.

@maxhgerlach maxhgerlach merged commit 69c3329 into horovod:master Jan 10, 2022
@maxhgerlach maxhgerlach deleted the release-gil-for-pytorch branch January 19, 2022 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

GIL-related deadlock with PyTorch 1.10.1
2 participants