-
Notifications
You must be signed in to change notification settings - Fork 87
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
BLAS name collisions #10
Comments
(Question from an outsider:) Can't you just link against whatever BLAS library is installed on the system (that will most often be the one that is also used by numpy), and recommend users to install OpenBLAS? |
That's what's typically done, e.g. by Numpy and Theano. And maybe CGT should do that, at least for now. A few reasons for the choice to download OpenBLAS:
|
Julia adds a suffix to the names of BLAS (they do it so that 32-bit and 64-bit BLAS routines don't get confused), a smililar patch could be used to fix the problem for CGT, too: |
Cool, nice find! |
Agreed, all of these are valid reasons to make OpenBLAS be the default for novice users. If it's not too difficult, advanced users could still be given a way to use an alternative BLAS library, taking care of disabling multi-threading themselves.
Regarding the last point, at least on Ubuntu (and probably Debian) it's quite simple. When you're using packages from the Ubuntu repository, you can even use
What if I want to or need to customize the OpenBLAS build myself, e.g., because the architecture auto-detection does not work for my CPU? Even if you decide to only support OpenBLAS, you may want to allow users to point CGT at an OpenBLAS build somewhere on their system. (This means if you add a function name suffix, that one should be configurable as well.) (Note that I'm just depicting what I'd like as a user here, without understanding the implications on the development side.) |
CGT downloads and installs OpenBLAS. But then when numpy gets imported, the functions from the linked BLAS (e.g. cblas_dgemm) overload some of the functions from OpenBLAS. I noticed this when I found that setting VECLIB_MAXIMUM_THREADS changes the behavior of CGT's matrix multiplication. This behavior doesn't seem to cause any serious bugs, but it partly defeats the purpose of using OpenBLAS, which is to obtain consistent behavior with regard to multithreading and so forth.
The text was updated successfully, but these errors were encountered: