Enable free threaded python support - #159
Open
vlad-perevezentsev wants to merge 9 commits into
Open
Conversation
vlad-perevezentsev
requested review from
antonwolfy,
jharlow-intel,
ndgrigorian and
xaleryb
as code owners
August 12, 2026 12:01
ndgrigorian
reviewed
Aug 21, 2026
| # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
|
||
| # cython: language_level=3 | ||
| # cython: freethreading_compatible=True |
Collaborator
There was a problem hiding this comment.
We need to make changes in various places in this file, there are several areas where we are likely creating race conditions. Some that were apparent in review and with some thinking: multinomial, leapfrog, skipahead, multinormal_cholesky, and the two randint_untyped branches for scalars
For example, we need with self.lock: wrapping irk_multinomial_vec in multinomial
Collaborator
There was a problem hiding this comment.
We likely need more changes throughout the file
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
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.
This PR proposes enabling free-threaded Python support in
mkl_randommklrandwith# cython: freethreading_compatible=Trueso importing the package no longer re-enables the GIL.Cython>=3.1.0(pyproject.toml, conda recipes, README) and addFree Threading :: 2 - Beta classifierpython-gilpin from the conda recipes.free-threading testand3.14t / *_cp314tvariants to the GH workflow matrices