Thread limit introspection API, part 1: API scope#213
Conversation
There was a problem hiding this comment.
I find it a bit disturbing that calling threadpoolctl.threadpool_info can temporarily mutate the libraries global state in a non-thread safe way.
The alternative would be to hardcode expected scopes in LibController for all known libraries (and return "unknown" otherwise) and only call _determine_api_scope in tests or by passing a non-default kwarg value: threadpool_ctl.threadpool_info(api_scopes="effective") (and api_scopes="expected" would be the default) for instance.
|
Another interesting finding by looking at the CI results: BLIS is |
|
I think it's useful to have it in |
|
I am fine with introducing an extra CLI flag to enable the extra inspection work. |
…ected outcomes across a variety of libraries.
|
My feeling is:
|
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
2e6e276 to
95d77a0
Compare
That's a fun error. Probably due to conda/conda#16327 |
|
I addressed or replied to all review comments. CI is broken for now, will try again later. |
|
I wonder why a filter of |
Ah, I misunderstood the logic, it's |
|
Ready for another round of review, I think. |
ogrisel
left a comment
There was a problem hiding this comment.
Let's add a changelog entry for this. Otherwise, LGTM.
Any opinion @jeremiedbb?
|
The CI failures seem to be unrelated I think. If so we can fix them in a dedicated PR. |
I believe there's an outstanding PR that fixes one of them, yes. |
|
Added changelog and explanatory comment. |
Fixes #211.
Add info to determine the scope of the thread-limit-setting API (thread local, process-wide, unknown). Introspecting the semantics of the thread pool are going to be a separate PR, assuming that can be done reasonably.