-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Composable multithreading with OpenBLAS #1067
Comments
Regarding composability, I think the first "obvious" thing to do is to implement our callback with However, one additional feature that could be quite nice is making this parallelism configurable with ScopedValues. In particular, there are utilities like Aside: How this will work for non-OpenBLAS setups, or considering libblastrampoline, is not something I have really thought about. I think we can consider the ScopedValue support to be a hint for the desired amount of internal parallelism, which would allow a graceful degradation back to the global setting when the BLAS library doesn't support this kind of mechanism. |
To start with, it would be nice to just hack this in by calling the new |
At this point, I'm told that the composable backend is still somewhat buggy — it has a deadlock because it currently still assumes that its parallel tasks are scheduled onto separate threads which can spinlock-synchronize — see OpenMathLib/OpenBLAS#4418 (comment) … feel free to chip in if you have better suggestions to fix that. |
Julia comes with OpenBLAS and that's our default libblastrampoline backend. OpenMathLib/OpenBLAS#4577 (which was a continuation of OpenMathLib/OpenBLAS#2255 by @stevengj), which should come in the not-yet-released OpenBLAS v0.3.28, introduced callbacks to multithreading backends in OpenBLAS, which should enable composable multithreading with Julia. I'm opening this issue for discussing if/how we want to take advantage of that, bearing in mind that by default our BLAS calls go through libblastrampoline, which is backend-agnostic, which may complicate things for writing generic code. I think @jpsamaroo had some ideas involving
Threads.@threads
-powered callbacks orScopedValue
.Also, ref JuliaLang/julia#43984.
The text was updated successfully, but these errors were encountered: