BLD: Allow easy use of openblas.#3642
Conversation
numpy/distutils/system_info.py
Outdated
There was a problem hiding this comment.
This unconditional import is fine, and better than the conditional import it gets replaced with below...
|
Original commit. Let me cherry-pick the changes again and fix the regressions. I will force push to this PR. |
|
See if that's better. Removed the regressions and removed the change for the below |
|
Much better, thanks... I really don't understand the overall logic for how it picks which library to use for things like BLAS -- I'm not sure anyone does -- but there's a special case for OSX at the top of Also just to be clear: I think this changes the defaults so that if openblas and atlas are both available, it uses openblas. Is that correct, and is it desirable? |
|
The overall logic is quite simple: a |
|
Just a note: someone should spend a bit of time understanding how the INI file is supposed to work and then write the damned thing down in the documentation so that it doesn't seem like ugly magic to future generations... |
|
Right, I mean specifically the logic for how it picks which one to use when On Tue, Aug 20, 2013 at 6:49 PM, Pauli Virtanen notifications@github.comwrote:
|
|
Might need to add an |
|
@pv Thanks for the update. Looks like this would be a backport candidate for 1.8..0 if the timing works out... |
|
I have no real idea, I'm far from an expert on numpy's build system, just I'd suggest it go into a prerelease as soon as possible if it goes into 1.8
|
|
Agree, if it is backported it should be in a beta or maybe an rc1. The idea is that things don't get widely tested until the release process starts up and it sound like this might be helpful. |
|
Where should I add the OSX checks? It's not completely obvious to me. |
- openblas is usually a lot faster then ATLAS so make sure it can get correctly detected.
blas_opt and lapack_opt sections are not actually read by the numpy.distutils.system_info machinery. They are just meta entry points for the `get_info` public function that in turns introspec the atlas, openblas and mkl sections.
|
I have opened a new pull request jseabold#1 against this branch to solve the OSX issue: the ATLAS env variable is no longer expected. Regular atlas_info / atlas_threads_info introspection is used instead. If there is no I also took the liberty to remove the mistaken examples to use |
|
I'd like to make a 1.8.0b2 release this weekend, so it would be good if this can be settled by then. |
|
I did some build test with the current state of my branch jseabold#1: I was able to build numpy successfully against:
Under Ubuntu 13.014, I installed Then I was able to build against the system atlas without the need for any Finally I have also build numpy against a fresh build of OpenBLAS in Note: under Linux I had to explicitly: to be able to This seems expected but apparently this step is not necessary under OSX for some reason. To make sure that OpenBLAS was properly used by numpy I changed the value of the I have also built scipy and scikit-learn against the OpenBLAS numpy under OSX without any problem. |
|
@jseabold: Have you had a chance to look at Oliver's patch? Any opinion? On Wed, Sep 4, 2013 at 4:38 PM, Olivier Grisel notifications@github.comwrote:
|
|
I glanced over it, but, no, not in any great detail. I don't have any strong opinion here, as it wasn't really my patch. As long as it works and is documented clearly, I'm happy. Note I'm also adding the path to LD_LIBRARY_PATH. I also had to specify BLAS and LAPACK env variables to point to the openblas shared library for building scipy, though it sounds like this is no longer necessary with this patch? |
|
If it's fine with y'all I can merge it and push. Just let me know. |
|
@jseabold Go ahead. |
|
Done. |
I installed numpy against with the "site.cfg" mentioned above and then could just |
|
FYI: I reported the fork + OpenBLAS GEMM crash here: OpenMathLib/OpenBLAS#294 (it's based on previous debugging done in collaboration with @cournape for a similar bug with Apple Accelerate). |
Well I reported about the manual builds I did to test. Is there an automated build infrastructure to check whether this introduces any build, test or performance regression on other platforms? |
|
BTW, this should also be mentioned in the 1.8.0 release notes as I'm inclined to put this in unless something bad turns up in the next few days. |
|
Thank Ralf. In it goes. @jseabold Can you make another PR to update the release notes? |
BLD: Allow easy use of openblas.
|
Would've been easier to do here. Where should I make the changes? |
|
Just make another PR. |
Backport of numpygh-3642 and numpygh-3688.
I'm not the author of this patch, but this has become a major pain point for me. Please offer suggestions for updating the site.cfg or better practices.
Will close #3571.
cc // @akesandgren