Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
GH-140479: Update JIT builds to use LLVM 21#140973
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
| ```sh | ||
| choco install llvm --version=20.1.8 | ||
| choco install llvm --version=21.1.0 |
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.
Choco is lagging here and only has 21.1.0, so I'm on the fence about keeping this in the README, especially given how prominently the LLVM releases page now features installers for Windows.
diegorusso commentedNov 4, 2025
What about the Windows x86_64 image? Does it have llvm 20 as well? Also, in this PR we do 2 things: fix some logic and bump to 21. Wouldn't it be better to do 2 PRs? In case we need to revert to llvm 20 (for any reason) we will revert to a working fetching for version 20. |
savannahostrowski commentedNov 4, 2025
@diegorusso Same deal with x86_64 - seehttps://github.com/actions/runner-images/blob/win22/20251021.76/images/windows/Windows2022-Readme.md#language-and-runtime Sure - see#141002 |
diegorusso left a comment
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.
Provided#141002 gets merged before, this can go in as well. Thanks for splitting them up.
Fidget-Spinner left a comment
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.
Looks simple enough, let's do this!
pablogsal commentedNov 9, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I have tried to rebasehttps://github.com/pablogsal/cpython-unwind to check the unwinding. Looks like the function to test now needs to be more complicated beause the JIT refuses to call functions if there are branches now and requires tons of iterations to start jitting. I would love if someone can take a look at |
Fidget-Spinner commentedNov 9, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The main branch's JIT doesn't seem to want to compile the example due to trace stack underflow. So I reduced the side exit count on my tracing JIT example and tried. Seems like LLVM 21 doesn't fix the problem :( Notice the missing frames! However, I have made a very interesting discovery --- compiling the interpreter with a recent enough clang version (tested with clang-20/21) to the JIT restores the frames!!! So the solution to the stack unwinding seems to be to mandate compiilng CPython with the same clang as the JIT! |
pablogsal commentedNov 9, 2025
We need to understand what the hell it's going on here because otherwise the risk it's that this breaks randomly in the future |
Fidget-Spinner commentedNov 9, 2025
Another data point: old GCC (11) compiled with frame pointers with JIT also allows us to see the frames. |
Uh oh!
There was an error while loading.Please reload this page.
Well, here's a fun treat...looks like the logic to fetch the LLVM binary as a release artifact fromhttps://github.com/python/cpython-bin-deps/releases/tag/llvm-21.1.4.0 never actually worked 😓. CI only passed for Windows on#140329 because LLVM 20 is included in the base image we use for Windows builds (example:https://github.com/actions/partner-runner-images/blob/main/images/arm-windows-11-image.md#language-and-runtime).
As such, we should merge#141002 before this one (Windows CI will fail otherwise!).