Skip to content
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

Compile openblas with openmp #35652

Closed
ViralBShah opened this issue Apr 29, 2020 · 7 comments
Closed

Compile openblas with openmp #35652

ViralBShah opened this issue Apr 29, 2020 · 7 comments
Labels
domain:multithreading Base.Threads and related functionality

Comments

@ViralBShah
Copy link
Member

We have been compiling a bunch of libraries in BB with openmp support. Given that we now have all our toolchains reasonably well sorted out, it should be easy for us to build openblas with openmp support.

Does anyone have experience with using openblas with openmp, and if there are any performance issues?

@ViralBShah
Copy link
Member Author

ViralBShah commented Apr 29, 2020

Also, as per the OpenBLAS FAQ, starting 0.3.7, we should be using USE_LOCKING=1 if multiple threads call OpenBLAS and if compiled for single threaded use (USE_THREAD=0).

https://github.com/JuliaPackaging/Yggdrasil/blob/master/O/OpenBLAS/common.jl

We probably should update the build scripts to account for that, but in reality it shouldn't be an issue since we always build multi-threaded openblas.

@ViralBShah ViralBShah added the domain:multithreading Base.Threads and related functionality label Apr 29, 2020
@ViralBShah
Copy link
Member Author

ViralBShah commented Apr 29, 2020

@giordano @staticfloat @haampie FYI.

@ViralBShah
Copy link
Member Author

ViralBShah commented Apr 30, 2020

This is a bit of a tangent, but I was looking into BLIS.

BLIS is safe with multi-threading: https://github.com/flame/blis/blob/master/docs/Multithreading.md

Also, these appear 6 months old, but BLIS seems to outperform OpenBLAS (0.3.5). The difference on large numbers of cores seems quite a bit. Anyone here with experience? Maybe we should get a BB recipe going for BLIS.
https://github.com/flame/blis/blob/master/docs/Performance.md

@ViralBShah
Copy link
Member Author

Closing as dup of #32786 (sort of)

@chriscoey
Copy link

@ViralBShah are you aware of any attempts at using BLIS from Julia? The progress on #32786 seems slow so I'm wondering if Julia needs to look at more alternatives for multithreading and linear algebra

@ViralBShah
Copy link
Member Author

ViralBShah commented Dec 16, 2020

There was an effort a while ago. I should note that it should be straightforward, because BLIS offers a BLAS-compatible API.

OpenBLAS kernels have greatly improved but the multi-threading still needs a lot of work.

The other alterative is to only use the low-level kernels, and build the multi-threaded BLAS and LAPACK in Julia itself. It is not too hard to do such a thing nowadays, but it needs a concerted community effort in that direction.

@ViralBShah
Copy link
Member Author

@chriscoey @YingboMa and others have explored the possibility of a Julia-native BLAS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:multithreading Base.Threads and related functionality
Projects
None yet
Development

No branches or pull requests

2 participants