-
Notifications
You must be signed in to change notification settings - Fork 193
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
Feature/free threaded #2260
Feature/free threaded #2260
Conversation
34bd810
to
9a0fd6b
Compare
@rgommers does that look good to you? |
That was fast! CI and C++ code look good, will test with SciPy to make sure it works. Main question I have is about the lack of a |
The C++ code does work as advertised in SciPy. And testing this allowed me to get past the Pythran modules and find the next place to go fix the same thing, so this testing was already quite helpful. |
9a0fd6b
to
2863122
Compare
Just stumbled across https://pythran.readthedocs.io/en/latest/MANUAL.html#thread-safety in the user manual. Is that still up to date, and if so should the generated code default to the behavior enabled by the |
I think I actually like that the added flag in the |
On Wed, Nov 27, 2024 at 10:52:51AM -0800, Ralf Gommers wrote:
Just stumbled across [1]https://pythran.readthedocs.io/en/latest/MANUAL.html#
thread-safety in the user manual. Is that still up to date, and if so should
the generated code default to the behavior enabled by the
-DTHREAD_SAFE_REF_COUNT flag under a free-threaded interpreter?
I don't think so. THREAD_SAFE_REF_COUNT is for pythran-owned reference counter
on a shared pointer, it does not interact with any python memory.
|
Okay, testing done - all happy! Perhaps this still needs an entry in the docs, so the new option shows up at https://pythran.readthedocs.io/en/latest/MANUAL.html#customizing-your-pythranrc? Other than that it LGTM. 🚀 |
This is the default, and can be changed through --config backend.freethreading_compatible=false or the equivalent pythranrc entry. Fix #2258
2863122
to
a31020e
Compare
Just a question about this remark. It seems to me that it is quite common for efficient numerical kernel to modify inplace numpy arrays (a very simple example here). Will I have to call pythran with |
@paugier only if |
Thanks again @serge-sans-paille! Do you have any plans for a new release with this included? For the first RC for SciPy 1.15.0 I can point at master, but ideally we'd have this for the final release in January. (if not possible, not the end of the world though) |
@serge-sans-paille friendly ping on the question above. Also, will this go into 0.18.0 or can it be part of 0.17.1? |
Can be part of a 0.17.1. Do you think we can sleak in #2257 as well? |
Great! I think I can get something done for gh-2257. Let me at least try to get a PR up this week that works with SciPy; if review shows it's nontrivial to get it right then we probably should aim for 0.18.0 instead. |
No description provided.