admin管理员组文章数量:1530049
NUMPY 速度测试
- 测试脚本
注意事项
- 在
intel
平台下,使用conda install numpy
会默认安装numpy + mkl
。 - 在
amd
平台下,使用conda install numpy
会默认安装numpy + openblas
。 - 在
windows
平台以及AMD
平台下,使用pip install numpy
都会默认安装numpy + openblas
。 - 在
amd
平台下,使用numpy + mkl(2019版)
conda create -p miniconda3/envs/my_env python numpy mkl=2019.* blas=*=*mkl
conda env config vars set MKL_DEBUG_CPU_TYPE=5
conda activate my_env
- 在
amd
平台下,使用numpy + blis
conda create -p miniconda3/envs/my_env python numpy blas=*=*blis
conda activate my_env
INTEL平台
- CPU: i7-11800H @ 2.30GHz,8核16线程
numpy + mkl (conda 安装)
Dotted two 4096x4096 matrices in 0.68 s.
Dotted two vectors of length 524288 in 0.05 ms.
SVD of a 2048x1024 matrix in 0.31 s.
Cholesky decomposition of a 2048x2048 matrix in 0.08 s.
Eigendecomposition of a 2048x2048 matrix in 2.92 s.
numpy + openblas (pip 安装)
Dotted two 4096x4096 matrices in 2.55 s.
Dotted two vectors of length 524288 in 0.14 ms.
SVD of a 2048x1024 matrix in 1.01 s.
Cholesky decomposition of a 2048x2048 matrix in 0.12 s.
Eigendecomposition of a 2048x2048 matrix in 4.81 s.
AMD平台
- CPU: AMD Ryzen 7 3800X 8核16线程
numpy + openblas (conda 安装)
Dotted two 4096x4096 matrices in 0.55 s.
Dotted two vectors of length 524288 in 0.02 ms.
SVD of a 2048x1024 matrix in 0.48 s.
Cholesky decomposition of a 2048x2048 matrix in 0.14 s.
Eigendecomposition of a 2048x2048 matrix in 3.98 s.
numpy + mkl (conda 安装,mkl 2019版,可使用 MKL_DEBUG_CPU_TYPE=5 加速)
Dotted two 4096x4096 matrices in 0.55 s.
Dotted two vectors of length 524288 in 0.02 ms.
SVD of a 2048x1024 matrix in 0.40 s.
Cholesky decomposition of a 2048x2048 matrix in 0.14 s.
Eigendecomposition of a 2048x2048 matrix in 3.56 s.
numpy + blis (conda 安装)
Dotted two 4096x4096 matrices in 2.51 s.
Dotted two vectors of length 524288 in 0.09 ms.
SVD of a 2048x1024 matrix in 1.03 s.
Cholesky decomposition of a 2048x2048 matrix in 0.21 s.
Eigendecomposition of a 2048x2048 matrix in 6.46 s.
版权声明:本文标题:NUMPY 在不同平台上(AMDINTEL)以及使用不同 BLAS 库的速度测试 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dongtai/1726770407a1083802.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论