Given the existence in the wild (e.g. in scikit-learn) of nested Python thread pools, being able to set limits per-thread is that much more important for reliable oversaturation prevention.
Some libraries provide both process-wide and thread-local settings:
In practice BLIS is probably not viable.
Long-term, I think there should be a ecosystem-wide push to provide thread-local APIs.
In the short term, exposing MKL at least would be helpful for #215.
Update: After some discussion of the downstream use case of Python thread pools (#215), conclusion was that rather than it being useful to have thread-local scoped limiting APIs, they should in fact be the default.
Given the existence in the wild (e.g. in scikit-learn) of nested Python thread pools, being able to set limits per-thread is that much more important for reliable oversaturation prevention.
Some libraries provide both process-wide and thread-local settings:
In practice BLIS is probably not viable.
Long-term, I think there should be a ecosystem-wide push to provide thread-local APIs.
In the short term, exposing MKL at least would be helpful for #215.
Update: After some discussion of the downstream use case of Python thread pools (#215), conclusion was that rather than it being useful to have thread-local scoped limiting APIs, they should in fact be the default.