On Mon, Jul 13, 2015 at 7:55 AM Nathaniel Smith <n...@pobox.com> wrote:
> On Jul 13, 2015 1:44 AM, "Eric Martin" <e...@ericmart.in> wrote: > > > > My procedure questions: > > Is the installation procedure I outlined above reasonable, or does it > contain steps that could/should be removed? Having to edit Numpy source > seems sketchy to me. I largely came up with this procedure by looking up > tutorials online and by trial and error. I don't want to write > documentation that encourages people to do something in a non-optimal way, > so if there is a better way to do this, please let me know. > > I'll leave others with more knowledge to answer your other questions, but > if you're interested in making it easy for others to link numpy against > these libraries, I'd suggest modifying the numpy source further, by > submitting a patch that teaches numpy.distutils how to detect and link > against these libraries automatically :-). There are several libraries we > already know how to do this for that you can compare against for reference, > and this will also help for other libraries that use blas and > numpy.distutils, like scipy. > Supporting Eigen sounds like a great idea. BLIS would be another one worth supporting at some point. As far as implementation goes, it may be helpful to look at https://github.com/numpy/numpy/pull/3642 and https://github.com/numpy/numpy/pull/4191 for the corresponding set of changes for OpenBLAS. That could be a good starting point. Thanks for bringing this up! -Ian Henriksen > > Eigen has excellent performance. On my i5-5200U (Broadwell) CPU, I > found Eigen BLAS compiled with AVX and FMA instructions to take 3.93s to > multiply 2 4000x4000 double matrices with a single thread, while my install > of Numpy from ubuntu took 9s (and used 4 threads on my 2 cores). My Ubuntu > numpy appears to built against "libblas", which I think is the reference > implementation. > > If you're using the numpy packages distributed by Ubuntu, then it should > be possible to switch to openblas just by apt installing openblas and then > maybe fiddling with update-alternatives. > > -n > _______________________________________________ > NumPy-Discussion mailing list > NumPy-Discussion@scipy.org > http://mail.scipy.org/mailman/listinfo/numpy-discussion >
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion