-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
Building Python 3.13 dev releases + no GIL #658
Comments
Hi, I'm trying to build NoGil. I met some problems while building for Linux on github action. Also, I have built successfully on my own computer. See: https://anaconda.org/ovo-tim/nogil |
@ovo-Tim Can you make a pull request to the feedstock with your changes? Then we could integrate that here (and help you with CI) |
@xhochy Should I create a new branch, or just pull up github action? |
Please make a pull request with a branch on your repository and keep using Azure Pipelines. We don't want to use GitHub Actions for package builds. |
@xhochy Hi, you may should create a branch. Than I wil make a pull request with this new branch. (I think I don't have permission to create a branch on this repository, I am not a git expert.) |
No, please fork and make a pull request from that fork. GitHub has good documentation on how to contribute via a pull request to another repository. Please have a look at that. |
Should I pull to main branch? |
Adding to the excitement (disruption?) of 3.13, it now has a build-time dependence on LLVM (haven't checked yet which bits). |
Indeed in typical Python fashion there is a poem to go with it: python/cpython#113465 |
Haha, nice. :)
Needs clang 16 and |
The copy-and-patch JIT actually generates Assembly at compile-time and only "patches" that assembly together at runtime. There is no compilation happening at runtime. |
Thanks for the explanation @xhochy! But wouldn't those assembly pieces have to be specific to the target architecture? I guess that would work if the JIT on host can target another architecture - in that case I just got confused by "JIT built only on host" not clearly implying that. |
I think it might be confusing vocablulary. I would assume |
There is now an environment variable/flag to configure whether the GIL is enabled in Pythons built with xref: python/cpython#116338 |
Python 3.13 has 2 alpha releases and a 3rd one due out in a week. Here's the release schedule for more details
Of particular note, the
--disable-gil
build flag was added, which should allow building a Python with the GIL disabled. It's important to note that this mode is not ABI compatible with the mode that keeps the GIL. So any extension module built with Python would need to be rebuilt with the no GIL interpreter to be used with it. That said, in no GIL mode there is an environment variable to toggle GIL usage,PYTHONGIL
. Eventually the ABI stability will be addressed, but this is still several Python releases away. So we will need to decide what to do before thenNaively would propose building both build modes
We may also want to explore building a couple common libraries (like NumPy, SciPy, scikit-learn) to try with. IIRC some libraries already have fixes included for no GIL. So those seem like a preferable starting point
There is some interest in building out packages with Anaconda. So think we will want to coordinate
Would be interested to hear thoughts on this 🙂
The text was updated successfully, but these errors were encountered: