[SciPy-User] How to efficiently do dot(dot( A.T, diag(d) ), A ) ?
Hugh Perkins
hughperkins at gmail.com
Tue Sep 11 14:57:11 EDT 2012
On Wed, Sep 12, 2012 at 2:21 AM, Pauli Virtanen <pav at iki.fi> wrote:
> However, OpenBLAS/GotoBLAS could be better than ATLAS, it seems to be
> also doing well in the benchmarks you linked to:
>
> If you are on Linux, you can easily swap the BLAS libraries used, like so:
Ah great! This is 4 times faster for me:
Using atlas:
$ python testmult.py
Elapsed time: 0.0221469402313
Elapsed time: 0.21438908577
Using goto/openblas:
$ python testmult.py
Elapsed time: 0.0214130878448
Elapsed time: 0.051687002182
Note that I had to do 'sudo update-alternatives --config
liblapack.so.3gf', and pick liblapack.
On Ubuntu, I didn't need to modify LD_LIBRARY_PATH: installing
openblas-base is enough to half-select openblas, and actually, to
break scipy, until the update-alternatives step above is done.
http://stackoverflow.com/questions/12249089/how-to-use-numpy-with-openblas-instead-of-atlas-in-ubuntu
Apparently openblas seems to support multicore too, though I haven't
confirmed that that works in conjunction with scipy yet.
More information about the SciPy-User
mailing list