Repository navigation
FIX Use the fixed "sequential_blas_under_openmp" with threadpoolctl < 3.8 - #35547
Conversation
… 3.8 Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
cc @itamarst |
itamarst
left a comment
There was a problem hiding this comment.
This seems reasonable and tightly scoped.
|
Is the CI issue related to the PR https://github.com/scikit-learn/scikit-learn/actions/runs/45988194813/job/140469534852?pr=35547? |
|
Yes, it's the test I added that is wrong: this job is the only one with OpenBLAS on the OpenMP threading layer, and there I now skip the test in that case. |
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
lesteve
left a comment
There was a problem hiding this comment.
LGTM. This seems a pragmatic approach.
In general, we use sklearn.utils.fixes for this kind of shims depending on the versions but it looks like sklearn.utils.fixes imports sklearn.utils.parallel so that makes it not worth it.
|
Thanks! How to make sure this will be in the 1.10 release? (knowing the rc is out already) |
|
Now that the I guess this PR is a good candidate to be picked, since it fixes a real problem and is small with somewhat low-risk, but I am not the release manager 😉. |
|
This PR is in the backports PR. Let's see how big that PR gets and based on that decide if we need a rc2 or can go directly to a release. |
Reference Issues/PRs
Follow-up of #35180, see #35333 (comment).
What does this implement/fix? Explain your changes.
#35180 switched the BLAS limits under OpenMP to
limits="sequential_blas_under_openmp". With threadpoolctl < 3.8, this option leaves all BLAS libraries unlimited as soon as OpenBLAS is loaded, whatever its threading layer (fixed in joblib/threadpoolctl#283). So on main with the pip wheels (OpenBLAS pthreads) and threadpoolctl 3.5 to 3.7,KMeansand the pairwise distances reductions run multithreaded GEMMs inside their OpenMP loops.This vendors the small fix made in threadpoolctl 3.8 and keeps the code of #35180 as is, and the fix is one block to delete later. I think it's the better option, WDYT?
No changelog entry since #35180 isn't released yet.
AI usage disclosure
I used AI assistance for: