Skip to content
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

TST: test CPython 3.13 (free-threading flavor) #198

Merged
merged 1 commit into from
Aug 6, 2024
Merged

Conversation

neutrinoceros
Copy link
Owner

No description provided.

@neutrinoceros
Copy link
Owner Author

I thought numpy dev would build easily already, but maybe I'm doing something wrong. Will re-assess in a couple weeks to months.

@neutrinoceros neutrinoceros reopened this Jun 18, 2024
@neutrinoceros neutrinoceros changed the title TST: test Python 3.13 both GIL and free-threading flavors TST: test CPython 3.13 (free-threading flavor) Jun 18, 2024
@neutrinoceros neutrinoceros force-pushed the tst/cp313t branch 2 times, most recently from e16a73e to 91ab21a Compare June 18, 2024 16:56
@neutrinoceros
Copy link
Owner Author

numpy now builds nightly wheels for both 3.13 and 3.13t, but Cython generation is currently failing

@neutrinoceros neutrinoceros added this to the v2.0.0 milestone Jun 30, 2024
@neutrinoceros neutrinoceros force-pushed the tst/cp313t branch 5 times, most recently from 5349df1 to a4d7959 Compare July 16, 2024 11:08
@neutrinoceros
Copy link
Owner Author

Building works but I really wasn't expecting tests to pass too. I need to better understand what's going on before I can confidently merge this.

@neutrinoceros neutrinoceros force-pushed the tst/cp313t branch 2 times, most recently from 0bfb67e to 18e65a1 Compare July 22, 2024 08:11
@@ -1,3 +1,5 @@
# cython: freethreading_compatible = True
Copy link
Owner Author

Choose a reason for hiding this comment

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

This macro is not documented yet, so I'll wait until cython/cython#6298 is merged before I can call it stable enough

Choose a reason for hiding this comment

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

It's documented in https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html#compiler-directives already.

(With that said, you should the official line is that everything free-threaded is experimental for the foreseeable future and may change as needed. But that particular directive is probably fairly unlikely to change)

Copy link
Owner Author

Choose a reason for hiding this comment

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

thanks, I missed that ! And dully noted, all of this is still experimental, I'm just experimenting along :)

@neutrinoceros
Copy link
Owner Author

I think the reason why tests pass already is that all loops run in single threads (i.e., I use range instead of prange everywhere), and I'm not using more than one thread anywhere in my test setup. Overall, particle deposition is extremely thread-unsafe, but it shouldn't matter in practice as I don't see how users could be affected.

@neutrinoceros
Copy link
Owner Author

I understand now that I need to exercise multi-threading in CI for this to have value beyond just knowing that gpgi builds in 3.13t. I got started on that in #233

@neutrinoceros neutrinoceros force-pushed the tst/cp313t branch 7 times, most recently from 6661b07 to c208b5d Compare August 6, 2024 07:00
@neutrinoceros neutrinoceros marked this pull request as ready for review August 6, 2024 07:15
@neutrinoceros neutrinoceros merged commit b772918 into main Aug 6, 2024
16 checks passed
@neutrinoceros neutrinoceros deleted the tst/cp313t branch August 6, 2024 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants