In [1]:
import numpy as np  
import time   
N = 6000  
M = 10000  
  
k_list = [64, 80, 96, 104, 112, 120, 128, 144, 160, 176, 192, 200, 208, 224, 240, 256, 384,512,1024,2048]  
  
def get_gflops(M, N, K):  
    return M*N*(2.0*K-1.0) / 1000**3  
  
np.show_config()  
  
for K in k_list:  
    a = np.array(np.random.random((M, N)), dtype=np.double, order='C', copy=False)  
    b = np.array(np.random.random((N, K)), dtype=np.double, order='C', copy=False)  
    A = np.matrix(a, dtype=np.double, copy=False)  
    B = np.matrix(b, dtype=np.double, copy=False)  
  
    C = A*B  
  
    start = time.time()  
  
    C = A*B  
    C = A*B  
    C = A*B  
    C = A*B  
    C = A*B  
  
    end = time.time()  
  
    tm = (end-start) / 5.0  
  
    print ('{0:4} size, {1:9.7} s, {2:9.7} GFLOPS'.format(K, tm, get_gflops(M, N, K) / tm))


lapack_opt_info:
    libraries = ['mkl_lapack95_lp64', 'mkl_core_dll', 'mkl_intel_lp64_dll', 'mkl_intel_thread_dll']
    library_dirs = ['C:\\aroot\\stage\\Library\\lib']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['C:\\aroot\\stage\\Library\\include']
blas_opt_info:
    libraries = ['mkl_core_dll', 'mkl_intel_lp64_dll', 'mkl_intel_thread_dll']
    library_dirs = ['C:\\aroot\\stage\\Library\\lib']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['C:\\aroot\\stage\\Library\\include']
openblas_lapack_info:
  NOT AVAILABLE
lapack_mkl_info:
    libraries = ['mkl_lapack95_lp64', 'mkl_core_dll', 'mkl_intel_lp64_dll', 'mkl_intel_thread_dll']
    library_dirs = ['C:\\aroot\\stage\\Library\\lib']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['C:\\aroot\\stage\\Library\\include']
blas_mkl_info:
    libraries = ['mkl_core_dll', 'mkl_intel_lp64_dll', 'mkl_intel_thread_dll']
    library_dirs = ['C:\\aroot\\stage\\Library\\lib']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['C:\\aroot\\stage\\Library\\include']
mkl_info:
    libraries = ['mkl_core_dll', 'mkl_intel_lp64_dll', 'mkl_intel_thread_dll']
    library_dirs = ['C:\\aroot\\stage\\Library\\lib']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['C:\\aroot\\stage\\Library\\include']
  64 size, 0.08260002 ms,  92.25179 GFLOPS
  80 size, 0.07860003 ms,   121.374 GFLOPS
  96 size,    0.1028 ms,  111.4786 GFLOPS
 104 size,    0.0908 ms,  136.7841 GFLOPS
 112 size,    0.1058 ms,   126.465 GFLOPS
 120 size,     0.142 ms,  100.9859 GFLOPS
 128 size,    0.1166 ms,  131.2178 GFLOPS
 144 size,    0.1482 ms,  116.1943 GFLOPS
 160 size,    0.2594 ms,  73.78566 GFLOPS
 176 size,    0.1448 ms,   145.442 GFLOPS
 192 size,    0.1682 ms,  136.6231 GFLOPS
 200 size,     0.165 ms,  145.0909 GFLOPS
 208 size,    0.1938 ms,   128.483 GFLOPS
 224 size,     0.193 ms,  138.9637 GFLOPS
 240 size,    0.2012 ms,   142.843 GFLOPS
 256 size,    0.2332 ms,  131.4751 GFLOPS
 384 size,    0.3218 ms,  143.0081 GFLOPS
 512 size,    0.4228 ms,   145.175 GFLOPS
1024 size,    0.8268 ms,  148.5486 GFLOPS
2048 size,    1.7638 ms,  139.3015 GFLOPS