Repository navigation
Conversation
…ntion' into combined-over-saturation-prevention
|
Local testing suggests that once joblib/threadpoolctl#300 is merged, and combined with fixes I've added to this branch, the race conditions should be fixed and the joblib reproducer above should pass (I turned it into a test.) |
|
The main issue with this branch is that part of the correctness for OpenBLAS-pthreads resides here ( |
|
Test failures will (hopefully) turn to success when run against threadpoolctl 3.8.1 due to joblib/threadpoolctl#300 |
ogrisel
left a comment
There was a problem hiding this comment.
Tiny suggestions to improve readability from the calling sites.
|
I've updated this to work with latest version of APIs in joblib/threadpoolctl#300 |
ogrisel
left a comment
There was a problem hiding this comment.
Besides the following detail, LGTM.
|
Note that we might want to wait for the threadpoolctl 3.9.0 release before merging (even though I tested the PR against the dev branch already). For information, threadpoolctl 3.9.0 will probably also include joblib/threadpoolctl#309. |
|
I suggest not merging this until there is a PR with scikit-learn docs (I'm working on it right now), since that will make clear how this impacts users. I'll submit that tomorrow morning my time hopefully. |
|
Here's a first pass; the main differences from user perspective are lack of env variable overrides, and the fact that things Just Work mostly. |
|
(Merging that PR is blocked on joblib release, just worth reading it before proceeding to make sure we're happy with the impact on users.) |
|
I did a joint review of this PR with cursor and it founds several important things. One of the main points (already raised by @cakedev0 during a meeting IIRC) is that calling the limiter in the worker number of threads can actually increase the number of threads limitted by an previous call (env var, default MKL SMT handling, outer I don't know if we should fix this on the joblib side or on the threadpoolctl side. The review also highlights problems related to double- There are many more things to look at in more details. |
|
Going through the gist, I've so far addressed locally: Part 1TODO: We decided to have a limit per library, set initially to minimum of Part 2
Part 3TODO, need to review. Part 4
|
… when used indirectly
I agree. |
|
The |
Fixes #1846
Assumes joblib/threadpoolctl#257 will get merged; if not, or if API changes, this will need to change too. It is compatible with older
threadpoolctlthough.