2016-05-14 61 views
4

我的系統中有Ananconda4.0.2。我試圖通過以下的python控制檯命令找出我numpy的配置:Anaconda 4.0.2是否已在MKL上運行numpy

import numpy as np 
np.__config__.show() 

它返回下面的輸出

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'] 

這是否意味着我numpy的已經使用MKL?

回答

3

是的,從Anaconda 2.5 MKL support is the default開始。

找出肯定的是,類型:

conda search numpy 

您將看到

* 1.10.4     py27_0 defaults   
    1.10.4    py27_nomkl_0 defaults  [nomkl] 

. 1.10.4     py35_0 defaults   
    1.10.4    py35_nomkl_0 defaults  [nomkl] 

因此,沒有MKL版本被明確標記爲這樣的事情nomkl和安裝的(*. )包括MKL。

+0

我想安裝caffe,這將需要一些BLAS實現。我在想,既然默認情況下Ananconda4.0.2提供MKL支持numpy和scipy,是否有可能我只是將現有MKL支持鏈接到caffe安裝,而不是像這裏提到的那樣安裝OpenBLAS https://github.com/tiangolo/caffe /blob/ubuntu-tutorial-b/docs/install_apt2.md 如果可能請幫助我的過程? 謝謝 –

+0

似乎。正如[安裝說明](http://caffe.berkeleyvision.org/installation.html)所說:'在Makefile.config中設置BLAS:= mkl' –