简体   繁体   English

numpy+mkl 比 numpy 快吗?

[英]Is numpy+mkl faster than numpy?

If numpy+mkl is faster, how much faster is it than numpy?如果 numpy+mkl 更快,那么它比 numpy 快多少?

I found that the numpy+mkl installation package is much larger than numpy, but I can't feel the difference in their speed.发现numpy+mkl安装包比numpy大很多,但是感觉不到它们的速度差异。

numpy's standard pip packages are linked to OpenBLAS. numpy 的标准 pip 包链接到 OpenBLAS。 Mabey OpenBLAS is in the same ballpark for speed as MKL. Mabey OpenBLAS 与 MKL 的速度相同。 For a detailed comparison of their speeds, please see Boosting numpy: Why BLAS Matters and Benchmark OpenBLAS, Intel MKL vs ATLAS有关它们速度的详细比较,请参阅Boosting numpy:Why BLAS Matters and Benchmark OpenBLAS, Intel MKL vs ATLAS

Short answer: No, maybe just slightly.简短回答:不,也许只是一点点。

I just repeated now benchmark from this site: https://jwalton.info/Python-MKL-openBLAS/ .我刚刚重复了这个网站的基准测试: https : //jwalton.info/Python-MKL-openBLAS/ And the results on current version of numpy are similar to those on intel-numpy .并且在当前版本的numpy上的结果与intel-numpy上的结果相似。

Speedup > 1 means MKL is faster. Speedup > 1 意味着 MKL 更快。 Speedup < 0 means "standard" numpy (using openBLAS) is faster. Speedup < 0 意味着“标准”numpy(使用 openBLAS)更快。

在此处输入图片说明在此处输入图片说明在此处输入图片说明在此处输入图片说明

As you can see, differences are small.如您所见,差异很小。 For some functions there is small (~1.1x) speedup.对于某些功能,加速幅度很小(~1.1 倍)。 But for most of them there is no speedup and one function is significantly slower in MKL.但是对于他们中的大多数人来说,没有加速,而且 MKL 中的一个函数明显变慢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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