<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Jul 13, 2015 at 7:55 AM Nathaniel Smith <<a href="mailto:njs@pobox.com">njs@pobox.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">On Jul 13, 2015 1:44 AM, "Eric Martin" <<a href="mailto:eric@ericmart.in" target="_blank">eric@ericmart.in</a>> wrote:<br>
><br>
> My procedure questions:<br>
> 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.</p>
<p dir="ltr">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.</p></blockquote><div>Supporting Eigen sounds like a great idea. BLIS would be another</div><div>one worth supporting at some point. As far as implementation goes, it may be helpful to look at <a href="https://github.com/numpy/numpy/pull/3642">https://github.com/numpy/numpy/pull/3642</a> and <a href="https://github.com/numpy/numpy/pull/4191">https://github.com/numpy/numpy/pull/4191</a> for the corresponding set of changes for OpenBLAS. That could be a good starting point.</div><div>Thanks for bringing this up!</div><div>-Ian Henriksen</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p dir="ltr">> 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.</p>
<p dir="ltr">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.</p>
<p dir="ltr">-n</p>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org" target="_blank">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote></div></div>