<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 5, 2015 at 5:11 AM, Nathaniel Smith <span dir="ltr"><<a href="mailto:njs@pobox.com" target="_blank">njs@pobox.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On Wed, Nov 4, 2015 at 4:40 PM, Stefan Seefeld <<a href="mailto:stefan@seefeld.name">stefan@seefeld.name</a>> wrote:<br>
> Hello,<br>
><br>
> is there a way to query Numpy for information about backends (BLAS,<br>
> LAPACK, etc.) that it was compiled against, including compiler / linker<br>
> flags that were used ?<br>
> Consider the use-case where instead of calling a function such as<br>
> numpy.dot() I may want to call the appropriate backend directly using<br>
> the C API as an optimization technique. Is there a straight-forward way<br>
> to do that ?<br>
><br>
> In a somewhat related line of thought: Is there a way to see what<br>
> backends are available during Numpy compile-time ? I'm looking for a<br>
> list of flags to pick ATLAS/OpenBLAS/LAPACK/MKL or any other backend<br>
> that might be available, combined with variables (compiler and linker<br>
> flags, notably) I might have to set. Is that information available at all ?<br>
<br>
</span>NumPy does reveal some information about its configuration and<br>
numpy.distutils does provide helper methods, but I'm not super<br>
familiar with it so I'll let others answer that part.<br></blockquote><div><br></div><div>np.show_config()<br><br></div><div>Gives:<br><br>    lapack_opt_info:<br>        libraries = ['lapack', 'f77blas', 'cblas', 'atlas']<br>        library_dirs = ['/usr/lib/atlas-base/atlas', '/usr/lib/atlas-base']<br>        define_macros = [('NO_ATLAS_INFO', -1)]<br>        language = f77<br>        include_dirs = ['/usr/include/atlas']<br>    openblas_lapack_info:<br>      NOT AVAILABLE<br>    ....<br></div><div>    <etc><br><br></div><div>It's a function with no docstring and not in the html docs (I think), so that can certainly be improved.<br></div><div><br></div><div>Ralf<br></div></div><br></div></div>