-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
gh-141594: A free-threaded JIT #141595
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
Open
Fidget-Spinner
wants to merge
42
commits into
python:main
Choose a base branch
from
Fidget-Spinner:jit_ft
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
gh-141594: A free-threaded JIT #141595
Changes from 26 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
6a3bd75
Move all JIT fields to thread state
Fidget-Spinner ba9a65a
fix a bug with traversing states
Fidget-Spinner 725894d
fix JIT invalidation mechanism for FT
Fidget-Spinner 1e5713d
fix re-entrant finalizers
Fidget-Spinner f0d4c57
Re-enable the JIT
Fidget-Spinner 67de7d6
cleanup a little
Fidget-Spinner 7f0bc57
fix weird GC bugs
Fidget-Spinner f05e61c
re-enable jit on some stuff
Fidget-Spinner f78e8c8
fix test, more locks!
Fidget-Spinner e1f1b30
fix JIT builds
Fidget-Spinner 53c5e1d
only clear at end
Fidget-Spinner cc38ee4
remove locks in JIT code
Fidget-Spinner f8fefb3
fix a few bugs
Fidget-Spinner d76a24b
Improve tracer thread safety
Fidget-Spinner fa99108
set immortal before GC
Fidget-Spinner fcfed96
📜🤖 Added by blurb_it.
blurb-it[bot] ba67ab7
fix default builkd
Fidget-Spinner b46385b
Merge branch 'jit_ft' of github.com:Fidget-Spinner/cpython into jit_ft
Fidget-Spinner 46285be
Merge remote-tracking branch 'upstream/main' into jit_ft
Fidget-Spinner 8ce83cd
fix comment
Fidget-Spinner fa55643
lint
Fidget-Spinner 92f3dbf
fix nojit builds
Fidget-Spinner 7240b15
Remove heavywieght locking--not needed
Fidget-Spinner cb87676
address review, fix bug
Fidget-Spinner f972637
GC executors
Fidget-Spinner 3ef237b
Change the name
Fidget-Spinner 44356d6
Address review, remove more refcounting
Fidget-Spinner b819053
Fix TSAN races
Fidget-Spinner 527aac1
Remove atomics from _CHECK_VALIDITY
Fidget-Spinner b80c02e
fix comment
Fidget-Spinner 4278c9d
fix typo
Fidget-Spinner d84215d
Re-enable the type/function reverse cache
Fidget-Spinner b08ef60
allow allow deferred things to be borrrowed too
Fidget-Spinner c2c8fbe
fix warnings
Fidget-Spinner 162b1ec
skip bad tests
Fidget-Spinner e0890ff
skip bad tests
Fidget-Spinner 197e9f4
reduce diff
Fidget-Spinner 46413cf
Reduce diff to minmal
Fidget-Spinner b5d6571
reduce diff further
Fidget-Spinner a93c26c
Reduce diff to near minimal
Fidget-Spinner 97d5f2b
typo fix
Fidget-Spinner c381903
Address review
Fidget-Spinner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
1 change: 1 addition & 0 deletions
1
Misc/NEWS.d/next/Core_and_Builtins/2025-11-15-16-30-46.gh-issue-141594.PSsC5J.rst
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Add free-threading support to the JIT. Patch by Ken Jin. | ||
Fidget-Spinner marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1240,8 +1240,7 @@ add_executor_dependency(PyObject *self, PyObject *args) | |
| static PyObject * | ||
| invalidate_executors(PyObject *self, PyObject *obj) | ||
| { | ||
| PyInterpreterState *interp = PyInterpreterState_Get(); | ||
| _Py_Executors_InvalidateDependency(interp, obj, 1); | ||
| _Py_Executors_InvalidateDependency(_PyInterpreterState_GET(), obj, 1); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can be reverted too. |
||
| Py_RETURN_NONE; | ||
| } | ||
|
|
||
|
|
||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.