Skip to content

Conversation

SwayamInSync
Copy link
Member

@SwayamInSync SwayamInSync commented Aug 26, 2025

towards fixing #130

@SwayamInSync
Copy link
Member Author

@ngoldbaum wheels building and tests are running fine for 3.13 and 3.14, you can have a look (just some small workflow changes)
Tests for matmul uses multithreading so for now it seems to work, maybe will add more extensive tests later

@ngoldbaum
Copy link
Member

I edited the PR description since we would still need to fix the release automation to close #130.

Tests for matmul uses multithreading so for now it seems to work

Is this an allusion to free-threaded support? You would need to add 3.13t and 3.14t builds to get free-threaded support. You've only added GIL-enabled 3.13 and 3.14 builds here.

I think you'd also need to declare free-threaded support in the extension too, otherwise the GIL will get enabled at runtime. See https://py-free-threading.github.io/porting-extensions/#declaring-free-threaded-support.

Probably worth adding pytest-run-parallel testing on the free-threaded build to the CI if you want to add free-threaded support.

@SwayamInSync
Copy link
Member Author

I see, this make sense. Thanks for the pointers @ngoldbaum, will update the PR here after incorporating and testing this all on personal fork

@SwayamInSync
Copy link
Member Author

************************** pytest-run-parallel report **************************
  All tests were run in parallel! 🎉
  ============================ no tests ran in 0.34s =============================
  ! _pytest.outcomes.Exit: GIL was dynamically re-enabled during test collection to load module 'numpy_quaddtype._quaddtype_main'. When running under a free-threaded interpreter with the GIL initially disabled, the test suite must not cause the GIL to be re-enabled at runtime. Check for compiled extension modules that do not use the 'Py_mod_gil' slot or the 'PyUnstable_Module_SetGIL' API. !

It seems the extension needs to be edited here, let's add this too in the tracker to keep the updates

@SwayamInSync
Copy link
Member Author

SwayamInSync commented Aug 27, 2025

It seems to be working as expected, @ngoldbaum please take a look

  • Added pytest-run-parallel for 3.13t and 3.14t
  • Updated the extension

We may need to expand the testing to cover thread-safety better

@SwayamInSync SwayamInSync requested a review from ngoldbaum August 27, 2025 00:22
Copy link
Contributor

@juntyr juntyr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ngoldbaum ngoldbaum merged commit 1d48f34 into numpy:main Aug 27, 2025
6 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Numpy-QuadDType v1.0 roadmap Aug 27, 2025
@ngoldbaum
Copy link
Member

Thanks, now we just need to fix the release automation to make sure the sdist gets uploaded and then do a release!

@SwayamInSync
Copy link
Member Author

Thanks, now we just need to fix the release automation to make sure the sdist gets uploaded and then do a release!

You mean within CI uploading sdist along with artifacts for every release?

@ngoldbaum
Copy link
Member

yup! The wheels and sdist should be uploaded together once they're all built. I can point you at some examples in other repos if you need one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

3 participants