-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
Use Cython BLAS API and remove bundled BLAS #11638
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
Comments
#11950 has started to do it for a refactoring of K-Means and early benchmarks are promising. |
Saw the discussion in PR ( #12184 ) seems to be forming a consensus around using a newer version of SciPy on |
I think we would want to wait for the minor 0.20.1 bugfix release first (cf #12184), to reduce potential backporting issues. After which PRs would be definitely very welcome :) BTW, are you aware of projects that have been doing this reliably for a while for a range scipy versions and OSs (e.g. on conda forge)? For instance, do we know if scipy 0.17 - 1.1+ does maintain a backward compatible ABI for the BLAS functions exposed in Cython ? There is a discussion implying it in scipy/scipy#6440 (comment) but nothing too official. |
Sounds like a good question for SciPy devs (though I guess you did that already 😄). Maybe worth drawing their attention to this issue again? |
There is a small(?) obstacle to this. We don't make calls to BLAS only from cython but also from C++, in One solution would be to port I don't know if there's an other way. Do you have any idea ? |
Could it be possible to call Cython BLAS functions from C (and I guess C++) ? https://cython.readthedocs.io/en/latest/src/userguide/external_C_code.html#using-cython-declarations-from-c |
I saw that but to do that you have to embed python into c, which would cause a huge overhead I guess. |
Yeah, taking |
Would we then have trouble using tron in liblinear
|
Stupid question, why are we vendoring liblinear in |
LinearSVC uses liblinear,
If you question is why in |
As far as I understand, Scikit-learn currently tries to link against the system (or possibly numpy) BLAS, and if it is not found falls back to the bundled CBLAS. The latter case results in degraded performance, and can lead to packaging issues (e.g. #10105).
In the future, once support for scipy <0.16 is dropped it might be worthwhile to use the Scipy BLAS API in all cases and remove the bundled CBLAS. At the time of writing, the minimal supported scipy version is 0.13.2.
The text was updated successfully, but these errors were encountered: