简体   繁体   中英

Does Anaconda 4.0.2 already runs numpy on MKL

I have Ananconda4.0.2 in my system. I tried finding out my numpy config by following commands in python console:

import numpy as np
np.__config__.show()

It returned following output

lapack_opt_info:
libraries = ['mkl_lapack95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'iomp5', 'pthread']
library_dirs = ['/home/<username>/anaconda2/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/home/<username>/anaconda2/include']
blas_opt_info:
libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'iomp5', 'pthread']
library_dirs = ['/home/<username>/anaconda2/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/home/<username>/anaconda2/include']
openblas_lapack_info:
NOT AVAILABLE
lapack_mkl_info:
libraries = ['mkl_lapack95_lp64', 'mkl_intel_lp64', 'mkl_intel_thread','mkl_core', 'iomp5', 'pthread']
library_dirs = ['/home/<username>/anaconda2/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/home/<username>/anaconda2/include']
blas_mkl_info:
libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'iomp5', 'pthread']
library_dirs = ['/home/<username>/anaconda2/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/home/<username>/anaconda2/include']
mkl_info:
libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'iomp5', 'pthread']
library_dirs = ['/home/<username>/anaconda2/lib']
define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
include_dirs = ['/home/<username>/anaconda2/include']

Does this mean that my numpy already uses mkl?

Yes, starting with Anaconda 2.5 MKL support is the default .

To find out for sure, type:

conda search numpy

You will see things like

*  1.10.4                   py27_0  defaults        
   1.10.4             py27_nomkl_0  defaults        [nomkl]

or

.  1.10.4                   py35_0  defaults        
   1.10.4             py35_nomkl_0  defaults        [nomkl]

So the version without MKL is explicitly marked as such with nomkl and the ones installed ( * or . ) include MKL.

From numpy 1.15.0 OpenBLAS seems to be the default . I am on 1.16.2 and this holds:

In [2]:np.__version__
Out[2]: '1.16.2'

In [3]: np.__config__.show()
blas_mkl_info:
  NOT AVAILABLE
blis_info:
    libraries = ['blas', 'cblas', 'lapack', 'blas', 'cblas', 'lapack']
    library_dirs = ['/home/tams00/anaconda3/envs/course2019/lib']
    define_macros = [('HAVE_CBLAS', None)]
    include_dirs = ['/home/tams00/anaconda3/envs/course2019/include']
    language = c
blas_opt_info:
    libraries = ['blas', 'cblas', 'lapack', 'blas', 'cblas', 'lapack', 'blas', 'cblas', 'lapack']
    library_dirs = ['/home/tams00/anaconda3/envs/course2019/lib']
    define_macros = [('HAVE_CBLAS', None)]
    include_dirs = ['/home/tams00/anaconda3/envs/course2019/include']
    language = c
lapack_mkl_info:
  NOT AVAILABLE
openblas_lapack_info:
    libraries = ['blas', 'cblas', 'lapack', 'blas', 'cblas', 'lapack']
    library_dirs = ['/home/tams00/anaconda3/envs/course2019/lib']
    language = c
    define_macros = [('HAVE_CBLAS', None)]
lapack_opt_info:
    libraries = ['blas', 'cblas', 'lapack', 'blas', 'cblas', 'lapack', 'blas', 'cblas', 'lapack']
    library_dirs = ['/home/tams00/anaconda3/envs/course2019/lib']
    language = c
    define_macros = [('HAVE_CBLAS', None)]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM