-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Provide PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF
as an option
#4753
Merged
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
EthanSteinberg
changed the title
Remove GIL checks
Add #define PYBIND11_NO_GIL_CHECKS to disable GIL checks
Jul 16, 2023
rwgk
reviewed
Jul 16, 2023
rwgk
changed the title
Add #define PYBIND11_NO_GIL_CHECKS to disable GIL checks
Provide Jul 16, 2023
PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF
as an option
I went ahead and changed the title of this PR, so it doesn't accidentally get merged with the other name for the define. |
rwgk
approved these changes
Jul 16, 2023
Ok. I'm going to test this end-to-end, and if it works, I will merge it. |
Looks like this is good: pytorch/pytorch#105283 @rwgk Can you merge this in when you get a chance? |
rwgk
pushed a commit
to rwgk/pybind11
that referenced
this pull request
Jul 17, 2023
…ind#4753) * Remove GIL checks * Update common.h * Add flag * style: pre-commit fixes * Update pytypes.h * style: pre-commit fixes * Update common.h * style: pre-commit fixes * Update pytypes.h * style: pre-commit fixes * Update common.h * style: pre-commit fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
rwgk
pushed a commit
to rwgk/pybind11
that referenced
this pull request
Jul 17, 2023
rwgk
pushed a commit
that referenced
this pull request
Jul 17, 2023
* Update README.rst - Add missing comma in the list of acknowlegements (#4750) * Disable `PYBIND11_ASSERT_GIL_HELD_INCREF_DECREF` generally for PyPy (not just PyPy Windows). (#4751) * Update changelog * Provide `PYBIND11_NO_ASSERT_GIL_HELD_INCREF_DECREF` as an option (#4753) * Remove GIL checks * Update common.h * Add flag * style: pre-commit fixes * Update pytypes.h * style: pre-commit fixes * Update common.h * style: pre-commit fixes * Update pytypes.h * style: pre-commit fixes * Update common.h * style: pre-commit fixes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Update changelog: PR #4753 --------- Co-authored-by: bzaar <slepov@gmail.com> Co-authored-by: Ethan Steinberg <ethan.steinberg@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.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.
Pybind11 recently added a feature to help detect GIL errors during inc_ref and dec_ref. As far as we can tell, theses checks do work correctly in cpython, but some projects want to disable these as a temporary measure while they debug further.
This flag will allow temporary disabling of these checks.